@aws-sdk/client-cloudsearch-domain 3.141.0 → 3.150.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.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +71 -90
- package/dist-es/protocols/Aws_restJson1.js +81 -65
- package/package.json +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.150.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.149.0...v3.150.0) (2022-08-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-cloudsearch-domain
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-cloudsearch-domain
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -9,24 +9,24 @@ const serializeAws_restJson1SearchCommand = async (input, context) => {
|
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2013-01-01/search";
|
|
12
|
-
const query = {
|
|
13
|
-
format: "sdk",
|
|
14
|
-
pretty: "true",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
12
|
+
const query = map({
|
|
13
|
+
format: [, "sdk"],
|
|
14
|
+
pretty: [, "true"],
|
|
15
|
+
cursor: [, input.cursor],
|
|
16
|
+
expr: [, input.expr],
|
|
17
|
+
facet: [, input.facet],
|
|
18
|
+
fq: [, input.filterQuery],
|
|
19
|
+
highlight: [, input.highlight],
|
|
20
|
+
partial: [() => input.partial !== void 0, () => input.partial.toString()],
|
|
21
|
+
q: [, input.query],
|
|
22
|
+
"q.options": [, input.queryOptions],
|
|
23
|
+
"q.parser": [, input.queryParser],
|
|
24
|
+
return: [, input.return],
|
|
25
|
+
size: [() => input.size !== void 0, () => input.size.toString()],
|
|
26
|
+
sort: [, input.sort],
|
|
27
|
+
start: [() => input.start !== void 0, () => input.start.toString()],
|
|
28
|
+
stats: [, input.stats],
|
|
29
|
+
});
|
|
30
30
|
let body;
|
|
31
31
|
return new protocol_http_1.HttpRequest({
|
|
32
32
|
protocol,
|
|
@@ -44,13 +44,13 @@ const serializeAws_restJson1SuggestCommand = async (input, context) => {
|
|
|
44
44
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
45
45
|
const headers = {};
|
|
46
46
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2013-01-01/suggest";
|
|
47
|
-
const query = {
|
|
48
|
-
format: "sdk",
|
|
49
|
-
pretty: "true",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
47
|
+
const query = map({
|
|
48
|
+
format: [, "sdk"],
|
|
49
|
+
pretty: [, "true"],
|
|
50
|
+
q: [, input.query],
|
|
51
|
+
suggester: [, input.suggester],
|
|
52
|
+
size: [() => input.size !== void 0, () => input.size.toString()],
|
|
53
|
+
});
|
|
54
54
|
let body;
|
|
55
55
|
return new protocol_http_1.HttpRequest({
|
|
56
56
|
protocol,
|
|
@@ -66,14 +66,13 @@ const serializeAws_restJson1SuggestCommand = async (input, context) => {
|
|
|
66
66
|
exports.serializeAws_restJson1SuggestCommand = serializeAws_restJson1SuggestCommand;
|
|
67
67
|
const serializeAws_restJson1UploadDocumentsCommand = async (input, context) => {
|
|
68
68
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
69
|
-
const headers = {
|
|
70
|
-
"content-type": "application/octet-stream",
|
|
71
|
-
|
|
72
|
-
};
|
|
69
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
70
|
+
"content-type": input.contentType || "application/octet-stream",
|
|
71
|
+
});
|
|
73
72
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2013-01-01/documents/batch";
|
|
74
|
-
const query = {
|
|
75
|
-
format: "sdk",
|
|
76
|
-
};
|
|
73
|
+
const query = map({
|
|
74
|
+
format: [, "sdk"],
|
|
75
|
+
});
|
|
77
76
|
let body;
|
|
78
77
|
if (input.documents !== undefined) {
|
|
79
78
|
body = input.documents;
|
|
@@ -94,27 +93,23 @@ const deserializeAws_restJson1SearchCommand = async (output, context) => {
|
|
|
94
93
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
95
94
|
return deserializeAws_restJson1SearchCommandError(output, context);
|
|
96
95
|
}
|
|
97
|
-
const contents = {
|
|
96
|
+
const contents = map({
|
|
98
97
|
$metadata: deserializeMetadata(output),
|
|
99
|
-
|
|
100
|
-
hits: undefined,
|
|
101
|
-
stats: undefined,
|
|
102
|
-
status: undefined,
|
|
103
|
-
};
|
|
98
|
+
});
|
|
104
99
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
105
|
-
if (data.facets
|
|
100
|
+
if (data.facets != null) {
|
|
106
101
|
contents.facets = deserializeAws_restJson1Facets(data.facets, context);
|
|
107
102
|
}
|
|
108
|
-
if (data.hits
|
|
103
|
+
if (data.hits != null) {
|
|
109
104
|
contents.hits = deserializeAws_restJson1Hits(data.hits, context);
|
|
110
105
|
}
|
|
111
|
-
if (data.stats
|
|
106
|
+
if (data.stats != null) {
|
|
112
107
|
contents.stats = deserializeAws_restJson1Stats(data.stats, context);
|
|
113
108
|
}
|
|
114
|
-
if (data.status
|
|
109
|
+
if (data.status != null) {
|
|
115
110
|
contents.status = deserializeAws_restJson1SearchStatus(data.status, context);
|
|
116
111
|
}
|
|
117
|
-
return
|
|
112
|
+
return contents;
|
|
118
113
|
};
|
|
119
114
|
exports.deserializeAws_restJson1SearchCommand = deserializeAws_restJson1SearchCommand;
|
|
120
115
|
const deserializeAws_restJson1SearchCommandError = async (output, context) => {
|
|
@@ -122,7 +117,6 @@ const deserializeAws_restJson1SearchCommandError = async (output, context) => {
|
|
|
122
117
|
...output,
|
|
123
118
|
body: await parseBody(output.body, context),
|
|
124
119
|
};
|
|
125
|
-
let response;
|
|
126
120
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
127
121
|
switch (errorCode) {
|
|
128
122
|
case "SearchException":
|
|
@@ -130,33 +124,29 @@ const deserializeAws_restJson1SearchCommandError = async (output, context) => {
|
|
|
130
124
|
throw await deserializeAws_restJson1SearchExceptionResponse(parsedOutput, context);
|
|
131
125
|
default:
|
|
132
126
|
const parsedBody = parsedOutput.body;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
$metadata,
|
|
127
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
128
|
+
output,
|
|
129
|
+
parsedBody,
|
|
130
|
+
exceptionCtor: CloudSearchDomainServiceException_1.CloudSearchDomainServiceException,
|
|
131
|
+
errorCode,
|
|
139
132
|
});
|
|
140
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
141
133
|
}
|
|
142
134
|
};
|
|
143
135
|
const deserializeAws_restJson1SuggestCommand = async (output, context) => {
|
|
144
136
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
145
137
|
return deserializeAws_restJson1SuggestCommandError(output, context);
|
|
146
138
|
}
|
|
147
|
-
const contents = {
|
|
139
|
+
const contents = map({
|
|
148
140
|
$metadata: deserializeMetadata(output),
|
|
149
|
-
|
|
150
|
-
suggest: undefined,
|
|
151
|
-
};
|
|
141
|
+
});
|
|
152
142
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
153
|
-
if (data.status
|
|
143
|
+
if (data.status != null) {
|
|
154
144
|
contents.status = deserializeAws_restJson1SuggestStatus(data.status, context);
|
|
155
145
|
}
|
|
156
|
-
if (data.suggest
|
|
146
|
+
if (data.suggest != null) {
|
|
157
147
|
contents.suggest = deserializeAws_restJson1SuggestModel(data.suggest, context);
|
|
158
148
|
}
|
|
159
|
-
return
|
|
149
|
+
return contents;
|
|
160
150
|
};
|
|
161
151
|
exports.deserializeAws_restJson1SuggestCommand = deserializeAws_restJson1SuggestCommand;
|
|
162
152
|
const deserializeAws_restJson1SuggestCommandError = async (output, context) => {
|
|
@@ -164,7 +154,6 @@ const deserializeAws_restJson1SuggestCommandError = async (output, context) => {
|
|
|
164
154
|
...output,
|
|
165
155
|
body: await parseBody(output.body, context),
|
|
166
156
|
};
|
|
167
|
-
let response;
|
|
168
157
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
169
158
|
switch (errorCode) {
|
|
170
159
|
case "SearchException":
|
|
@@ -172,41 +161,35 @@ const deserializeAws_restJson1SuggestCommandError = async (output, context) => {
|
|
|
172
161
|
throw await deserializeAws_restJson1SearchExceptionResponse(parsedOutput, context);
|
|
173
162
|
default:
|
|
174
163
|
const parsedBody = parsedOutput.body;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
$metadata,
|
|
164
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
165
|
+
output,
|
|
166
|
+
parsedBody,
|
|
167
|
+
exceptionCtor: CloudSearchDomainServiceException_1.CloudSearchDomainServiceException,
|
|
168
|
+
errorCode,
|
|
181
169
|
});
|
|
182
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
183
170
|
}
|
|
184
171
|
};
|
|
185
172
|
const deserializeAws_restJson1UploadDocumentsCommand = async (output, context) => {
|
|
186
173
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
187
174
|
return deserializeAws_restJson1UploadDocumentsCommandError(output, context);
|
|
188
175
|
}
|
|
189
|
-
const contents = {
|
|
176
|
+
const contents = map({
|
|
190
177
|
$metadata: deserializeMetadata(output),
|
|
191
|
-
|
|
192
|
-
deletes: undefined,
|
|
193
|
-
status: undefined,
|
|
194
|
-
warnings: undefined,
|
|
195
|
-
};
|
|
178
|
+
});
|
|
196
179
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
197
|
-
if (data.adds
|
|
180
|
+
if (data.adds != null) {
|
|
198
181
|
contents.adds = (0, smithy_client_1.expectLong)(data.adds);
|
|
199
182
|
}
|
|
200
|
-
if (data.deletes
|
|
183
|
+
if (data.deletes != null) {
|
|
201
184
|
contents.deletes = (0, smithy_client_1.expectLong)(data.deletes);
|
|
202
185
|
}
|
|
203
|
-
if (data.status
|
|
186
|
+
if (data.status != null) {
|
|
204
187
|
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
205
188
|
}
|
|
206
|
-
if (data.warnings
|
|
189
|
+
if (data.warnings != null) {
|
|
207
190
|
contents.warnings = deserializeAws_restJson1DocumentServiceWarnings(data.warnings, context);
|
|
208
191
|
}
|
|
209
|
-
return
|
|
192
|
+
return contents;
|
|
210
193
|
};
|
|
211
194
|
exports.deserializeAws_restJson1UploadDocumentsCommand = deserializeAws_restJson1UploadDocumentsCommand;
|
|
212
195
|
const deserializeAws_restJson1UploadDocumentsCommandError = async (output, context) => {
|
|
@@ -214,7 +197,6 @@ const deserializeAws_restJson1UploadDocumentsCommandError = async (output, conte
|
|
|
214
197
|
...output,
|
|
215
198
|
body: await parseBody(output.body, context),
|
|
216
199
|
};
|
|
217
|
-
let response;
|
|
218
200
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
219
201
|
switch (errorCode) {
|
|
220
202
|
case "DocumentServiceException":
|
|
@@ -222,23 +204,22 @@ const deserializeAws_restJson1UploadDocumentsCommandError = async (output, conte
|
|
|
222
204
|
throw await deserializeAws_restJson1DocumentServiceExceptionResponse(parsedOutput, context);
|
|
223
205
|
default:
|
|
224
206
|
const parsedBody = parsedOutput.body;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
$metadata,
|
|
207
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
208
|
+
output,
|
|
209
|
+
parsedBody,
|
|
210
|
+
exceptionCtor: CloudSearchDomainServiceException_1.CloudSearchDomainServiceException,
|
|
211
|
+
errorCode,
|
|
231
212
|
});
|
|
232
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
233
213
|
}
|
|
234
214
|
};
|
|
215
|
+
const map = smithy_client_1.map;
|
|
235
216
|
const deserializeAws_restJson1DocumentServiceExceptionResponse = async (parsedOutput, context) => {
|
|
236
|
-
const contents = {};
|
|
217
|
+
const contents = map({});
|
|
237
218
|
const data = parsedOutput.body;
|
|
238
|
-
if (data.message
|
|
219
|
+
if (data.message != null) {
|
|
239
220
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
240
221
|
}
|
|
241
|
-
if (data.status
|
|
222
|
+
if (data.status != null) {
|
|
242
223
|
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
243
224
|
}
|
|
244
225
|
const exception = new models_0_1.DocumentServiceException({
|
|
@@ -248,9 +229,9 @@ const deserializeAws_restJson1DocumentServiceExceptionResponse = async (parsedOu
|
|
|
248
229
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
249
230
|
};
|
|
250
231
|
const deserializeAws_restJson1SearchExceptionResponse = async (parsedOutput, context) => {
|
|
251
|
-
const contents = {};
|
|
232
|
+
const contents = map({});
|
|
252
233
|
const data = parsedOutput.body;
|
|
253
|
-
if (data.message
|
|
234
|
+
if (data.message != null) {
|
|
254
235
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
255
236
|
}
|
|
256
237
|
const exception = new models_0_1.SearchException({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { CloudSearchDomainServiceException as __BaseException } from "../models/CloudSearchDomainServiceException";
|
|
5
5
|
import { DocumentServiceException, SearchException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1SearchCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -12,7 +12,24 @@ export var serializeAws_restJson1SearchCommand = function (input, context) { ret
|
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
13
|
headers = {};
|
|
14
14
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2013-01-01/search";
|
|
15
|
-
query =
|
|
15
|
+
query = map({
|
|
16
|
+
format: [, "sdk"],
|
|
17
|
+
pretty: [, "true"],
|
|
18
|
+
cursor: [, input.cursor],
|
|
19
|
+
expr: [, input.expr],
|
|
20
|
+
facet: [, input.facet],
|
|
21
|
+
fq: [, input.filterQuery],
|
|
22
|
+
highlight: [, input.highlight],
|
|
23
|
+
partial: [function () { return input.partial !== void 0; }, function () { return input.partial.toString(); }],
|
|
24
|
+
q: [, input.query],
|
|
25
|
+
"q.options": [, input.queryOptions],
|
|
26
|
+
"q.parser": [, input.queryParser],
|
|
27
|
+
return: [, input.return],
|
|
28
|
+
size: [function () { return input.size !== void 0; }, function () { return input.size.toString(); }],
|
|
29
|
+
sort: [, input.sort],
|
|
30
|
+
start: [function () { return input.start !== void 0; }, function () { return input.start.toString(); }],
|
|
31
|
+
stats: [, input.stats],
|
|
32
|
+
});
|
|
16
33
|
return [2, new __HttpRequest({
|
|
17
34
|
protocol: protocol,
|
|
18
35
|
hostname: hostname,
|
|
@@ -35,7 +52,13 @@ export var serializeAws_restJson1SuggestCommand = function (input, context) { re
|
|
|
35
52
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
36
53
|
headers = {};
|
|
37
54
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2013-01-01/suggest";
|
|
38
|
-
query =
|
|
55
|
+
query = map({
|
|
56
|
+
format: [, "sdk"],
|
|
57
|
+
pretty: [, "true"],
|
|
58
|
+
q: [, input.query],
|
|
59
|
+
suggester: [, input.suggester],
|
|
60
|
+
size: [function () { return input.size !== void 0; }, function () { return input.size.toString(); }],
|
|
61
|
+
});
|
|
39
62
|
return [2, new __HttpRequest({
|
|
40
63
|
protocol: protocol,
|
|
41
64
|
hostname: hostname,
|
|
@@ -56,11 +79,13 @@ export var serializeAws_restJson1UploadDocumentsCommand = function (input, conte
|
|
|
56
79
|
case 0: return [4, context.endpoint()];
|
|
57
80
|
case 1:
|
|
58
81
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
59
|
-
headers =
|
|
82
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
83
|
+
"content-type": input.contentType || "application/octet-stream",
|
|
84
|
+
});
|
|
60
85
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/2013-01-01/documents/batch";
|
|
61
|
-
query = {
|
|
62
|
-
format: "sdk",
|
|
63
|
-
};
|
|
86
|
+
query = map({
|
|
87
|
+
format: [, "sdk"],
|
|
88
|
+
});
|
|
64
89
|
if (input.documents !== undefined) {
|
|
65
90
|
body = input.documents;
|
|
66
91
|
}
|
|
@@ -85,36 +110,32 @@ export var deserializeAws_restJson1SearchCommand = function (output, context) {
|
|
|
85
110
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
86
111
|
return [2, deserializeAws_restJson1SearchCommandError(output, context)];
|
|
87
112
|
}
|
|
88
|
-
contents = {
|
|
113
|
+
contents = map({
|
|
89
114
|
$metadata: deserializeMetadata(output),
|
|
90
|
-
|
|
91
|
-
hits: undefined,
|
|
92
|
-
stats: undefined,
|
|
93
|
-
status: undefined,
|
|
94
|
-
};
|
|
115
|
+
});
|
|
95
116
|
_a = __expectNonNull;
|
|
96
117
|
_b = __expectObject;
|
|
97
118
|
return [4, parseBody(output.body, context)];
|
|
98
119
|
case 1:
|
|
99
120
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
100
|
-
if (data.facets
|
|
121
|
+
if (data.facets != null) {
|
|
101
122
|
contents.facets = deserializeAws_restJson1Facets(data.facets, context);
|
|
102
123
|
}
|
|
103
|
-
if (data.hits
|
|
124
|
+
if (data.hits != null) {
|
|
104
125
|
contents.hits = deserializeAws_restJson1Hits(data.hits, context);
|
|
105
126
|
}
|
|
106
|
-
if (data.stats
|
|
127
|
+
if (data.stats != null) {
|
|
107
128
|
contents.stats = deserializeAws_restJson1Stats(data.stats, context);
|
|
108
129
|
}
|
|
109
|
-
if (data.status
|
|
130
|
+
if (data.status != null) {
|
|
110
131
|
contents.status = deserializeAws_restJson1SearchStatus(data.status, context);
|
|
111
132
|
}
|
|
112
|
-
return [2,
|
|
133
|
+
return [2, contents];
|
|
113
134
|
}
|
|
114
135
|
});
|
|
115
136
|
}); };
|
|
116
137
|
var deserializeAws_restJson1SearchCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
-
var parsedOutput, _a,
|
|
138
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
118
139
|
var _c;
|
|
119
140
|
return __generator(this, function (_d) {
|
|
120
141
|
switch (_d.label) {
|
|
@@ -135,14 +156,14 @@ var deserializeAws_restJson1SearchCommandError = function (output, context) { re
|
|
|
135
156
|
case 3: throw _d.sent();
|
|
136
157
|
case 4:
|
|
137
158
|
parsedBody = parsedOutput.body;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
$metadata: $metadata,
|
|
159
|
+
throwDefaultError({
|
|
160
|
+
output: output,
|
|
161
|
+
parsedBody: parsedBody,
|
|
162
|
+
exceptionCtor: __BaseException,
|
|
163
|
+
errorCode: errorCode,
|
|
144
164
|
});
|
|
145
|
-
|
|
165
|
+
_d.label = 5;
|
|
166
|
+
case 5: return [2];
|
|
146
167
|
}
|
|
147
168
|
});
|
|
148
169
|
}); };
|
|
@@ -154,28 +175,26 @@ export var deserializeAws_restJson1SuggestCommand = function (output, context) {
|
|
|
154
175
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
155
176
|
return [2, deserializeAws_restJson1SuggestCommandError(output, context)];
|
|
156
177
|
}
|
|
157
|
-
contents = {
|
|
178
|
+
contents = map({
|
|
158
179
|
$metadata: deserializeMetadata(output),
|
|
159
|
-
|
|
160
|
-
suggest: undefined,
|
|
161
|
-
};
|
|
180
|
+
});
|
|
162
181
|
_a = __expectNonNull;
|
|
163
182
|
_b = __expectObject;
|
|
164
183
|
return [4, parseBody(output.body, context)];
|
|
165
184
|
case 1:
|
|
166
185
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
167
|
-
if (data.status
|
|
186
|
+
if (data.status != null) {
|
|
168
187
|
contents.status = deserializeAws_restJson1SuggestStatus(data.status, context);
|
|
169
188
|
}
|
|
170
|
-
if (data.suggest
|
|
189
|
+
if (data.suggest != null) {
|
|
171
190
|
contents.suggest = deserializeAws_restJson1SuggestModel(data.suggest, context);
|
|
172
191
|
}
|
|
173
|
-
return [2,
|
|
192
|
+
return [2, contents];
|
|
174
193
|
}
|
|
175
194
|
});
|
|
176
195
|
}); };
|
|
177
196
|
var deserializeAws_restJson1SuggestCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var parsedOutput, _a,
|
|
197
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
179
198
|
var _c;
|
|
180
199
|
return __generator(this, function (_d) {
|
|
181
200
|
switch (_d.label) {
|
|
@@ -196,14 +215,14 @@ var deserializeAws_restJson1SuggestCommandError = function (output, context) { r
|
|
|
196
215
|
case 3: throw _d.sent();
|
|
197
216
|
case 4:
|
|
198
217
|
parsedBody = parsedOutput.body;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
$metadata: $metadata,
|
|
218
|
+
throwDefaultError({
|
|
219
|
+
output: output,
|
|
220
|
+
parsedBody: parsedBody,
|
|
221
|
+
exceptionCtor: __BaseException,
|
|
222
|
+
errorCode: errorCode,
|
|
205
223
|
});
|
|
206
|
-
|
|
224
|
+
_d.label = 5;
|
|
225
|
+
case 5: return [2];
|
|
207
226
|
}
|
|
208
227
|
});
|
|
209
228
|
}); };
|
|
@@ -215,36 +234,32 @@ export var deserializeAws_restJson1UploadDocumentsCommand = function (output, co
|
|
|
215
234
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
216
235
|
return [2, deserializeAws_restJson1UploadDocumentsCommandError(output, context)];
|
|
217
236
|
}
|
|
218
|
-
contents = {
|
|
237
|
+
contents = map({
|
|
219
238
|
$metadata: deserializeMetadata(output),
|
|
220
|
-
|
|
221
|
-
deletes: undefined,
|
|
222
|
-
status: undefined,
|
|
223
|
-
warnings: undefined,
|
|
224
|
-
};
|
|
239
|
+
});
|
|
225
240
|
_a = __expectNonNull;
|
|
226
241
|
_b = __expectObject;
|
|
227
242
|
return [4, parseBody(output.body, context)];
|
|
228
243
|
case 1:
|
|
229
244
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
230
|
-
if (data.adds
|
|
245
|
+
if (data.adds != null) {
|
|
231
246
|
contents.adds = __expectLong(data.adds);
|
|
232
247
|
}
|
|
233
|
-
if (data.deletes
|
|
248
|
+
if (data.deletes != null) {
|
|
234
249
|
contents.deletes = __expectLong(data.deletes);
|
|
235
250
|
}
|
|
236
|
-
if (data.status
|
|
251
|
+
if (data.status != null) {
|
|
237
252
|
contents.status = __expectString(data.status);
|
|
238
253
|
}
|
|
239
|
-
if (data.warnings
|
|
254
|
+
if (data.warnings != null) {
|
|
240
255
|
contents.warnings = deserializeAws_restJson1DocumentServiceWarnings(data.warnings, context);
|
|
241
256
|
}
|
|
242
|
-
return [2,
|
|
257
|
+
return [2, contents];
|
|
243
258
|
}
|
|
244
259
|
});
|
|
245
260
|
}); };
|
|
246
261
|
var deserializeAws_restJson1UploadDocumentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
|
-
var parsedOutput, _a,
|
|
262
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
248
263
|
var _c;
|
|
249
264
|
return __generator(this, function (_d) {
|
|
250
265
|
switch (_d.label) {
|
|
@@ -265,26 +280,27 @@ var deserializeAws_restJson1UploadDocumentsCommandError = function (output, cont
|
|
|
265
280
|
case 3: throw _d.sent();
|
|
266
281
|
case 4:
|
|
267
282
|
parsedBody = parsedOutput.body;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
$metadata: $metadata,
|
|
283
|
+
throwDefaultError({
|
|
284
|
+
output: output,
|
|
285
|
+
parsedBody: parsedBody,
|
|
286
|
+
exceptionCtor: __BaseException,
|
|
287
|
+
errorCode: errorCode,
|
|
274
288
|
});
|
|
275
|
-
|
|
289
|
+
_d.label = 5;
|
|
290
|
+
case 5: return [2];
|
|
276
291
|
}
|
|
277
292
|
});
|
|
278
293
|
}); };
|
|
294
|
+
var map = __map;
|
|
279
295
|
var deserializeAws_restJson1DocumentServiceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
280
296
|
var contents, data, exception;
|
|
281
297
|
return __generator(this, function (_a) {
|
|
282
|
-
contents = {};
|
|
298
|
+
contents = map({});
|
|
283
299
|
data = parsedOutput.body;
|
|
284
|
-
if (data.message
|
|
300
|
+
if (data.message != null) {
|
|
285
301
|
contents.message = __expectString(data.message);
|
|
286
302
|
}
|
|
287
|
-
if (data.status
|
|
303
|
+
if (data.status != null) {
|
|
288
304
|
contents.status = __expectString(data.status);
|
|
289
305
|
}
|
|
290
306
|
exception = new DocumentServiceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -294,9 +310,9 @@ var deserializeAws_restJson1DocumentServiceExceptionResponse = function (parsedO
|
|
|
294
310
|
var deserializeAws_restJson1SearchExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
295
311
|
var contents, data, exception;
|
|
296
312
|
return __generator(this, function (_a) {
|
|
297
|
-
contents = {};
|
|
313
|
+
contents = map({});
|
|
298
314
|
data = parsedOutput.body;
|
|
299
|
-
if (data.message
|
|
315
|
+
if (data.message != null) {
|
|
300
316
|
contents.message = __expectString(data.message);
|
|
301
317
|
}
|
|
302
318
|
exception = new SearchException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudsearch-domain",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudsearch Domain Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.150.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.150.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.150.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
37
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
38
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
40
40
|
"@aws-sdk/types": "3.127.0",
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
49
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"typedoc": "0.19.2",
|
|
62
62
|
"typescript": "~4.6.2"
|
|
63
63
|
},
|
|
64
|
+
"overrides": {
|
|
65
|
+
"typedoc": {
|
|
66
|
+
"typescript": "~4.6.2"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
64
69
|
"engines": {
|
|
65
70
|
"node": ">=12.0.0"
|
|
66
71
|
},
|