@huaweicloud/huaweicloud-sdk-core 3.1.11 → 3.1.13

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 +98 -0
  2. package/CHANGELOG_CN.md +98 -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,101 @@
1
+ # 3.1.13 2022-12-01
2
+
3
+ ### HuaweiCloud SDK CFW
4
+
5
+ - _Features_
6
+ - None
7
+ - _Bug Fix_
8
+ - None
9
+ - _Change_
10
+ - Changes of the interface `ListIpsSwitchStatusUsingGet`:
11
+ - Add the response parameter `data`
12
+ - Remove the response parameters `object_id`, `basic_defense_status`, `virtual_patches_stauts`
13
+ - Changes of the interface `ListEastWestFirewall`:
14
+ - Add the response parameter `protect_infos`
15
+ - Remove the response parameter `protected_infos`
16
+ - The request parameter `fw_instance_id` changed to not required of the interface `ListAttackLogs`
17
+ - Add the request parameter `type` to the interface `UpdateRuleAclUsingPut`
18
+ - Add the request parameters `list_type`, `object_id` to the interface `UpdateBlackWhiteListUsingPut`
19
+ - Changes of the interface `ListFirewallUsingGet`:
20
+ - Add the response parameter `data`
21
+ - Remove the response parameters `fw_instance_id`, `resource_id`, `name`, `ha_type`, `charge_mode`, `service_type`, `engine_type`, `flavor`, `protect_objects`, `status`, `description`, `is_old_firewall_instance`, `support_ipv6`, `feature_toggle`
22
+ - Changes of the interface `ListServiceSetDetails`:
23
+ - Add the response parameter `data`
24
+ - Remove the response parameters `id`, `name`, `description`
25
+ - Changes of the interface `CountEips`:
26
+ - Add the response parameter `data`
27
+ - Remove the response parameters `object_id`, `eip_total`, `eip_protected`
28
+ - Changes of the interface `ListEipResources`:
29
+ - Add the response parameter `data`
30
+ - Remove the response parameters `id`, `public_ip`, `status`, `public_ipv6`, `enterprise_project_id`, `device_id`, `device_name`, `device_owner`, `associate_instance_type`
31
+ - Add the request parameter `address_type` to the interface `UpdateAddressSetInfoUsingPut`
32
+
33
+ ### HuaweiCloud SDK FunctionGraph
34
+
35
+ - _Features_
36
+ - Support the interface `AsyncInvokeReservedFunction`
37
+ - _Bug Fix_
38
+ - None
39
+ - _Change_
40
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ListDependencies`
41
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ListDependencyVersion`
42
+ - Changes of the interface `CreateFunction`:
43
+ - Add the enum values `http` to the request parameter `runtime`
44
+ - Add the enum values `http` to the response parameter `runtime`
45
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ListFunctions`
46
+ - Add the enum values `http` to the response parameter `runtime` to the interface `UpdateFunctionCode`
47
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ShowFunctionCode`
48
+ - Changes of the interface `UpdateFunctionConfig`:
49
+ - Add the enum values `http` to the request parameter `runtime`
50
+ - Add the enum values `http` to the response parameter `runtime`
51
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ShowFunctionConfig`
52
+ - Add the enum values `http` to the response parameter `runtime` to the interface `UpdateFunctionMaxInstanceConfig`
53
+ - Changes of the interface `ListReservedInstanceConfigs`:
54
+ - Add the response parameters `reservedinstances`, `page_info`, `count`
55
+ - Remove the response parameters `function_urn`, `qualifier_type`, `qualifier_name`, `min_count`, `idle_mode`, `tactics_config`
56
+ - Add the enum values `http` to the response parameter `runtime` to the interface `CreateFunctionVersion`
57
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ListFunctionVersions`
58
+ - Add the enum values `http` to the response parameter `runtime` to the interface `ImportFunction`
59
+
60
+ ### HuaweiCloud SDK Image
61
+
62
+ - _Features_
63
+ - Support the interfaces `RunQueryCustomTags`, `RunDeleteCustomTags`, `RunImageMediaTaggingDet`
64
+ - _Bug Fix_
65
+ - None
66
+ - _Change_
67
+ - Add the request parameter `use_default_tags` to the interface `RunImageMediaTagging`
68
+
69
+ # 3.1.12 2022-11-30
70
+
71
+ ### HuaweiCloud SDK EIP
72
+
73
+ - _Features_
74
+ - Support the interfaces `DisassociatePublicips`, `AssociatePublicips`
75
+ - _Bug Fix_
76
+ - None
77
+ - _Change_
78
+ - None
79
+
80
+ ### HuaweiCloud SDK FunctionGraph
81
+
82
+ - _Features_
83
+ - None
84
+ - _Bug Fix_
85
+ - None
86
+ - _Change_
87
+ - Add the request parameter `metric_type` to the interface `ShowTenantMetric`
88
+
89
+ ### HuaweiCloud SDK SIS
90
+
91
+ - _Features_
92
+ - None
93
+ - _Bug Fix_
94
+ - None
95
+ - _Change_
96
+ - Add the enum values `chinese_8k_general` to the request parameter `property` to the interface `PushTranscriberJobs`
97
+ - 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`
98
+
1
99
  # 3.1.11 2022-11-24
2
100
 
3
101
  ### HuaweiCloud SDK AOS
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,101 @@
1
+ # 3.1.13 2022-12-01
2
+
3
+ ### HuaweiCloud SDK CFW
4
+
5
+ - _新增特性_
6
+ - 无
7
+ - _解决问题_
8
+ - 无
9
+ - _特性变更_
10
+ - 接口`ListIpsSwitchStatusUsingGet`:
11
+ - 新增响应参数 `data`
12
+ - 移除响应参数 `object_id`、`basic_defense_status`、`virtual_patches_stauts`
13
+ - 接口`ListEastWestFirewall`:
14
+ - 新增响应参数 `protect_infos`
15
+ - 移除响应参数 `protected_infos`
16
+ - 接口`ListAttackLogs`请求参数`fw_instance_id`改为非必填
17
+ - 接口`UpdateRuleAclUsingPut`新增请求参数 `type`
18
+ - 接口`UpdateBlackWhiteListUsingPut`新增请求参数 `list_type`、`object_id`
19
+ - 接口`ListFirewallUsingGet`:
20
+ - 新增响应参数 `data`
21
+ - 移除响应参数 `fw_instance_id`、`resource_id`、`name`、`ha_type`、`charge_mode`、`service_type`、`engine_type`、`flavor`、`protect_objects`、`status`、`description`、`is_old_firewall_instance`、`support_ipv6`、`feature_toggle`
22
+ - 接口`ListServiceSetDetails`:
23
+ - 新增响应参数 `data`
24
+ - 移除响应参数 `id`、`name`、`description`
25
+ - 接口`CountEips`:
26
+ - 新增响应参数 `data`
27
+ - 移除响应参数 `object_id`、`eip_total`、`eip_protected`
28
+ - 接口`ListEipResources`:
29
+ - 新增响应参数 `data`
30
+ - 移除响应参数 `id`、`public_ip`、`status`、`public_ipv6`、`enterprise_project_id`、`device_id`、`device_name`、`device_owner`、`associate_instance_type`
31
+ - 接口`UpdateAddressSetInfoUsingPut`新增请求参数 `address_type`
32
+
33
+ ### HuaweiCloud SDK FunctionGraph
34
+
35
+ - _新增特性_
36
+ - 支持接口`AsyncInvokeReservedFunction`
37
+ - _解决问题_
38
+ - 无
39
+ - _特性变更_
40
+ - 接口`ListDependencies`响应参数`runtime`新增枚举值`http`
41
+ - 接口`ListDependencyVersion`响应参数`runtime`新增枚举值`http`
42
+ - 接口`CreateFunction`:
43
+ - 请求参数`runtime`新增枚举值`http`
44
+ - 响应参数`runtime`新增枚举值`http`
45
+ - 接口`ListFunctions`响应参数`runtime`新增枚举值`http`
46
+ - 接口`UpdateFunctionCode`响应参数`runtime`新增枚举值`http`
47
+ - 接口`ShowFunctionCode`响应参数`runtime`新增枚举值`http`
48
+ - 接口`UpdateFunctionConfig`:
49
+ - 请求参数`runtime`新增枚举值`http`
50
+ - 响应参数`runtime`新增枚举值`http`
51
+ - 接口`ShowFunctionConfig`响应参数`runtime`新增枚举值`http`
52
+ - 接口`UpdateFunctionMaxInstanceConfig`响应参数`runtime`新增枚举值`http`
53
+ - 接口`ListReservedInstanceConfigs`:
54
+ - 新增响应参数 `reservedinstances`、`page_info`、`count`
55
+ - 移除响应参数 `function_urn`、`qualifier_type`、`qualifier_name`、`min_count`、`idle_mode`、`tactics_config`
56
+ - 接口`CreateFunctionVersion`响应参数`runtime`新增枚举值`http`
57
+ - 接口`ListFunctionVersions`响应参数`runtime`新增枚举值`http`
58
+ - 接口`ImportFunction`响应参数`runtime`新增枚举值`http`
59
+
60
+ ### HuaweiCloud SDK Image
61
+
62
+ - _新增特性_
63
+ - 支持接口`RunQueryCustomTags`、`RunDeleteCustomTags`、`RunImageMediaTaggingDet`
64
+ - _解决问题_
65
+ - 无
66
+ - _特性变更_
67
+ - 接口`RunImageMediaTagging`新增请求参数 `use_default_tags`
68
+
69
+ # 3.1.12 2022-11-30
70
+
71
+ ### HuaweiCloud SDK EIP
72
+
73
+ - _新增特性_
74
+ - 支持接口`DisassociatePublicips`、`AssociatePublicips`
75
+ - _解决问题_
76
+ - 无
77
+ - _特性变更_
78
+ - 无
79
+
80
+ ### HuaweiCloud SDK FunctionGraph
81
+
82
+ - _新增特性_
83
+ - 无
84
+ - _解决问题_
85
+ - 无
86
+ - _特性变更_
87
+ - 接口`ShowTenantMetric`新增请求参数 `metric_type`
88
+
89
+ ### HuaweiCloud SDK SIS
90
+
91
+ - _新增特性_
92
+ - 无
93
+ - _解决问题_
94
+ - 无
95
+ - _特性变更_
96
+ - 接口`PushTranscriberJobs`请求参数`property`新增枚举值`chinese_8k_general`
97
+ - 接口`RunTts`请求参数`property`新增枚举值`chinese_huaxiaoru_common`、`chinese_huaxiaohan_common`、`chinese_huaxiaoning_common`、`chinese_huaxiaozhen_common`、`english_alvin_common`、`english_amy_common`
98
+
1
99
  # 3.1.11 2022-11-24
2
100
 
3
101
  ### 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.13",
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