@aws-sdk/client-cloudsearch-domain 3.476.0 → 3.477.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.
|
@@ -1,92 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UploadDocumentsCommand = exports.de_SuggestCommand = exports.de_SearchCommand = exports.se_UploadDocumentsCommand = exports.se_SuggestCommand = exports.se_SearchCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const CloudSearchDomainServiceException_1 = require("../models/CloudSearchDomainServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_SearchCommand = async (input, context) => {
|
|
9
|
-
const
|
|
9
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
10
|
const headers = {};
|
|
11
|
-
|
|
11
|
+
b.bp("/2013-01-01/search");
|
|
12
12
|
const query = (0, smithy_client_1.map)({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
[_f]: [, "sdk"],
|
|
14
|
+
[_p]: [, "true"],
|
|
15
|
+
[_c]: [, input[_c]],
|
|
16
|
+
[_e]: [, input[_e]],
|
|
17
|
+
[_fa]: [, input[_fa]],
|
|
18
|
+
[_fq]: [, input[_fQ]],
|
|
19
|
+
[_h]: [, input[_h]],
|
|
20
|
+
[_pa]: [() => input.partial !== void 0, () => input[_pa].toString()],
|
|
21
|
+
[_q_]: [, (0, smithy_client_1.expectNonNull)(input[_q], `query`)],
|
|
22
|
+
[_qo]: [, input[_qO]],
|
|
23
|
+
[_qp]: [, input[_qP]],
|
|
24
|
+
[_r]: [, input[_r]],
|
|
25
|
+
[_s]: [() => input.size !== void 0, () => input[_s].toString()],
|
|
26
|
+
[_so]: [, input[_so]],
|
|
27
|
+
[_st]: [() => input.start !== void 0, () => input[_st].toString()],
|
|
28
|
+
[_sta]: [, input[_sta]],
|
|
29
29
|
});
|
|
30
30
|
let body;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hostname,
|
|
34
|
-
port,
|
|
35
|
-
method: "GET",
|
|
36
|
-
headers,
|
|
37
|
-
path: resolvedPath,
|
|
38
|
-
query,
|
|
39
|
-
body,
|
|
40
|
-
});
|
|
31
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
32
|
+
return b.build();
|
|
41
33
|
};
|
|
42
34
|
exports.se_SearchCommand = se_SearchCommand;
|
|
43
35
|
const se_SuggestCommand = async (input, context) => {
|
|
44
|
-
const
|
|
36
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
45
37
|
const headers = {};
|
|
46
|
-
|
|
38
|
+
b.bp("/2013-01-01/suggest");
|
|
47
39
|
const query = (0, smithy_client_1.map)({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
[_f]: [, "sdk"],
|
|
41
|
+
[_p]: [, "true"],
|
|
42
|
+
[_q_]: [, (0, smithy_client_1.expectNonNull)(input[_q], `query`)],
|
|
43
|
+
[_su]: [, (0, smithy_client_1.expectNonNull)(input[_su], `suggester`)],
|
|
44
|
+
[_s]: [() => input.size !== void 0, () => input[_s].toString()],
|
|
53
45
|
});
|
|
54
46
|
let body;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
hostname,
|
|
58
|
-
port,
|
|
59
|
-
method: "GET",
|
|
60
|
-
headers,
|
|
61
|
-
path: resolvedPath,
|
|
62
|
-
query,
|
|
63
|
-
body,
|
|
64
|
-
});
|
|
47
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
48
|
+
return b.build();
|
|
65
49
|
};
|
|
66
50
|
exports.se_SuggestCommand = se_SuggestCommand;
|
|
67
51
|
const se_UploadDocumentsCommand = async (input, context) => {
|
|
68
|
-
const
|
|
52
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
69
53
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
70
|
-
|
|
54
|
+
[_ct]: input[_cT] || "application/octet-stream",
|
|
71
55
|
});
|
|
72
|
-
|
|
56
|
+
b.bp("/2013-01-01/documents/batch");
|
|
73
57
|
const query = (0, smithy_client_1.map)({
|
|
74
|
-
|
|
58
|
+
[_f]: [, "sdk"],
|
|
75
59
|
});
|
|
76
60
|
let body;
|
|
77
61
|
if (input.documents !== undefined) {
|
|
78
62
|
body = input.documents;
|
|
79
63
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
hostname,
|
|
83
|
-
port,
|
|
84
|
-
method: "POST",
|
|
85
|
-
headers,
|
|
86
|
-
path: resolvedPath,
|
|
87
|
-
query,
|
|
88
|
-
body,
|
|
89
|
-
});
|
|
64
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
65
|
+
return b.build();
|
|
90
66
|
};
|
|
91
67
|
exports.se_UploadDocumentsCommand = se_UploadDocumentsCommand;
|
|
92
68
|
const de_SearchCommand = async (output, context) => {
|
|
@@ -259,6 +235,29 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
259
235
|
value !== "" &&
|
|
260
236
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
261
237
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
238
|
+
const _c = "cursor";
|
|
239
|
+
const _cT = "contentType";
|
|
240
|
+
const _ct = "content-type";
|
|
241
|
+
const _e = "expr";
|
|
242
|
+
const _f = "format";
|
|
243
|
+
const _fQ = "filterQuery";
|
|
244
|
+
const _fa = "facet";
|
|
245
|
+
const _fq = "fq";
|
|
246
|
+
const _h = "highlight";
|
|
247
|
+
const _p = "pretty";
|
|
248
|
+
const _pa = "partial";
|
|
249
|
+
const _q = "query";
|
|
250
|
+
const _qO = "queryOptions";
|
|
251
|
+
const _qP = "queryParser";
|
|
252
|
+
const _q_ = "q";
|
|
253
|
+
const _qo = "q.options";
|
|
254
|
+
const _qp = "q.parser";
|
|
255
|
+
const _r = "return";
|
|
256
|
+
const _s = "size";
|
|
257
|
+
const _so = "sort";
|
|
258
|
+
const _st = "start";
|
|
259
|
+
const _sta = "stats";
|
|
260
|
+
const _su = "suggester";
|
|
262
261
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
263
262
|
if (encoded.length) {
|
|
264
263
|
return JSON.parse(encoded);
|
|
@@ -1,87 +1,63 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
2
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { CloudSearchDomainServiceException as __BaseException } from "../models/CloudSearchDomainServiceException";
|
|
4
4
|
import { DocumentServiceException, SearchException } from "../models/models_0";
|
|
5
5
|
export const se_SearchCommand = async (input, context) => {
|
|
6
|
-
const
|
|
6
|
+
const b = rb(input, context);
|
|
7
7
|
const headers = {};
|
|
8
|
-
|
|
8
|
+
b.bp("/2013-01-01/search");
|
|
9
9
|
const query = map({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
[_f]: [, "sdk"],
|
|
11
|
+
[_p]: [, "true"],
|
|
12
|
+
[_c]: [, input[_c]],
|
|
13
|
+
[_e]: [, input[_e]],
|
|
14
|
+
[_fa]: [, input[_fa]],
|
|
15
|
+
[_fq]: [, input[_fQ]],
|
|
16
|
+
[_h]: [, input[_h]],
|
|
17
|
+
[_pa]: [() => input.partial !== void 0, () => input[_pa].toString()],
|
|
18
|
+
[_q_]: [, __expectNonNull(input[_q], `query`)],
|
|
19
|
+
[_qo]: [, input[_qO]],
|
|
20
|
+
[_qp]: [, input[_qP]],
|
|
21
|
+
[_r]: [, input[_r]],
|
|
22
|
+
[_s]: [() => input.size !== void 0, () => input[_s].toString()],
|
|
23
|
+
[_so]: [, input[_so]],
|
|
24
|
+
[_st]: [() => input.start !== void 0, () => input[_st].toString()],
|
|
25
|
+
[_sta]: [, input[_sta]],
|
|
26
26
|
});
|
|
27
27
|
let body;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
hostname,
|
|
31
|
-
port,
|
|
32
|
-
method: "GET",
|
|
33
|
-
headers,
|
|
34
|
-
path: resolvedPath,
|
|
35
|
-
query,
|
|
36
|
-
body,
|
|
37
|
-
});
|
|
28
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
29
|
+
return b.build();
|
|
38
30
|
};
|
|
39
31
|
export const se_SuggestCommand = async (input, context) => {
|
|
40
|
-
const
|
|
32
|
+
const b = rb(input, context);
|
|
41
33
|
const headers = {};
|
|
42
|
-
|
|
34
|
+
b.bp("/2013-01-01/suggest");
|
|
43
35
|
const query = map({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
[_f]: [, "sdk"],
|
|
37
|
+
[_p]: [, "true"],
|
|
38
|
+
[_q_]: [, __expectNonNull(input[_q], `query`)],
|
|
39
|
+
[_su]: [, __expectNonNull(input[_su], `suggester`)],
|
|
40
|
+
[_s]: [() => input.size !== void 0, () => input[_s].toString()],
|
|
49
41
|
});
|
|
50
42
|
let body;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
hostname,
|
|
54
|
-
port,
|
|
55
|
-
method: "GET",
|
|
56
|
-
headers,
|
|
57
|
-
path: resolvedPath,
|
|
58
|
-
query,
|
|
59
|
-
body,
|
|
60
|
-
});
|
|
43
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
44
|
+
return b.build();
|
|
61
45
|
};
|
|
62
46
|
export const se_UploadDocumentsCommand = async (input, context) => {
|
|
63
|
-
const
|
|
47
|
+
const b = rb(input, context);
|
|
64
48
|
const headers = map({}, isSerializableHeaderValue, {
|
|
65
|
-
|
|
49
|
+
[_ct]: input[_cT] || "application/octet-stream",
|
|
66
50
|
});
|
|
67
|
-
|
|
51
|
+
b.bp("/2013-01-01/documents/batch");
|
|
68
52
|
const query = map({
|
|
69
|
-
|
|
53
|
+
[_f]: [, "sdk"],
|
|
70
54
|
});
|
|
71
55
|
let body;
|
|
72
56
|
if (input.documents !== undefined) {
|
|
73
57
|
body = input.documents;
|
|
74
58
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
hostname,
|
|
78
|
-
port,
|
|
79
|
-
method: "POST",
|
|
80
|
-
headers,
|
|
81
|
-
path: resolvedPath,
|
|
82
|
-
query,
|
|
83
|
-
body,
|
|
84
|
-
});
|
|
59
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
60
|
+
return b.build();
|
|
85
61
|
};
|
|
86
62
|
export const de_SearchCommand = async (output, context) => {
|
|
87
63
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -250,6 +226,29 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
250
226
|
value !== "" &&
|
|
251
227
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
252
228
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
229
|
+
const _c = "cursor";
|
|
230
|
+
const _cT = "contentType";
|
|
231
|
+
const _ct = "content-type";
|
|
232
|
+
const _e = "expr";
|
|
233
|
+
const _f = "format";
|
|
234
|
+
const _fQ = "filterQuery";
|
|
235
|
+
const _fa = "facet";
|
|
236
|
+
const _fq = "fq";
|
|
237
|
+
const _h = "highlight";
|
|
238
|
+
const _p = "pretty";
|
|
239
|
+
const _pa = "partial";
|
|
240
|
+
const _q = "query";
|
|
241
|
+
const _qO = "queryOptions";
|
|
242
|
+
const _qP = "queryParser";
|
|
243
|
+
const _q_ = "q";
|
|
244
|
+
const _qo = "q.options";
|
|
245
|
+
const _qp = "q.parser";
|
|
246
|
+
const _r = "return";
|
|
247
|
+
const _s = "size";
|
|
248
|
+
const _so = "sort";
|
|
249
|
+
const _st = "start";
|
|
250
|
+
const _sta = "stats";
|
|
251
|
+
const _su = "suggester";
|
|
253
252
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
254
253
|
if (encoded.length) {
|
|
255
254
|
return JSON.parse(encoded);
|
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.477.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",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.477.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.477.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|