@huaweicloud/huaweicloud-sdk-core 3.1.45 → 3.1.47

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 (190) hide show
  1. package/ClientBuilder.d.ts +1 -0
  2. package/ClientBuilder.d.ts.map +1 -0
  3. package/ClientBuilder.js +51 -49
  4. package/ClientBuilder.js.map +1 -0
  5. package/HcClient.d.ts +1 -0
  6. package/HcClient.d.ts.map +1 -0
  7. package/HcClient.js +83 -147
  8. package/HcClient.js.map +1 -0
  9. package/SdkResponse.d.ts +1 -0
  10. package/SdkResponse.d.ts.map +1 -0
  11. package/SdkResponse.js +3 -5
  12. package/SdkResponse.js.map +1 -0
  13. package/SdkStreamResponse.d.ts +1 -0
  14. package/SdkStreamResponse.d.ts.map +1 -0
  15. package/SdkStreamResponse.js +3 -5
  16. package/SdkStreamResponse.js.map +1 -0
  17. package/UserOptions.d.ts +1 -0
  18. package/UserOptions.d.ts.map +1 -0
  19. package/UserOptions.js +3 -5
  20. package/UserOptions.js.map +1 -0
  21. package/auth/AKSKSigner.d.ts +1 -0
  22. package/auth/AKSKSigner.d.ts.map +1 -0
  23. package/auth/AKSKSigner.js +106 -125
  24. package/auth/AKSKSigner.js.map +1 -0
  25. package/auth/BasicCredentials.d.ts +1 -0
  26. package/auth/BasicCredentials.d.ts.map +1 -0
  27. package/auth/BasicCredentials.js +80 -130
  28. package/auth/BasicCredentials.js.map +1 -0
  29. package/auth/GlobalCredentials.d.ts +1 -0
  30. package/auth/GlobalCredentials.d.ts.map +1 -0
  31. package/auth/GlobalCredentials.js +75 -127
  32. package/auth/GlobalCredentials.js.map +1 -0
  33. package/auth/ICredential.d.ts +1 -0
  34. package/auth/ICredential.d.ts.map +1 -0
  35. package/auth/ICredential.js +2 -1
  36. package/auth/ICredential.js.map +1 -0
  37. package/exception/ClientRequestException.d.ts +1 -0
  38. package/exception/ClientRequestException.d.ts.map +1 -0
  39. package/exception/ClientRequestException.js +7 -24
  40. package/exception/ClientRequestException.js.map +1 -0
  41. package/exception/ExceptionResponse.d.ts +1 -0
  42. package/exception/ExceptionResponse.d.ts.map +1 -0
  43. package/exception/ExceptionResponse.js +1 -0
  44. package/exception/ExceptionResponse.js.map +1 -0
  45. package/exception/ExceptionUtil.d.ts +1 -0
  46. package/exception/ExceptionUtil.d.ts.map +1 -0
  47. package/exception/ExceptionUtil.js +14 -16
  48. package/exception/ExceptionUtil.js.map +1 -0
  49. package/exception/SdkException.d.ts +1 -0
  50. package/exception/SdkException.d.ts.map +1 -0
  51. package/exception/SdkException.js +6 -23
  52. package/exception/SdkException.js.map +1 -0
  53. package/exception/ServerResponseException.d.ts +1 -0
  54. package/exception/ServerResponseException.d.ts.map +1 -0
  55. package/exception/ServerResponseException.js +7 -24
  56. package/exception/ServerResponseException.js.map +1 -0
  57. package/exception/ServiceResponseException.d.ts +1 -0
  58. package/exception/ServiceResponseException.d.ts.map +1 -0
  59. package/exception/ServiceResponseException.js +12 -29
  60. package/exception/ServiceResponseException.js.map +1 -0
  61. package/http/DefaultHttpClient.d.ts +1 -0
  62. package/http/DefaultHttpClient.d.ts.map +1 -0
  63. package/http/DefaultHttpClient.js +116 -188
  64. package/http/DefaultHttpClient.js.map +1 -0
  65. package/http/DefaultHttpResponse.d.ts +1 -0
  66. package/http/DefaultHttpResponse.d.ts.map +1 -0
  67. package/http/DefaultHttpResponse.js +1 -0
  68. package/http/DefaultHttpResponse.js.map +1 -0
  69. package/http/HttpClient.d.ts +1 -0
  70. package/http/HttpClient.d.ts.map +1 -0
  71. package/http/HttpClient.js +1 -0
  72. package/http/HttpClient.js.map +1 -0
  73. package/http/IHttpRequest.d.ts +1 -0
  74. package/http/IHttpRequest.d.ts.map +1 -0
  75. package/http/IHttpRequest.js +11 -13
  76. package/http/IHttpRequest.js.map +1 -0
  77. package/http/IHttpRequestBuilder.d.ts +1 -0
  78. package/http/IHttpRequestBuilder.d.ts.map +1 -0
  79. package/http/IHttpRequestBuilder.js +32 -32
  80. package/http/IHttpRequestBuilder.js.map +1 -0
  81. package/huaweicloud-sdk-core.d.ts +1 -0
  82. package/huaweicloud-sdk-core.d.ts.map +1 -0
  83. package/huaweicloud-sdk-core.js +1 -0
  84. package/huaweicloud-sdk-core.js.map +1 -0
  85. package/internal/model/AuthProjectResult.d.ts +1 -0
  86. package/internal/model/AuthProjectResult.d.ts.map +1 -0
  87. package/internal/model/AuthProjectResult.js +38 -50
  88. package/internal/model/AuthProjectResult.js.map +1 -0
  89. package/internal/model/Domains.d.ts +1 -0
  90. package/internal/model/Domains.d.ts.map +1 -0
  91. package/internal/model/Domains.js +14 -14
  92. package/internal/model/Domains.js.map +1 -0
  93. package/internal/model/KeystoneCreateProjectOption.d.ts +1 -0
  94. package/internal/model/KeystoneCreateProjectOption.d.ts.map +1 -0
  95. package/internal/model/KeystoneCreateProjectOption.js +4 -4
  96. package/internal/model/KeystoneCreateProjectOption.js.map +1 -0
  97. package/internal/model/KeystoneCreateProjectRequest.d.ts +1 -0
  98. package/internal/model/KeystoneCreateProjectRequest.d.ts.map +1 -0
  99. package/internal/model/KeystoneCreateProjectRequest.js +6 -6
  100. package/internal/model/KeystoneCreateProjectRequest.js.map +1 -0
  101. package/internal/model/KeystoneCreateProjectRequestBody.d.ts +1 -0
  102. package/internal/model/KeystoneCreateProjectRequestBody.d.ts.map +1 -0
  103. package/internal/model/KeystoneCreateProjectRequestBody.js +4 -4
  104. package/internal/model/KeystoneCreateProjectRequestBody.js.map +1 -0
  105. package/internal/model/KeystoneCreateProjectResponse.d.ts +1 -0
  106. package/internal/model/KeystoneCreateProjectResponse.d.ts.map +1 -0
  107. package/internal/model/KeystoneCreateProjectResponse.js +8 -24
  108. package/internal/model/KeystoneCreateProjectResponse.js.map +1 -0
  109. package/internal/model/KeystoneListAuthDomainsRequest.d.ts +1 -0
  110. package/internal/model/KeystoneListAuthDomainsRequest.d.ts.map +1 -0
  111. package/internal/model/KeystoneListAuthDomainsRequest.js +4 -4
  112. package/internal/model/KeystoneListAuthDomainsRequest.js.map +1 -0
  113. package/internal/model/KeystoneListAuthDomainsResponse.d.ts +1 -0
  114. package/internal/model/KeystoneListAuthDomainsResponse.d.ts.map +1 -0
  115. package/internal/model/KeystoneListAuthDomainsResponse.js +10 -26
  116. package/internal/model/KeystoneListAuthDomainsResponse.js.map +1 -0
  117. package/internal/model/KeystoneListProjectsRequest.d.ts +1 -0
  118. package/internal/model/KeystoneListProjectsRequest.d.ts.map +1 -0
  119. package/internal/model/KeystoneListProjectsRequest.js +42 -58
  120. package/internal/model/KeystoneListProjectsRequest.js.map +1 -0
  121. package/internal/model/KeystoneListProjectsResponse.d.ts +1 -0
  122. package/internal/model/KeystoneListProjectsResponse.d.ts.map +1 -0
  123. package/internal/model/KeystoneListProjectsResponse.js +10 -26
  124. package/internal/model/KeystoneListProjectsResponse.js.map +1 -0
  125. package/internal/model/KeystoneListRegionsRequest.d.ts +1 -0
  126. package/internal/model/KeystoneListRegionsRequest.d.ts.map +1 -0
  127. package/internal/model/KeystoneListRegionsRequest.js +4 -4
  128. package/internal/model/KeystoneListRegionsRequest.js.map +1 -0
  129. package/internal/model/KeystoneListRegionsResponse.d.ts +1 -0
  130. package/internal/model/KeystoneListRegionsResponse.d.ts.map +1 -0
  131. package/internal/model/KeystoneListRegionsResponse.js +10 -26
  132. package/internal/model/KeystoneListRegionsResponse.js.map +1 -0
  133. package/internal/model/Links.d.ts +1 -0
  134. package/internal/model/Links.d.ts.map +1 -0
  135. package/internal/model/Links.js +10 -10
  136. package/internal/model/Links.js.map +1 -0
  137. package/internal/model/LinksSelf.d.ts +1 -0
  138. package/internal/model/LinksSelf.d.ts.map +1 -0
  139. package/internal/model/LinksSelf.js +6 -6
  140. package/internal/model/LinksSelf.js.map +1 -0
  141. package/internal/model/ProjectResult.d.ts +1 -0
  142. package/internal/model/ProjectResult.d.ts.map +1 -0
  143. package/internal/model/ProjectResult.js +38 -50
  144. package/internal/model/ProjectResult.js.map +1 -0
  145. package/internal/model/Region.d.ts +1 -0
  146. package/internal/model/Region.d.ts.map +1 -0
  147. package/internal/model/Region.js +20 -24
  148. package/internal/model/Region.js.map +1 -0
  149. package/internal/services/authcache.d.ts +1 -0
  150. package/internal/services/authcache.d.ts.map +1 -0
  151. package/internal/services/authcache.js +11 -11
  152. package/internal/services/authcache.js.map +1 -0
  153. package/internal/services/iam.service.d.ts +1 -0
  154. package/internal/services/iam.service.d.ts.map +1 -0
  155. package/internal/services/iam.service.js +188 -298
  156. package/internal/services/iam.service.js.map +1 -0
  157. package/internal/services/region.servcie.d.ts +1 -0
  158. package/internal/services/region.servcie.d.ts.map +1 -0
  159. package/internal/services/region.servcie.js +18 -63
  160. package/internal/services/region.servcie.js.map +1 -0
  161. package/logger/index.d.ts +1 -0
  162. package/logger/index.d.ts.map +1 -0
  163. package/logger/index.js +40 -68
  164. package/logger/index.js.map +1 -0
  165. package/logger/log4jLogger.d.ts +2 -1
  166. package/logger/log4jLogger.d.ts.map +1 -0
  167. package/logger/log4jLogger.js +3 -2
  168. package/logger/log4jLogger.js.map +1 -0
  169. package/package.json +2 -1
  170. package/public-api.d.ts +1 -0
  171. package/public-api.d.ts.map +1 -0
  172. package/public-api.js +1 -0
  173. package/public-api.js.map +1 -0
  174. package/region/region.d.ts +1 -0
  175. package/region/region.d.ts.map +1 -0
  176. package/region/region.js +5 -6
  177. package/region/region.js.map +1 -0
  178. package/utils/SignerUtil.d.ts +1 -0
  179. package/utils/SignerUtil.d.ts.map +1 -0
  180. package/utils/SignerUtil.js +19 -21
  181. package/utils/SignerUtil.js.map +1 -0
  182. package/utils/constant.d.ts +1 -0
  183. package/utils/constant.d.ts.map +1 -0
  184. package/utils/constant.js +8 -10
  185. package/utils/constant.js.map +1 -0
  186. package/CHANGELOG.md +0 -5946
  187. package/CHANGELOG_CN.md +0 -5952
  188. package/OpenSourceSoftwareNotice.md +0 -20
  189. package/README.md +0 -236
  190. package/README_CN.md +0 -226
@@ -31,3 +31,4 @@ export declare class ClientBuilder<T> {
31
31
  private whichCredential;
32
32
  private getInputParamCredential;
33
33
  }
34
+ //# sourceMappingURL=ClientBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientBuilder.d.ts","sourceRoot":"","sources":["../../core/ClientBuilder.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAW5C,qBAAa,aAAa,CAAC,CAAC;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,SAAS,CAAC,CAAW;IAC7B,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAuD;IAC7E,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,WAAW,CAAsC;gBAEtC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM;IAOpE,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC;IAU3D,cAAc,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAK1D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC;IAKpD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC;IAK5C,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC;IAKnD,KAAK,IAAI,CAAC;IAoCjB;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;IAMpC,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,uBAAuB;CAuBlC"}
package/ClientBuilder.js CHANGED
@@ -44,14 +44,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.ClientBuilder = void 0;
47
- var HcClient_1 = require("./HcClient");
48
- var DefaultHttpClient_1 = require("./http/DefaultHttpClient");
49
- var BasicCredentials_1 = require("./auth/BasicCredentials");
50
- var GlobalCredentials_1 = require("./auth/GlobalCredentials");
51
- var SdkException_1 = require("./exception/SdkException");
52
- var path = __importStar(require("path"));
53
- var ClientBuilder = /** @class */ (function () {
54
- function ClientBuilder(init, credentialType) {
47
+ const HcClient_1 = require("./HcClient");
48
+ const DefaultHttpClient_1 = require("./http/DefaultHttpClient");
49
+ const BasicCredentials_1 = require("./auth/BasicCredentials");
50
+ const GlobalCredentials_1 = require("./auth/GlobalCredentials");
51
+ const SdkException_1 = require("./exception/SdkException");
52
+ const path = __importStar(require("path"));
53
+ class ClientBuilder {
54
+ constructor(init, credentialType) {
55
55
  this.credentialType = ["BasicCredentials", "GlobalCredentials"];
56
56
  this.envParams = process.env;
57
57
  this.credentials = {};
@@ -60,36 +60,35 @@ var ClientBuilder = /** @class */ (function () {
60
60
  this.credentialType = credentialType.split(",");
61
61
  }
62
62
  }
63
- ClientBuilder.prototype.withEndpoint = function (endpoint) {
64
- var _a;
63
+ withEndpoint(endpoint) {
65
64
  this.endpoints = [];
66
65
  if (typeof endpoint === 'string') {
67
66
  this.endpoints.push(endpoint);
68
67
  }
69
68
  else if (Array.isArray(endpoint)) {
70
- (_a = this.endpoints).push.apply(_a, endpoint);
69
+ this.endpoints.push(...endpoint);
71
70
  }
72
71
  return this;
73
- };
74
- ClientBuilder.prototype.withCredential = function (credential) {
72
+ }
73
+ withCredential(credential) {
75
74
  this.credential = credential;
76
75
  return this;
77
- };
78
- ClientBuilder.prototype.withProxyAgent = function (proxyAgent) {
76
+ }
77
+ withProxyAgent(proxyAgent) {
79
78
  this.proxyAgent = proxyAgent;
80
79
  return this;
81
- };
82
- ClientBuilder.prototype.withRegion = function (region) {
80
+ }
81
+ withRegion(region) {
83
82
  this.region = region;
84
83
  return this;
85
- };
86
- ClientBuilder.prototype.withOptions = function (options) {
84
+ }
85
+ withOptions(options) {
87
86
  this.userOptions = options;
88
87
  return this;
89
- };
90
- ClientBuilder.prototype.build = function () {
88
+ }
89
+ build() {
91
90
  var _a, _b;
92
- var axiosOptions = {
91
+ const axiosOptions = {
93
92
  disableSslVerification: true
94
93
  };
95
94
  if (this.proxyAgent) {
@@ -106,17 +105,17 @@ var ClientBuilder = /** @class */ (function () {
106
105
  this.credential = this.getCredentialFromEnvironment();
107
106
  }
108
107
  if (!this.credential) {
109
- throw new SdkException_1.SdkException("credential can not be null, ".concat(this.credentialType, "Credential objects are required"));
108
+ throw new SdkException_1.SdkException(`credential can not be null, ${this.credentialType}Credential objects are required`);
110
109
  }
111
110
  if (this.region) {
112
111
  this.endpoints = this.region.endpoints;
113
112
  }
114
- var client = new DefaultHttpClient_1.DefaultHttpClient(axiosOptions, this.endpoints);
115
- var hcClient = new HcClient_1.HcClient(client);
113
+ const client = new DefaultHttpClient_1.DefaultHttpClient(axiosOptions, this.endpoints);
114
+ const hcClient = new HcClient_1.HcClient(client);
116
115
  this.region && hcClient.withRegion(this.region);
117
116
  hcClient.withCredential(this.credential).withEndpoints(this.endpoints);
118
117
  return this.init(hcClient);
119
- };
118
+ }
120
119
  /**
121
120
  * Get 'HUAWEICLOUD_SDK_TYPE' from environment variables
122
121
  * If the variable does not exist, use the first credential type
@@ -125,52 +124,55 @@ var ClientBuilder = /** @class */ (function () {
125
124
  * If the environment variable is 'GlobalCredentials', assign the domainId
126
125
  * @returns ICredential
127
126
  */
128
- ClientBuilder.prototype.getCredentialFromEnvironment = function () {
129
- var sdkType = process.env.HUAWEICLOUD_SDK_TYPE;
130
- var credentialTYPE = this.whichCredential(sdkType);
127
+ getCredentialFromEnvironment() {
128
+ const sdkType = process.env.HUAWEICLOUD_SDK_TYPE;
129
+ const credentialTYPE = this.whichCredential(sdkType);
131
130
  return this.getInputParamCredential(credentialTYPE, this.envParams);
132
- };
133
- ClientBuilder.prototype.whichCredential = function (sdkType) {
131
+ }
132
+ whichCredential(sdkType) {
134
133
  if (!sdkType) {
135
134
  return new BasicCredentials_1.BasicCredentials();
136
135
  }
137
136
  switch (sdkType) {
138
- case 'BasicCredentials':
137
+ case 'BasicCredentials': {
139
138
  return new BasicCredentials_1.BasicCredentials();
140
- case 'GlobalCredentials':
139
+ }
140
+ case 'GlobalCredentials': {
141
141
  return new GlobalCredentials_1.GlobalCredentials();
142
- default:
142
+ }
143
+ default: {
143
144
  if (this.credentials[sdkType]) {
144
145
  return this.credentials[sdkType];
145
146
  }
146
- var definedCredPath = path.join(this.init().getPath(), "".concat(sdkType));
147
- var credentialTYPE = require(definedCredPath);
147
+ const definedCredPath = path.join(this.init().getPath(), `${sdkType}`);
148
+ const credentialTYPE = require(definedCredPath);
148
149
  this.credentials[sdkType] = new credentialTYPE();
149
150
  return this.credentials[sdkType];
151
+ }
150
152
  }
151
- };
152
- ClientBuilder.prototype.getInputParamCredential = function (CredentialsType, credential) {
153
- var hash = Object.keys(credential)
154
- .filter(function (key) { return key.indexOf("HUAWEICLOUD_SDK_") === 0; })
155
- .reduce(function (acc, key) {
156
- var newKey = key.substring(16);
153
+ }
154
+ getInputParamCredential(CredentialsType, credential) {
155
+ const hash = Object.keys(credential)
156
+ .filter(key => key.indexOf("HUAWEICLOUD_SDK_") === 0)
157
+ .reduce((acc, key) => {
158
+ let newKey = key.substring(16);
157
159
  if (newKey.indexOf('_') === -1) {
158
- newKey = "with".concat(newKey.toLowerCase().replace(/^\w/, function (c) { return c.toUpperCase(); }));
160
+ newKey = `with${newKey.toLowerCase().replace(/^\w/, c => c.toUpperCase())}`;
159
161
  }
160
162
  else {
161
- newKey = newKey.split('_').map(function (word) { return "".concat(word.toLowerCase().replace(/^\w/, function (c) { return c.toUpperCase(); })); }).join('');
162
- newKey = "with".concat(newKey);
163
+ newKey = newKey.split('_').map(word => `${word.toLowerCase().replace(/^\w/, c => c.toUpperCase())}`).join('');
164
+ newKey = `with${newKey}`;
163
165
  }
164
166
  acc[newKey] = credential[key];
165
167
  return acc;
166
168
  }, {});
167
- Object.keys(hash).forEach(function (key) {
169
+ Object.keys(hash).forEach((key) => {
168
170
  if (CredentialsType[key]) {
169
171
  CredentialsType[key](hash[key]);
170
172
  }
171
173
  });
172
174
  return CredentialsType;
173
- };
174
- return ClientBuilder;
175
- }());
175
+ }
176
+ }
176
177
  exports.ClientBuilder = ClientBuilder;
178
+ //# sourceMappingURL=ClientBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientBuilder.js","sourceRoot":"","sources":["../../core/ClientBuilder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAsC;AAEtC,gEAA4E;AAC5E,8DAA2D;AAC3D,gEAA6D;AAC7D,2DAAwD;AAGxD,2CAA6B;AAU7B,MAAa,aAAa;IAWtB,YAAmB,IAA+B,EAAE,cAAuB;QANnE,mBAAc,GAAa,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;QACrE,cAAS,GAAe,OAAO,CAAC,GAAG,CAAC;QAGpC,gBAAW,GAAmC,EAAE,CAAC;QAGrD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,cAAc,EAAE;YAChB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACnD;IACL,CAAC;IAEM,YAAY,CAAC,QAA2B;QAC3C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;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CAAC,EAAE,CAAC,CAAC;gBAC9G,MAAM,GAAG,OAAO,MAAM,EAAE,CAAC;aAC5B;YACD,GAAG,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;YAC9B,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;QAEX,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YACtC,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE;gBACtB,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aACnC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ;AAlJD,sCAkJC"}
package/HcClient.d.ts CHANGED
@@ -31,3 +31,4 @@ export declare class HcClient {
31
31
  private buildRequest;
32
32
  private extractResponse;
33
33
  }
34
+ //# sourceMappingURL=HcClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HcClient.d.ts","sourceRoot":"","sources":["../../core/HcClient.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAqB,MAAM,0BAA0B,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,qBAAa,QAAQ;IACjB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAc;IACvC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,aAAa,CAAC,CAAgB;IACtC,OAAO,CAAC,SAAS,CAAC,CAAW;gBAEjB,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,aAAa;IAUtD,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE;IAIlC,cAAc,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ;IAKlD,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ;IAKrC,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;IAK5C,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,QAAQ;IAK1C,WAAW,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;YAe1E,YAAY;IAmD1B,OAAO,CAAC,eAAe;CAc1B"}
package/HcClient.js CHANGED
@@ -19,51 +19,15 @@
19
19
  * specific language governing permissions and limitations
20
20
  * under the License.
21
21
  */
22
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
23
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
24
- return new (P || (P = Promise))(function (resolve, reject) {
25
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
26
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
27
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
28
- step((generator = generator.apply(thisArg, _arguments || [])).next());
29
- });
30
- };
31
- var __generator = (this && this.__generator) || function (thisArg, body) {
32
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
33
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
34
- function verb(n) { return function (v) { return step([n, v]); }; }
35
- function step(op) {
36
- if (f) throw new TypeError("Generator is already executing.");
37
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
38
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
39
- if (y = 0, t) op = [op[0] & 2, t.value];
40
- switch (op[0]) {
41
- case 0: case 1: t = op; break;
42
- case 4: _.label++; return { value: op[1], done: false };
43
- case 5: _.label++; y = op[1]; op = [0]; continue;
44
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
45
- default:
46
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
47
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
48
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
49
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
50
- if (t[2]) _.ops.pop();
51
- _.trys.pop(); continue;
52
- }
53
- op = body.call(thisArg, _);
54
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
55
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
56
- }
57
- };
58
22
  Object.defineProperty(exports, "__esModule", { value: true });
59
23
  exports.HcClient = void 0;
60
- var IHttpRequestBuilder_1 = require("./http/IHttpRequestBuilder");
61
- var ExceptionUtil_1 = require("./exception/ExceptionUtil");
62
- var logger_1 = require("./logger");
63
- var SdkStreamResponse_1 = require("./SdkStreamResponse");
64
- var DefaultHttpClient_1 = require("./http/DefaultHttpClient");
65
- var HcClient = exports.HcClient = /** @class */ (function () {
66
- function HcClient(client, clientOptions) {
24
+ const IHttpRequestBuilder_1 = require("./http/IHttpRequestBuilder");
25
+ const ExceptionUtil_1 = require("./exception/ExceptionUtil");
26
+ const logger_1 = require("./logger");
27
+ const SdkStreamResponse_1 = require("./SdkStreamResponse");
28
+ const DefaultHttpClient_1 = require("./http/DefaultHttpClient");
29
+ class HcClient {
30
+ constructor(client, clientOptions) {
67
31
  this.proxyAgent = '';
68
32
  this.httpClient = client;
69
33
  // Logging
@@ -71,126 +35,98 @@ var HcClient = exports.HcClient = /** @class */ (function () {
71
35
  this.logger.debug('initialized');
72
36
  this.clientOptions = clientOptions;
73
37
  }
74
- HcClient.prototype.withEndpoints = function (endpoints) {
38
+ withEndpoints(endpoints) {
75
39
  this.endpoints = endpoints;
76
40
  return this;
77
- };
78
- HcClient.prototype.withCredential = function (credential) {
41
+ }
42
+ withCredential(credential) {
79
43
  this.credential = credential;
80
44
  return this;
81
- };
82
- HcClient.prototype.withRegion = function (region) {
45
+ }
46
+ withRegion(region) {
83
47
  this.region = region;
84
48
  return this;
85
- };
86
- HcClient.prototype.withHttpsAgent = function (proxyAgent) {
49
+ }
50
+ withHttpsAgent(proxyAgent) {
87
51
  this.proxyAgent = proxyAgent;
88
52
  return this;
89
- };
90
- HcClient.prototype.overrideEndpoints = function (endpoint) {
91
- var client = new DefaultHttpClient_1.DefaultHttpClient(this.clientOptions, endpoint);
53
+ }
54
+ overrideEndpoints(endpoint) {
55
+ const client = new DefaultHttpClient_1.DefaultHttpClient(this.clientOptions, endpoint);
92
56
  return new HcClient(client, this.clientOptions).withCredential(this.credential).withEndpoints(endpoint);
93
- };
94
- HcClient.prototype.sendRequest = function (options) {
95
- return __awaiter(this, void 0, void 0, function () {
96
- var request, response, error_1;
97
- return __generator(this, function (_a) {
98
- switch (_a.label) {
99
- case 0:
100
- this.logger.debug('send request');
101
- this.httpClient.credentials = this.credential;
102
- return [4 /*yield*/, this.buildRequest(options)];
103
- case 1:
104
- request = _a.sent();
105
- this.httpClient.httpRequest = request;
106
- _a.label = 2;
107
- case 2:
108
- _a.trys.push([2, 4, , 5]);
109
- return [4 /*yield*/, this.httpClient.sendRequest(request)];
110
- case 3:
111
- response = _a.sent();
112
- return [2 /*return*/, this.extractResponse(response)];
113
- case 4:
114
- error_1 = _a.sent();
115
- throw ExceptionUtil_1.ExceptionUtil.generalException(error_1);
116
- case 5: return [2 /*return*/];
117
- }
118
- });
119
- });
120
- };
121
- HcClient.prototype.buildRequest = function (options) {
57
+ }
58
+ async sendRequest(options) {
59
+ this.logger.debug('send request');
60
+ this.httpClient.credentials = this.credential;
61
+ const request = await this.buildRequest(options);
62
+ this.httpClient.httpRequest = request;
63
+ try {
64
+ const response = await this.httpClient.sendRequest(request);
65
+ return this.extractResponse(response);
66
+ }
67
+ catch (error) {
68
+ throw ExceptionUtil_1.ExceptionUtil.generalException(error);
69
+ }
70
+ }
71
+ async buildRequest(options) {
122
72
  var _a;
123
- return __awaiter(this, void 0, void 0, function () {
124
- var _b, url, builder, httpRequest;
125
- return __generator(this, function (_c) {
126
- switch (_c.label) {
127
- case 0:
128
- if (!this.region) return [3 /*break*/, 2];
129
- _b = this;
130
- return [4 /*yield*/, this.credential.processAuthParams(this, this.region.id)];
131
- case 1:
132
- _b.credential = _c.sent();
133
- _c.label = 2;
134
- case 2:
135
- url = "".concat(options.url);
136
- Object.entries(options.pathParams).forEach(function (_a) {
137
- var key = _a[0], value = _a[1];
138
- url = url.replace("{".concat(key, "}"), value + '');
139
- });
140
- if (options.method === 'DELETE'
141
- && (options.data && (Object.keys(options.data).length <= 0 || options.data.length <= 0))) {
142
- delete options.data;
143
- }
144
- if ((_a = options.headers) === null || _a === void 0 ? void 0 : _a['Content-Type']) {
145
- delete options.headers['Content-Type'];
146
- }
147
- if (options.contentType) {
148
- if (!options.headers) {
149
- options.headers = {};
150
- }
151
- options.headers['content-type'] = options.contentType.toLowerCase().includes('application/json')
152
- ? 'application/json'
153
- : options.contentType;
154
- }
155
- builder = new IHttpRequestBuilder_1.HttpRequestBuilder();
156
- httpRequest = builder
157
- .withEndpoint(this.endpoints[0])
158
- .withUrl(url)
159
- .withHeaders(options.headers)
160
- .withMethod(options.method)
161
- .withPathParams(options.pathParams)
162
- .withData(options.data)
163
- .withQueryParams(options.queryParams)
164
- .build();
165
- return [4 /*yield*/, this.credential.processAuthRequest(httpRequest)];
166
- case 3:
167
- httpRequest = _c.sent();
168
- if (options['responseHeaders']) {
169
- httpRequest['responseHeaders'] = options['responseHeaders'];
170
- }
171
- httpRequest.proxy = this.proxyAgent;
172
- if (options.axiosRequestConfig) {
173
- httpRequest.axiosRequestConfig = options.axiosRequestConfig;
174
- }
175
- return [2 /*return*/, httpRequest];
176
- }
177
- });
73
+ if (this.region) {
74
+ this.credential = await this.credential.processAuthParams(this, this.region.id);
75
+ }
76
+ let url = `${options.url}`;
77
+ Object.entries(options.pathParams).forEach(([key, value]) => {
78
+ url = url.replace(`{${key}}`, value + '');
178
79
  });
179
- };
180
- HcClient.prototype.extractResponse = function (result) {
80
+ if (options.method === 'DELETE'
81
+ && (options.data && (Object.keys(options.data).length <= 0 || options.data.length <= 0))) {
82
+ delete options.data;
83
+ }
84
+ if ((_a = options.headers) === null || _a === void 0 ? void 0 : _a['Content-Type']) {
85
+ delete options.headers['Content-Type'];
86
+ }
87
+ if (options.contentType) {
88
+ if (!options.headers) {
89
+ options.headers = {};
90
+ }
91
+ options.headers['content-type'] = options.contentType.toLowerCase().includes('application/json')
92
+ ? 'application/json'
93
+ : options.contentType;
94
+ }
95
+ const builder = new IHttpRequestBuilder_1.HttpRequestBuilder();
96
+ let httpRequest = builder
97
+ .withEndpoint(this.endpoints[0])
98
+ .withUrl(url)
99
+ .withHeaders(options.headers)
100
+ .withMethod(options.method)
101
+ .withPathParams(options.pathParams)
102
+ .withData(options.data)
103
+ .withQueryParams(options.queryParams)
104
+ .build();
105
+ httpRequest = await this.credential.processAuthRequest(httpRequest);
106
+ if (options['responseHeaders']) {
107
+ httpRequest['responseHeaders'] = options['responseHeaders'];
108
+ }
109
+ httpRequest.proxy = this.proxyAgent;
110
+ if (options.axiosRequestConfig) {
111
+ httpRequest.axiosRequestConfig = options.axiosRequestConfig;
112
+ }
113
+ return httpRequest;
114
+ }
115
+ extractResponse(result) {
181
116
  var _a;
182
- var headers = result.headers;
183
- var contentType = (_a = headers['content-type']) === null || _a === void 0 ? void 0 : _a.toLowerCase();
117
+ const headers = result.headers;
118
+ const contentType = (_a = headers['content-type']) === null || _a === void 0 ? void 0 : _a.toLowerCase();
184
119
  if (/(application\/octet-stream|image|application\/zip)/.test(contentType)) {
185
- var streamRes = new SdkStreamResponse_1.SdkStreamResponse();
120
+ const streamRes = new SdkStreamResponse_1.SdkStreamResponse();
186
121
  streamRes.body = result.data;
187
122
  streamRes.httpStatusCode = result.statusCode;
188
123
  return streamRes;
189
124
  }
190
- var response = typeof result.data === 'object' ? result.data : {};
125
+ const response = typeof result.data === 'object' ? result.data : {};
191
126
  response.httpStatusCode = result.statusCode;
192
127
  return response;
193
- };
194
- HcClient.loggerName = 'HcClient';
195
- return HcClient;
196
- }());
128
+ }
129
+ }
130
+ exports.HcClient = HcClient;
131
+ HcClient.loggerName = 'HcClient';
132
+ //# sourceMappingURL=HcClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HcClient.js","sourceRoot":"","sources":["../../core/HcClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAKH,oEAAgE;AAEhE,6DAA0D;AAC1D,qCAAuD;AAGvD,2DAAwD;AACxD,gEAA4E;AAY5E,MAAa,QAAQ;IAUjB,YAAY,MAAkB,EAAE,aAA6B;QAPrD,eAAU,GAAG,EAAE,CAAC;QAQpB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QAEzB,UAAU;QACV,IAAI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AE;YACxE,MAAM,SAAS,GAAG,IAAI,qCAAiB,EAAE,CAAC;YAC1C,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;YAC7B,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC;YAC7C,OAAO,SAAc,CAAC;SACzB;QAED,MAAM,QAAQ,GAAG,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAO,CAAC;QACzE,QAAQ,CAAC,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC;QAC5C,OAAO,QAAQ,CAAC;IACpB,CAAC;;AA3HL,4BA4HC;AAxHkB,mBAAU,GAAG,UAAU,CAAC"}
package/SdkResponse.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export declare class SdkResponse {
2
2
  httpStatusCode?: number;
3
3
  }
4
+ //# sourceMappingURL=SdkResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkResponse.d.ts","sourceRoot":"","sources":["../../core/SdkResponse.ts"],"names":[],"mappings":"AAqBA,qBAAa,WAAW;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
package/SdkResponse.js CHANGED
@@ -21,9 +21,7 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.SdkResponse = void 0;
24
- var SdkResponse = /** @class */ (function () {
25
- function SdkResponse() {
26
- }
27
- return SdkResponse;
28
- }());
24
+ class SdkResponse {
25
+ }
29
26
  exports.SdkResponse = SdkResponse;
27
+ //# sourceMappingURL=SdkResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkResponse.js","sourceRoot":"","sources":["../../core/SdkResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,MAAa,WAAW;CAEvB;AAFD,kCAEC"}
@@ -2,3 +2,4 @@ export declare class SdkStreamResponse {
2
2
  httpStatusCode?: number;
3
3
  body?: any;
4
4
  }
5
+ //# sourceMappingURL=SdkStreamResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkStreamResponse.d.ts","sourceRoot":"","sources":["../../core/SdkStreamResponse.ts"],"names":[],"mappings":"AAqBA,qBAAa,iBAAiB;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd"}
@@ -21,9 +21,7 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.SdkStreamResponse = void 0;
24
- var SdkStreamResponse = /** @class */ (function () {
25
- function SdkStreamResponse() {
26
- }
27
- return SdkStreamResponse;
28
- }());
24
+ class SdkStreamResponse {
25
+ }
29
26
  exports.SdkStreamResponse = SdkStreamResponse;
27
+ //# sourceMappingURL=SdkStreamResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkStreamResponse.js","sourceRoot":"","sources":["../../core/SdkStreamResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,MAAa,iBAAiB;CAG7B;AAHD,8CAGC"}
package/UserOptions.d.ts CHANGED
@@ -3,3 +3,4 @@ export declare class UserOptions {
3
3
  customUserAgent?: string;
4
4
  axiosRequestConfig?: AxiosRequestConfig;
5
5
  }
6
+ //# sourceMappingURL=UserOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserOptions.d.ts","sourceRoot":"","sources":["../../core/UserOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE3C,qBAAa,WAAW;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CAC3C"}
package/UserOptions.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserOptions = void 0;
4
- var UserOptions = /** @class */ (function () {
5
- function UserOptions() {
6
- }
7
- return UserOptions;
8
- }());
4
+ class UserOptions {
5
+ }
9
6
  exports.UserOptions = UserOptions;
7
+ //# sourceMappingURL=UserOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserOptions.js","sourceRoot":"","sources":["../../core/UserOptions.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;CAGvB;AAHD,kCAGC"}
@@ -32,3 +32,4 @@ export declare class RequiredError extends Error {
32
32
  name: "RequiredError";
33
33
  constructor(field: string, msg?: string);
34
34
  }
35
+ //# sourceMappingURL=AKSKSigner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AKSKSigner.d.ts","sourceRoot":"","sources":["../../../core/auth/AKSKSigner.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU;IACnB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAsE;IACtG,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAqB;IACzD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAqB;IACnD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAgB;IAC1C,OAAO,CAAC,MAAM,CAAC,UAAU,CAAU;IACnC,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAA0B;IAE5D,OAAO,CAAC,MAAM,CAAC,GAAG,CAAgB;IAClC,OAAO,CAAC,MAAM,CAAC,QAAQ;IAQvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CASrB;WAEY,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW;IAqDjE,OAAO,CAAC,MAAM,CAAC,YAAY;IAiB3B,OAAO,CAAC,MAAM,CAAC,GAAG,CAKhB;IAGF,OAAO,CAAC,MAAM,CAAC,UAAU,CAMvB;IAEF,OAAO,CAAC,MAAM,CAAC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