@aws-sdk/client-cloudsearch 3.186.0 → 3.190.0

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 (39) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-cjs/protocols/Aws_query.js +8 -4
  3. package/dist-es/CloudSearch.js +106 -113
  4. package/dist-es/CloudSearchClient.js +22 -28
  5. package/dist-es/commands/BuildSuggestersCommand.js +21 -28
  6. package/dist-es/commands/CreateDomainCommand.js +21 -28
  7. package/dist-es/commands/DefineAnalysisSchemeCommand.js +21 -28
  8. package/dist-es/commands/DefineExpressionCommand.js +21 -28
  9. package/dist-es/commands/DefineIndexFieldCommand.js +21 -28
  10. package/dist-es/commands/DefineSuggesterCommand.js +21 -28
  11. package/dist-es/commands/DeleteAnalysisSchemeCommand.js +21 -28
  12. package/dist-es/commands/DeleteDomainCommand.js +21 -28
  13. package/dist-es/commands/DeleteExpressionCommand.js +21 -28
  14. package/dist-es/commands/DeleteIndexFieldCommand.js +21 -28
  15. package/dist-es/commands/DeleteSuggesterCommand.js +21 -28
  16. package/dist-es/commands/DescribeAnalysisSchemesCommand.js +21 -28
  17. package/dist-es/commands/DescribeAvailabilityOptionsCommand.js +21 -28
  18. package/dist-es/commands/DescribeDomainEndpointOptionsCommand.js +21 -28
  19. package/dist-es/commands/DescribeDomainsCommand.js +21 -28
  20. package/dist-es/commands/DescribeExpressionsCommand.js +21 -28
  21. package/dist-es/commands/DescribeIndexFieldsCommand.js +21 -28
  22. package/dist-es/commands/DescribeScalingParametersCommand.js +21 -28
  23. package/dist-es/commands/DescribeServiceAccessPoliciesCommand.js +21 -28
  24. package/dist-es/commands/DescribeSuggestersCommand.js +21 -28
  25. package/dist-es/commands/IndexDocumentsCommand.js +21 -28
  26. package/dist-es/commands/ListDomainNamesCommand.js +22 -29
  27. package/dist-es/commands/UpdateAvailabilityOptionsCommand.js +21 -28
  28. package/dist-es/commands/UpdateDomainEndpointOptionsCommand.js +21 -28
  29. package/dist-es/commands/UpdateScalingParametersCommand.js +21 -28
  30. package/dist-es/commands/UpdateServiceAccessPoliciesCommand.js +21 -28
  31. package/dist-es/endpoints.js +8 -8
  32. package/dist-es/models/CloudSearchServiceException.js +5 -10
  33. package/dist-es/models/models_0.js +350 -187
  34. package/dist-es/protocols/Aws_query.js +1893 -2485
  35. package/dist-es/runtimeConfig.browser.js +26 -12
  36. package/dist-es/runtimeConfig.js +30 -12
  37. package/dist-es/runtimeConfig.native.js +8 -5
  38. package/dist-es/runtimeConfig.shared.js +8 -11
  39. package/package.json +34 -35
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-cloudsearch
9
+
10
+
11
+
12
+
13
+
14
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-cloudsearch
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/client-cloudsearch
@@ -4,7 +4,6 @@ exports.deserializeAws_queryUpdateDomainEndpointOptionsCommand = exports.deseria
4
4
  exports.deserializeAws_queryUpdateServiceAccessPoliciesCommand = exports.deserializeAws_queryUpdateScalingParametersCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
- const entities_1 = require("entities");
8
7
  const fast_xml_parser_1 = require("fast-xml-parser");
9
8
  const CloudSearchServiceException_1 = require("../models/CloudSearchServiceException");
10
9
  const models_0_1 = require("../models/models_0");
@@ -3437,13 +3436,18 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
3437
3436
  };
3438
3437
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3439
3438
  if (encoded.length) {
3440
- const parsedObj = (0, fast_xml_parser_1.parse)(encoded, {
3439
+ const parser = new fast_xml_parser_1.XMLParser({
3441
3440
  attributeNamePrefix: "",
3441
+ htmlEntities: true,
3442
3442
  ignoreAttributes: false,
3443
- parseNodeValue: false,
3443
+ ignoreDeclaration: true,
3444
+ parseTagValue: false,
3444
3445
  trimValues: false,
3445
- tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : (0, entities_1.decodeHTML)(val)),
3446
+ tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
3446
3447
  });
3448
+ parser.addEntity("#xD", "\r");
3449
+ parser.addEntity("#10", "\n");
3450
+ const parsedObj = parser.parse(encoded);
3447
3451
  const textNodeName = "#text";
3448
3452
  const key = Object.keys(parsedObj)[0];
3449
3453
  const parsedObjToReturn = parsedObj[key];
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CloudSearchClient } from "./CloudSearchClient";
3
2
  import { BuildSuggestersCommand, } from "./commands/BuildSuggestersCommand";
4
3
  import { CreateDomainCommand, } from "./commands/CreateDomainCommand";
@@ -26,375 +25,369 @@ import { UpdateAvailabilityOptionsCommand, } from "./commands/UpdateAvailability
26
25
  import { UpdateDomainEndpointOptionsCommand, } from "./commands/UpdateDomainEndpointOptionsCommand";
27
26
  import { UpdateScalingParametersCommand, } from "./commands/UpdateScalingParametersCommand";
28
27
  import { UpdateServiceAccessPoliciesCommand, } from "./commands/UpdateServiceAccessPoliciesCommand";
29
- var CloudSearch = (function (_super) {
30
- __extends(CloudSearch, _super);
31
- function CloudSearch() {
32
- return _super !== null && _super.apply(this, arguments) || this;
33
- }
34
- CloudSearch.prototype.buildSuggesters = function (args, optionsOrCb, cb) {
35
- var command = new BuildSuggestersCommand(args);
28
+ export class CloudSearch extends CloudSearchClient {
29
+ buildSuggesters(args, optionsOrCb, cb) {
30
+ const command = new BuildSuggestersCommand(args);
36
31
  if (typeof optionsOrCb === "function") {
37
32
  this.send(command, optionsOrCb);
38
33
  }
39
34
  else if (typeof cb === "function") {
40
35
  if (typeof optionsOrCb !== "object")
41
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
36
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
42
37
  this.send(command, optionsOrCb || {}, cb);
43
38
  }
44
39
  else {
45
40
  return this.send(command, optionsOrCb);
46
41
  }
47
- };
48
- CloudSearch.prototype.createDomain = function (args, optionsOrCb, cb) {
49
- var command = new CreateDomainCommand(args);
42
+ }
43
+ createDomain(args, optionsOrCb, cb) {
44
+ const command = new CreateDomainCommand(args);
50
45
  if (typeof optionsOrCb === "function") {
51
46
  this.send(command, optionsOrCb);
52
47
  }
53
48
  else if (typeof cb === "function") {
54
49
  if (typeof optionsOrCb !== "object")
55
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
50
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
56
51
  this.send(command, optionsOrCb || {}, cb);
57
52
  }
58
53
  else {
59
54
  return this.send(command, optionsOrCb);
60
55
  }
61
- };
62
- CloudSearch.prototype.defineAnalysisScheme = function (args, optionsOrCb, cb) {
63
- var command = new DefineAnalysisSchemeCommand(args);
56
+ }
57
+ defineAnalysisScheme(args, optionsOrCb, cb) {
58
+ const command = new DefineAnalysisSchemeCommand(args);
64
59
  if (typeof optionsOrCb === "function") {
65
60
  this.send(command, optionsOrCb);
66
61
  }
67
62
  else if (typeof cb === "function") {
68
63
  if (typeof optionsOrCb !== "object")
69
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
64
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
70
65
  this.send(command, optionsOrCb || {}, cb);
71
66
  }
72
67
  else {
73
68
  return this.send(command, optionsOrCb);
74
69
  }
75
- };
76
- CloudSearch.prototype.defineExpression = function (args, optionsOrCb, cb) {
77
- var command = new DefineExpressionCommand(args);
70
+ }
71
+ defineExpression(args, optionsOrCb, cb) {
72
+ const command = new DefineExpressionCommand(args);
78
73
  if (typeof optionsOrCb === "function") {
79
74
  this.send(command, optionsOrCb);
80
75
  }
81
76
  else if (typeof cb === "function") {
82
77
  if (typeof optionsOrCb !== "object")
83
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
78
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
84
79
  this.send(command, optionsOrCb || {}, cb);
85
80
  }
86
81
  else {
87
82
  return this.send(command, optionsOrCb);
88
83
  }
89
- };
90
- CloudSearch.prototype.defineIndexField = function (args, optionsOrCb, cb) {
91
- var command = new DefineIndexFieldCommand(args);
84
+ }
85
+ defineIndexField(args, optionsOrCb, cb) {
86
+ const command = new DefineIndexFieldCommand(args);
92
87
  if (typeof optionsOrCb === "function") {
93
88
  this.send(command, optionsOrCb);
94
89
  }
95
90
  else if (typeof cb === "function") {
96
91
  if (typeof optionsOrCb !== "object")
97
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
92
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
98
93
  this.send(command, optionsOrCb || {}, cb);
99
94
  }
100
95
  else {
101
96
  return this.send(command, optionsOrCb);
102
97
  }
103
- };
104
- CloudSearch.prototype.defineSuggester = function (args, optionsOrCb, cb) {
105
- var command = new DefineSuggesterCommand(args);
98
+ }
99
+ defineSuggester(args, optionsOrCb, cb) {
100
+ const command = new DefineSuggesterCommand(args);
106
101
  if (typeof optionsOrCb === "function") {
107
102
  this.send(command, optionsOrCb);
108
103
  }
109
104
  else if (typeof cb === "function") {
110
105
  if (typeof optionsOrCb !== "object")
111
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
106
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
112
107
  this.send(command, optionsOrCb || {}, cb);
113
108
  }
114
109
  else {
115
110
  return this.send(command, optionsOrCb);
116
111
  }
117
- };
118
- CloudSearch.prototype.deleteAnalysisScheme = function (args, optionsOrCb, cb) {
119
- var command = new DeleteAnalysisSchemeCommand(args);
112
+ }
113
+ deleteAnalysisScheme(args, optionsOrCb, cb) {
114
+ const command = new DeleteAnalysisSchemeCommand(args);
120
115
  if (typeof optionsOrCb === "function") {
121
116
  this.send(command, optionsOrCb);
122
117
  }
123
118
  else if (typeof cb === "function") {
124
119
  if (typeof optionsOrCb !== "object")
125
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
120
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
126
121
  this.send(command, optionsOrCb || {}, cb);
127
122
  }
128
123
  else {
129
124
  return this.send(command, optionsOrCb);
130
125
  }
131
- };
132
- CloudSearch.prototype.deleteDomain = function (args, optionsOrCb, cb) {
133
- var command = new DeleteDomainCommand(args);
126
+ }
127
+ deleteDomain(args, optionsOrCb, cb) {
128
+ const command = new DeleteDomainCommand(args);
134
129
  if (typeof optionsOrCb === "function") {
135
130
  this.send(command, optionsOrCb);
136
131
  }
137
132
  else if (typeof cb === "function") {
138
133
  if (typeof optionsOrCb !== "object")
139
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
134
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
140
135
  this.send(command, optionsOrCb || {}, cb);
141
136
  }
142
137
  else {
143
138
  return this.send(command, optionsOrCb);
144
139
  }
145
- };
146
- CloudSearch.prototype.deleteExpression = function (args, optionsOrCb, cb) {
147
- var command = new DeleteExpressionCommand(args);
140
+ }
141
+ deleteExpression(args, optionsOrCb, cb) {
142
+ const command = new DeleteExpressionCommand(args);
148
143
  if (typeof optionsOrCb === "function") {
149
144
  this.send(command, optionsOrCb);
150
145
  }
151
146
  else if (typeof cb === "function") {
152
147
  if (typeof optionsOrCb !== "object")
153
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
148
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
154
149
  this.send(command, optionsOrCb || {}, cb);
155
150
  }
156
151
  else {
157
152
  return this.send(command, optionsOrCb);
158
153
  }
159
- };
160
- CloudSearch.prototype.deleteIndexField = function (args, optionsOrCb, cb) {
161
- var command = new DeleteIndexFieldCommand(args);
154
+ }
155
+ deleteIndexField(args, optionsOrCb, cb) {
156
+ const command = new DeleteIndexFieldCommand(args);
162
157
  if (typeof optionsOrCb === "function") {
163
158
  this.send(command, optionsOrCb);
164
159
  }
165
160
  else if (typeof cb === "function") {
166
161
  if (typeof optionsOrCb !== "object")
167
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
162
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
168
163
  this.send(command, optionsOrCb || {}, cb);
169
164
  }
170
165
  else {
171
166
  return this.send(command, optionsOrCb);
172
167
  }
173
- };
174
- CloudSearch.prototype.deleteSuggester = function (args, optionsOrCb, cb) {
175
- var command = new DeleteSuggesterCommand(args);
168
+ }
169
+ deleteSuggester(args, optionsOrCb, cb) {
170
+ const command = new DeleteSuggesterCommand(args);
176
171
  if (typeof optionsOrCb === "function") {
177
172
  this.send(command, optionsOrCb);
178
173
  }
179
174
  else if (typeof cb === "function") {
180
175
  if (typeof optionsOrCb !== "object")
181
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
176
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
182
177
  this.send(command, optionsOrCb || {}, cb);
183
178
  }
184
179
  else {
185
180
  return this.send(command, optionsOrCb);
186
181
  }
187
- };
188
- CloudSearch.prototype.describeAnalysisSchemes = function (args, optionsOrCb, cb) {
189
- var command = new DescribeAnalysisSchemesCommand(args);
182
+ }
183
+ describeAnalysisSchemes(args, optionsOrCb, cb) {
184
+ const command = new DescribeAnalysisSchemesCommand(args);
190
185
  if (typeof optionsOrCb === "function") {
191
186
  this.send(command, optionsOrCb);
192
187
  }
193
188
  else if (typeof cb === "function") {
194
189
  if (typeof optionsOrCb !== "object")
195
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
190
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
196
191
  this.send(command, optionsOrCb || {}, cb);
197
192
  }
198
193
  else {
199
194
  return this.send(command, optionsOrCb);
200
195
  }
201
- };
202
- CloudSearch.prototype.describeAvailabilityOptions = function (args, optionsOrCb, cb) {
203
- var command = new DescribeAvailabilityOptionsCommand(args);
196
+ }
197
+ describeAvailabilityOptions(args, optionsOrCb, cb) {
198
+ const command = new DescribeAvailabilityOptionsCommand(args);
204
199
  if (typeof optionsOrCb === "function") {
205
200
  this.send(command, optionsOrCb);
206
201
  }
207
202
  else if (typeof cb === "function") {
208
203
  if (typeof optionsOrCb !== "object")
209
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
204
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
210
205
  this.send(command, optionsOrCb || {}, cb);
211
206
  }
212
207
  else {
213
208
  return this.send(command, optionsOrCb);
214
209
  }
215
- };
216
- CloudSearch.prototype.describeDomainEndpointOptions = function (args, optionsOrCb, cb) {
217
- var command = new DescribeDomainEndpointOptionsCommand(args);
210
+ }
211
+ describeDomainEndpointOptions(args, optionsOrCb, cb) {
212
+ const command = new DescribeDomainEndpointOptionsCommand(args);
218
213
  if (typeof optionsOrCb === "function") {
219
214
  this.send(command, optionsOrCb);
220
215
  }
221
216
  else if (typeof cb === "function") {
222
217
  if (typeof optionsOrCb !== "object")
223
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
218
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
224
219
  this.send(command, optionsOrCb || {}, cb);
225
220
  }
226
221
  else {
227
222
  return this.send(command, optionsOrCb);
228
223
  }
229
- };
230
- CloudSearch.prototype.describeDomains = function (args, optionsOrCb, cb) {
231
- var command = new DescribeDomainsCommand(args);
224
+ }
225
+ describeDomains(args, optionsOrCb, cb) {
226
+ const command = new DescribeDomainsCommand(args);
232
227
  if (typeof optionsOrCb === "function") {
233
228
  this.send(command, optionsOrCb);
234
229
  }
235
230
  else if (typeof cb === "function") {
236
231
  if (typeof optionsOrCb !== "object")
237
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
232
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
238
233
  this.send(command, optionsOrCb || {}, cb);
239
234
  }
240
235
  else {
241
236
  return this.send(command, optionsOrCb);
242
237
  }
243
- };
244
- CloudSearch.prototype.describeExpressions = function (args, optionsOrCb, cb) {
245
- var command = new DescribeExpressionsCommand(args);
238
+ }
239
+ describeExpressions(args, optionsOrCb, cb) {
240
+ const command = new DescribeExpressionsCommand(args);
246
241
  if (typeof optionsOrCb === "function") {
247
242
  this.send(command, optionsOrCb);
248
243
  }
249
244
  else if (typeof cb === "function") {
250
245
  if (typeof optionsOrCb !== "object")
251
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
246
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
252
247
  this.send(command, optionsOrCb || {}, cb);
253
248
  }
254
249
  else {
255
250
  return this.send(command, optionsOrCb);
256
251
  }
257
- };
258
- CloudSearch.prototype.describeIndexFields = function (args, optionsOrCb, cb) {
259
- var command = new DescribeIndexFieldsCommand(args);
252
+ }
253
+ describeIndexFields(args, optionsOrCb, cb) {
254
+ const command = new DescribeIndexFieldsCommand(args);
260
255
  if (typeof optionsOrCb === "function") {
261
256
  this.send(command, optionsOrCb);
262
257
  }
263
258
  else if (typeof cb === "function") {
264
259
  if (typeof optionsOrCb !== "object")
265
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
260
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
266
261
  this.send(command, optionsOrCb || {}, cb);
267
262
  }
268
263
  else {
269
264
  return this.send(command, optionsOrCb);
270
265
  }
271
- };
272
- CloudSearch.prototype.describeScalingParameters = function (args, optionsOrCb, cb) {
273
- var command = new DescribeScalingParametersCommand(args);
266
+ }
267
+ describeScalingParameters(args, optionsOrCb, cb) {
268
+ const command = new DescribeScalingParametersCommand(args);
274
269
  if (typeof optionsOrCb === "function") {
275
270
  this.send(command, optionsOrCb);
276
271
  }
277
272
  else if (typeof cb === "function") {
278
273
  if (typeof optionsOrCb !== "object")
279
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
274
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
280
275
  this.send(command, optionsOrCb || {}, cb);
281
276
  }
282
277
  else {
283
278
  return this.send(command, optionsOrCb);
284
279
  }
285
- };
286
- CloudSearch.prototype.describeServiceAccessPolicies = function (args, optionsOrCb, cb) {
287
- var command = new DescribeServiceAccessPoliciesCommand(args);
280
+ }
281
+ describeServiceAccessPolicies(args, optionsOrCb, cb) {
282
+ const command = new DescribeServiceAccessPoliciesCommand(args);
288
283
  if (typeof optionsOrCb === "function") {
289
284
  this.send(command, optionsOrCb);
290
285
  }
291
286
  else if (typeof cb === "function") {
292
287
  if (typeof optionsOrCb !== "object")
293
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
288
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
294
289
  this.send(command, optionsOrCb || {}, cb);
295
290
  }
296
291
  else {
297
292
  return this.send(command, optionsOrCb);
298
293
  }
299
- };
300
- CloudSearch.prototype.describeSuggesters = function (args, optionsOrCb, cb) {
301
- var command = new DescribeSuggestersCommand(args);
294
+ }
295
+ describeSuggesters(args, optionsOrCb, cb) {
296
+ const command = new DescribeSuggestersCommand(args);
302
297
  if (typeof optionsOrCb === "function") {
303
298
  this.send(command, optionsOrCb);
304
299
  }
305
300
  else if (typeof cb === "function") {
306
301
  if (typeof optionsOrCb !== "object")
307
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
302
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
308
303
  this.send(command, optionsOrCb || {}, cb);
309
304
  }
310
305
  else {
311
306
  return this.send(command, optionsOrCb);
312
307
  }
313
- };
314
- CloudSearch.prototype.indexDocuments = function (args, optionsOrCb, cb) {
315
- var command = new IndexDocumentsCommand(args);
308
+ }
309
+ indexDocuments(args, optionsOrCb, cb) {
310
+ const command = new IndexDocumentsCommand(args);
316
311
  if (typeof optionsOrCb === "function") {
317
312
  this.send(command, optionsOrCb);
318
313
  }
319
314
  else if (typeof cb === "function") {
320
315
  if (typeof optionsOrCb !== "object")
321
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
316
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
322
317
  this.send(command, optionsOrCb || {}, cb);
323
318
  }
324
319
  else {
325
320
  return this.send(command, optionsOrCb);
326
321
  }
327
- };
328
- CloudSearch.prototype.listDomainNames = function (args, optionsOrCb, cb) {
329
- var command = new ListDomainNamesCommand(args);
322
+ }
323
+ listDomainNames(args, optionsOrCb, cb) {
324
+ const command = new ListDomainNamesCommand(args);
330
325
  if (typeof optionsOrCb === "function") {
331
326
  this.send(command, optionsOrCb);
332
327
  }
333
328
  else if (typeof cb === "function") {
334
329
  if (typeof optionsOrCb !== "object")
335
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
330
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
336
331
  this.send(command, optionsOrCb || {}, cb);
337
332
  }
338
333
  else {
339
334
  return this.send(command, optionsOrCb);
340
335
  }
341
- };
342
- CloudSearch.prototype.updateAvailabilityOptions = function (args, optionsOrCb, cb) {
343
- var command = new UpdateAvailabilityOptionsCommand(args);
336
+ }
337
+ updateAvailabilityOptions(args, optionsOrCb, cb) {
338
+ const command = new UpdateAvailabilityOptionsCommand(args);
344
339
  if (typeof optionsOrCb === "function") {
345
340
  this.send(command, optionsOrCb);
346
341
  }
347
342
  else if (typeof cb === "function") {
348
343
  if (typeof optionsOrCb !== "object")
349
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
344
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
350
345
  this.send(command, optionsOrCb || {}, cb);
351
346
  }
352
347
  else {
353
348
  return this.send(command, optionsOrCb);
354
349
  }
355
- };
356
- CloudSearch.prototype.updateDomainEndpointOptions = function (args, optionsOrCb, cb) {
357
- var command = new UpdateDomainEndpointOptionsCommand(args);
350
+ }
351
+ updateDomainEndpointOptions(args, optionsOrCb, cb) {
352
+ const command = new UpdateDomainEndpointOptionsCommand(args);
358
353
  if (typeof optionsOrCb === "function") {
359
354
  this.send(command, optionsOrCb);
360
355
  }
361
356
  else if (typeof cb === "function") {
362
357
  if (typeof optionsOrCb !== "object")
363
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
358
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
364
359
  this.send(command, optionsOrCb || {}, cb);
365
360
  }
366
361
  else {
367
362
  return this.send(command, optionsOrCb);
368
363
  }
369
- };
370
- CloudSearch.prototype.updateScalingParameters = function (args, optionsOrCb, cb) {
371
- var command = new UpdateScalingParametersCommand(args);
364
+ }
365
+ updateScalingParameters(args, optionsOrCb, cb) {
366
+ const command = new UpdateScalingParametersCommand(args);
372
367
  if (typeof optionsOrCb === "function") {
373
368
  this.send(command, optionsOrCb);
374
369
  }
375
370
  else if (typeof cb === "function") {
376
371
  if (typeof optionsOrCb !== "object")
377
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
372
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
378
373
  this.send(command, optionsOrCb || {}, cb);
379
374
  }
380
375
  else {
381
376
  return this.send(command, optionsOrCb);
382
377
  }
383
- };
384
- CloudSearch.prototype.updateServiceAccessPolicies = function (args, optionsOrCb, cb) {
385
- var command = new UpdateServiceAccessPoliciesCommand(args);
378
+ }
379
+ updateServiceAccessPolicies(args, optionsOrCb, cb) {
380
+ const command = new UpdateServiceAccessPoliciesCommand(args);
386
381
  if (typeof optionsOrCb === "function") {
387
382
  this.send(command, optionsOrCb);
388
383
  }
389
384
  else if (typeof cb === "function") {
390
385
  if (typeof optionsOrCb !== "object")
391
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
386
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
392
387
  this.send(command, optionsOrCb || {}, cb);
393
388
  }
394
389
  else {
395
390
  return this.send(command, optionsOrCb);
396
391
  }
397
- };
398
- return CloudSearch;
399
- }(CloudSearchClient));
400
- export { CloudSearch };
392
+ }
393
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var CloudSearchClient = (function (_super) {
13
- __extends(CloudSearchClient, _super);
14
- function CloudSearchClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class CloudSearchClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- CloudSearchClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return CloudSearchClient;
38
- }(__Client));
39
- export { CloudSearchClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }