@aws-sdk/client-s3vectors 3.891.0 → 3.894.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/dist-cjs/index.js +1632 -10
- package/package.json +19 -19
- package/dist-cjs/S3Vectors.js +0 -43
- package/dist-cjs/S3VectorsClient.js +0 -52
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
- package/dist-cjs/commands/CreateIndexCommand.js +0 -26
- package/dist-cjs/commands/CreateVectorBucketCommand.js +0 -26
- package/dist-cjs/commands/DeleteIndexCommand.js +0 -26
- package/dist-cjs/commands/DeleteVectorBucketCommand.js +0 -26
- package/dist-cjs/commands/DeleteVectorBucketPolicyCommand.js +0 -26
- package/dist-cjs/commands/DeleteVectorsCommand.js +0 -26
- package/dist-cjs/commands/GetIndexCommand.js +0 -26
- package/dist-cjs/commands/GetVectorBucketCommand.js +0 -26
- package/dist-cjs/commands/GetVectorBucketPolicyCommand.js +0 -26
- package/dist-cjs/commands/GetVectorsCommand.js +0 -26
- package/dist-cjs/commands/ListIndexesCommand.js +0 -26
- package/dist-cjs/commands/ListVectorBucketsCommand.js +0 -26
- package/dist-cjs/commands/ListVectorsCommand.js +0 -26
- package/dist-cjs/commands/PutVectorBucketPolicyCommand.js +0 -26
- package/dist-cjs/commands/PutVectorsCommand.js +0 -26
- package/dist-cjs/commands/QueryVectorsCommand.js +0 -26
- package/dist-cjs/commands/index.js +0 -19
- package/dist-cjs/endpoint/EndpointParameters.js +0 -15
- package/dist-cjs/extensionConfiguration.js +0 -2
- package/dist-cjs/models/S3VectorsServiceException.js +0 -12
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/models/models_0.js +0 -186
- package/dist-cjs/pagination/Interfaces.js +0 -2
- package/dist-cjs/pagination/ListIndexesPaginator.js +0 -7
- package/dist-cjs/pagination/ListVectorBucketsPaginator.js +0 -7
- package/dist-cjs/pagination/ListVectorsPaginator.js +0 -7
- package/dist-cjs/pagination/index.js +0 -7
- package/dist-cjs/protocols/Aws_restJson1.js +0 -858
- package/dist-cjs/runtimeExtensions.js +0 -13
|
@@ -1,858 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_QueryVectorsCommand = exports.de_PutVectorsCommand = exports.de_PutVectorBucketPolicyCommand = exports.de_ListVectorsCommand = exports.de_ListVectorBucketsCommand = exports.de_ListIndexesCommand = exports.de_GetVectorsCommand = exports.de_GetVectorBucketPolicyCommand = exports.de_GetVectorBucketCommand = exports.de_GetIndexCommand = exports.de_DeleteVectorsCommand = exports.de_DeleteVectorBucketPolicyCommand = exports.de_DeleteVectorBucketCommand = exports.de_DeleteIndexCommand = exports.de_CreateVectorBucketCommand = exports.de_CreateIndexCommand = exports.se_QueryVectorsCommand = exports.se_PutVectorsCommand = exports.se_PutVectorBucketPolicyCommand = exports.se_ListVectorsCommand = exports.se_ListVectorBucketsCommand = exports.se_ListIndexesCommand = exports.se_GetVectorsCommand = exports.se_GetVectorBucketPolicyCommand = exports.se_GetVectorBucketCommand = exports.se_GetIndexCommand = exports.se_DeleteVectorsCommand = exports.se_DeleteVectorBucketPolicyCommand = exports.se_DeleteVectorBucketCommand = exports.se_DeleteIndexCommand = exports.se_CreateVectorBucketCommand = exports.se_CreateIndexCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const S3VectorsServiceException_1 = require("../models/S3VectorsServiceException");
|
|
9
|
-
const se_CreateIndexCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/CreateIndex");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
dataType: [],
|
|
18
|
-
dimension: [],
|
|
19
|
-
distanceMetric: [],
|
|
20
|
-
indexName: [],
|
|
21
|
-
metadataConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
-
vectorBucketArn: [],
|
|
23
|
-
vectorBucketName: [],
|
|
24
|
-
}));
|
|
25
|
-
b.m("POST").h(headers).b(body);
|
|
26
|
-
return b.build();
|
|
27
|
-
};
|
|
28
|
-
exports.se_CreateIndexCommand = se_CreateIndexCommand;
|
|
29
|
-
const se_CreateVectorBucketCommand = async (input, context) => {
|
|
30
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
31
|
-
const headers = {
|
|
32
|
-
"content-type": "application/json",
|
|
33
|
-
};
|
|
34
|
-
b.bp("/CreateVectorBucket");
|
|
35
|
-
let body;
|
|
36
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
37
|
-
encryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
38
|
-
vectorBucketName: [],
|
|
39
|
-
}));
|
|
40
|
-
b.m("POST").h(headers).b(body);
|
|
41
|
-
return b.build();
|
|
42
|
-
};
|
|
43
|
-
exports.se_CreateVectorBucketCommand = se_CreateVectorBucketCommand;
|
|
44
|
-
const se_DeleteIndexCommand = async (input, context) => {
|
|
45
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
46
|
-
const headers = {
|
|
47
|
-
"content-type": "application/json",
|
|
48
|
-
};
|
|
49
|
-
b.bp("/DeleteIndex");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
-
indexArn: [],
|
|
53
|
-
indexName: [],
|
|
54
|
-
vectorBucketName: [],
|
|
55
|
-
}));
|
|
56
|
-
b.m("POST").h(headers).b(body);
|
|
57
|
-
return b.build();
|
|
58
|
-
};
|
|
59
|
-
exports.se_DeleteIndexCommand = se_DeleteIndexCommand;
|
|
60
|
-
const se_DeleteVectorBucketCommand = async (input, context) => {
|
|
61
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
62
|
-
const headers = {
|
|
63
|
-
"content-type": "application/json",
|
|
64
|
-
};
|
|
65
|
-
b.bp("/DeleteVectorBucket");
|
|
66
|
-
let body;
|
|
67
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
68
|
-
vectorBucketArn: [],
|
|
69
|
-
vectorBucketName: [],
|
|
70
|
-
}));
|
|
71
|
-
b.m("POST").h(headers).b(body);
|
|
72
|
-
return b.build();
|
|
73
|
-
};
|
|
74
|
-
exports.se_DeleteVectorBucketCommand = se_DeleteVectorBucketCommand;
|
|
75
|
-
const se_DeleteVectorBucketPolicyCommand = async (input, context) => {
|
|
76
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
77
|
-
const headers = {
|
|
78
|
-
"content-type": "application/json",
|
|
79
|
-
};
|
|
80
|
-
b.bp("/DeleteVectorBucketPolicy");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
83
|
-
vectorBucketArn: [],
|
|
84
|
-
vectorBucketName: [],
|
|
85
|
-
}));
|
|
86
|
-
b.m("POST").h(headers).b(body);
|
|
87
|
-
return b.build();
|
|
88
|
-
};
|
|
89
|
-
exports.se_DeleteVectorBucketPolicyCommand = se_DeleteVectorBucketPolicyCommand;
|
|
90
|
-
const se_DeleteVectorsCommand = async (input, context) => {
|
|
91
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
92
|
-
const headers = {
|
|
93
|
-
"content-type": "application/json",
|
|
94
|
-
};
|
|
95
|
-
b.bp("/DeleteVectors");
|
|
96
|
-
let body;
|
|
97
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
98
|
-
indexArn: [],
|
|
99
|
-
indexName: [],
|
|
100
|
-
keys: (_) => (0, smithy_client_1._json)(_),
|
|
101
|
-
vectorBucketName: [],
|
|
102
|
-
}));
|
|
103
|
-
b.m("POST").h(headers).b(body);
|
|
104
|
-
return b.build();
|
|
105
|
-
};
|
|
106
|
-
exports.se_DeleteVectorsCommand = se_DeleteVectorsCommand;
|
|
107
|
-
const se_GetIndexCommand = async (input, context) => {
|
|
108
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
109
|
-
const headers = {
|
|
110
|
-
"content-type": "application/json",
|
|
111
|
-
};
|
|
112
|
-
b.bp("/GetIndex");
|
|
113
|
-
let body;
|
|
114
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
115
|
-
indexArn: [],
|
|
116
|
-
indexName: [],
|
|
117
|
-
vectorBucketName: [],
|
|
118
|
-
}));
|
|
119
|
-
b.m("POST").h(headers).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
exports.se_GetIndexCommand = se_GetIndexCommand;
|
|
123
|
-
const se_GetVectorBucketCommand = async (input, context) => {
|
|
124
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
125
|
-
const headers = {
|
|
126
|
-
"content-type": "application/json",
|
|
127
|
-
};
|
|
128
|
-
b.bp("/GetVectorBucket");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
131
|
-
vectorBucketArn: [],
|
|
132
|
-
vectorBucketName: [],
|
|
133
|
-
}));
|
|
134
|
-
b.m("POST").h(headers).b(body);
|
|
135
|
-
return b.build();
|
|
136
|
-
};
|
|
137
|
-
exports.se_GetVectorBucketCommand = se_GetVectorBucketCommand;
|
|
138
|
-
const se_GetVectorBucketPolicyCommand = async (input, context) => {
|
|
139
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
140
|
-
const headers = {
|
|
141
|
-
"content-type": "application/json",
|
|
142
|
-
};
|
|
143
|
-
b.bp("/GetVectorBucketPolicy");
|
|
144
|
-
let body;
|
|
145
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
146
|
-
vectorBucketArn: [],
|
|
147
|
-
vectorBucketName: [],
|
|
148
|
-
}));
|
|
149
|
-
b.m("POST").h(headers).b(body);
|
|
150
|
-
return b.build();
|
|
151
|
-
};
|
|
152
|
-
exports.se_GetVectorBucketPolicyCommand = se_GetVectorBucketPolicyCommand;
|
|
153
|
-
const se_GetVectorsCommand = async (input, context) => {
|
|
154
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
155
|
-
const headers = {
|
|
156
|
-
"content-type": "application/json",
|
|
157
|
-
};
|
|
158
|
-
b.bp("/GetVectors");
|
|
159
|
-
let body;
|
|
160
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
161
|
-
indexArn: [],
|
|
162
|
-
indexName: [],
|
|
163
|
-
keys: (_) => (0, smithy_client_1._json)(_),
|
|
164
|
-
returnData: [],
|
|
165
|
-
returnMetadata: [],
|
|
166
|
-
vectorBucketName: [],
|
|
167
|
-
}));
|
|
168
|
-
b.m("POST").h(headers).b(body);
|
|
169
|
-
return b.build();
|
|
170
|
-
};
|
|
171
|
-
exports.se_GetVectorsCommand = se_GetVectorsCommand;
|
|
172
|
-
const se_ListIndexesCommand = async (input, context) => {
|
|
173
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
174
|
-
const headers = {
|
|
175
|
-
"content-type": "application/json",
|
|
176
|
-
};
|
|
177
|
-
b.bp("/ListIndexes");
|
|
178
|
-
let body;
|
|
179
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
180
|
-
maxResults: [],
|
|
181
|
-
nextToken: [],
|
|
182
|
-
prefix: [],
|
|
183
|
-
vectorBucketArn: [],
|
|
184
|
-
vectorBucketName: [],
|
|
185
|
-
}));
|
|
186
|
-
b.m("POST").h(headers).b(body);
|
|
187
|
-
return b.build();
|
|
188
|
-
};
|
|
189
|
-
exports.se_ListIndexesCommand = se_ListIndexesCommand;
|
|
190
|
-
const se_ListVectorBucketsCommand = async (input, context) => {
|
|
191
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
192
|
-
const headers = {
|
|
193
|
-
"content-type": "application/json",
|
|
194
|
-
};
|
|
195
|
-
b.bp("/ListVectorBuckets");
|
|
196
|
-
let body;
|
|
197
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
198
|
-
maxResults: [],
|
|
199
|
-
nextToken: [],
|
|
200
|
-
prefix: [],
|
|
201
|
-
}));
|
|
202
|
-
b.m("POST").h(headers).b(body);
|
|
203
|
-
return b.build();
|
|
204
|
-
};
|
|
205
|
-
exports.se_ListVectorBucketsCommand = se_ListVectorBucketsCommand;
|
|
206
|
-
const se_ListVectorsCommand = async (input, context) => {
|
|
207
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
208
|
-
const headers = {
|
|
209
|
-
"content-type": "application/json",
|
|
210
|
-
};
|
|
211
|
-
b.bp("/ListVectors");
|
|
212
|
-
let body;
|
|
213
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
214
|
-
indexArn: [],
|
|
215
|
-
indexName: [],
|
|
216
|
-
maxResults: [],
|
|
217
|
-
nextToken: [],
|
|
218
|
-
returnData: [],
|
|
219
|
-
returnMetadata: [],
|
|
220
|
-
segmentCount: [],
|
|
221
|
-
segmentIndex: [],
|
|
222
|
-
vectorBucketName: [],
|
|
223
|
-
}));
|
|
224
|
-
b.m("POST").h(headers).b(body);
|
|
225
|
-
return b.build();
|
|
226
|
-
};
|
|
227
|
-
exports.se_ListVectorsCommand = se_ListVectorsCommand;
|
|
228
|
-
const se_PutVectorBucketPolicyCommand = async (input, context) => {
|
|
229
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
230
|
-
const headers = {
|
|
231
|
-
"content-type": "application/json",
|
|
232
|
-
};
|
|
233
|
-
b.bp("/PutVectorBucketPolicy");
|
|
234
|
-
let body;
|
|
235
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
236
|
-
policy: [],
|
|
237
|
-
vectorBucketArn: [],
|
|
238
|
-
vectorBucketName: [],
|
|
239
|
-
}));
|
|
240
|
-
b.m("POST").h(headers).b(body);
|
|
241
|
-
return b.build();
|
|
242
|
-
};
|
|
243
|
-
exports.se_PutVectorBucketPolicyCommand = se_PutVectorBucketPolicyCommand;
|
|
244
|
-
const se_PutVectorsCommand = async (input, context) => {
|
|
245
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
246
|
-
const headers = {
|
|
247
|
-
"content-type": "application/json",
|
|
248
|
-
};
|
|
249
|
-
b.bp("/PutVectors");
|
|
250
|
-
let body;
|
|
251
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
252
|
-
indexArn: [],
|
|
253
|
-
indexName: [],
|
|
254
|
-
vectorBucketName: [],
|
|
255
|
-
vectors: (_) => se_PutVectorsInputList(_, context),
|
|
256
|
-
}));
|
|
257
|
-
b.m("POST").h(headers).b(body);
|
|
258
|
-
return b.build();
|
|
259
|
-
};
|
|
260
|
-
exports.se_PutVectorsCommand = se_PutVectorsCommand;
|
|
261
|
-
const se_QueryVectorsCommand = async (input, context) => {
|
|
262
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
263
|
-
const headers = {
|
|
264
|
-
"content-type": "application/json",
|
|
265
|
-
};
|
|
266
|
-
b.bp("/QueryVectors");
|
|
267
|
-
let body;
|
|
268
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
269
|
-
filter: (_) => se_Document(_, context),
|
|
270
|
-
indexArn: [],
|
|
271
|
-
indexName: [],
|
|
272
|
-
queryVector: (_) => se_VectorData(_, context),
|
|
273
|
-
returnDistance: [],
|
|
274
|
-
returnMetadata: [],
|
|
275
|
-
topK: [],
|
|
276
|
-
vectorBucketName: [],
|
|
277
|
-
}));
|
|
278
|
-
b.m("POST").h(headers).b(body);
|
|
279
|
-
return b.build();
|
|
280
|
-
};
|
|
281
|
-
exports.se_QueryVectorsCommand = se_QueryVectorsCommand;
|
|
282
|
-
const de_CreateIndexCommand = async (output, context) => {
|
|
283
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
284
|
-
return de_CommandError(output, context);
|
|
285
|
-
}
|
|
286
|
-
const contents = (0, smithy_client_1.map)({
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
});
|
|
289
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
290
|
-
return contents;
|
|
291
|
-
};
|
|
292
|
-
exports.de_CreateIndexCommand = de_CreateIndexCommand;
|
|
293
|
-
const de_CreateVectorBucketCommand = async (output, context) => {
|
|
294
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
295
|
-
return de_CommandError(output, context);
|
|
296
|
-
}
|
|
297
|
-
const contents = (0, smithy_client_1.map)({
|
|
298
|
-
$metadata: deserializeMetadata(output),
|
|
299
|
-
});
|
|
300
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
301
|
-
return contents;
|
|
302
|
-
};
|
|
303
|
-
exports.de_CreateVectorBucketCommand = de_CreateVectorBucketCommand;
|
|
304
|
-
const de_DeleteIndexCommand = async (output, context) => {
|
|
305
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
306
|
-
return de_CommandError(output, context);
|
|
307
|
-
}
|
|
308
|
-
const contents = (0, smithy_client_1.map)({
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
});
|
|
311
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
312
|
-
return contents;
|
|
313
|
-
};
|
|
314
|
-
exports.de_DeleteIndexCommand = de_DeleteIndexCommand;
|
|
315
|
-
const de_DeleteVectorBucketCommand = async (output, context) => {
|
|
316
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
|
-
return de_CommandError(output, context);
|
|
318
|
-
}
|
|
319
|
-
const contents = (0, smithy_client_1.map)({
|
|
320
|
-
$metadata: deserializeMetadata(output),
|
|
321
|
-
});
|
|
322
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
323
|
-
return contents;
|
|
324
|
-
};
|
|
325
|
-
exports.de_DeleteVectorBucketCommand = de_DeleteVectorBucketCommand;
|
|
326
|
-
const de_DeleteVectorBucketPolicyCommand = async (output, context) => {
|
|
327
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
328
|
-
return de_CommandError(output, context);
|
|
329
|
-
}
|
|
330
|
-
const contents = (0, smithy_client_1.map)({
|
|
331
|
-
$metadata: deserializeMetadata(output),
|
|
332
|
-
});
|
|
333
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
334
|
-
return contents;
|
|
335
|
-
};
|
|
336
|
-
exports.de_DeleteVectorBucketPolicyCommand = de_DeleteVectorBucketPolicyCommand;
|
|
337
|
-
const de_DeleteVectorsCommand = async (output, context) => {
|
|
338
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
339
|
-
return de_CommandError(output, context);
|
|
340
|
-
}
|
|
341
|
-
const contents = (0, smithy_client_1.map)({
|
|
342
|
-
$metadata: deserializeMetadata(output),
|
|
343
|
-
});
|
|
344
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
345
|
-
return contents;
|
|
346
|
-
};
|
|
347
|
-
exports.de_DeleteVectorsCommand = de_DeleteVectorsCommand;
|
|
348
|
-
const de_GetIndexCommand = async (output, context) => {
|
|
349
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
-
return de_CommandError(output, context);
|
|
351
|
-
}
|
|
352
|
-
const contents = (0, smithy_client_1.map)({
|
|
353
|
-
$metadata: deserializeMetadata(output),
|
|
354
|
-
});
|
|
355
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
356
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
357
|
-
index: (_) => de_Index(_, context),
|
|
358
|
-
});
|
|
359
|
-
Object.assign(contents, doc);
|
|
360
|
-
return contents;
|
|
361
|
-
};
|
|
362
|
-
exports.de_GetIndexCommand = de_GetIndexCommand;
|
|
363
|
-
const de_GetVectorBucketCommand = async (output, context) => {
|
|
364
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
365
|
-
return de_CommandError(output, context);
|
|
366
|
-
}
|
|
367
|
-
const contents = (0, smithy_client_1.map)({
|
|
368
|
-
$metadata: deserializeMetadata(output),
|
|
369
|
-
});
|
|
370
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
371
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
372
|
-
vectorBucket: (_) => de_VectorBucket(_, context),
|
|
373
|
-
});
|
|
374
|
-
Object.assign(contents, doc);
|
|
375
|
-
return contents;
|
|
376
|
-
};
|
|
377
|
-
exports.de_GetVectorBucketCommand = de_GetVectorBucketCommand;
|
|
378
|
-
const de_GetVectorBucketPolicyCommand = async (output, context) => {
|
|
379
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
380
|
-
return de_CommandError(output, context);
|
|
381
|
-
}
|
|
382
|
-
const contents = (0, smithy_client_1.map)({
|
|
383
|
-
$metadata: deserializeMetadata(output),
|
|
384
|
-
});
|
|
385
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
386
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
387
|
-
policy: smithy_client_1.expectString,
|
|
388
|
-
});
|
|
389
|
-
Object.assign(contents, doc);
|
|
390
|
-
return contents;
|
|
391
|
-
};
|
|
392
|
-
exports.de_GetVectorBucketPolicyCommand = de_GetVectorBucketPolicyCommand;
|
|
393
|
-
const de_GetVectorsCommand = async (output, context) => {
|
|
394
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
|
-
return de_CommandError(output, context);
|
|
396
|
-
}
|
|
397
|
-
const contents = (0, smithy_client_1.map)({
|
|
398
|
-
$metadata: deserializeMetadata(output),
|
|
399
|
-
});
|
|
400
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
401
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
-
vectors: (_) => de_GetVectorsOutputList(_, context),
|
|
403
|
-
});
|
|
404
|
-
Object.assign(contents, doc);
|
|
405
|
-
return contents;
|
|
406
|
-
};
|
|
407
|
-
exports.de_GetVectorsCommand = de_GetVectorsCommand;
|
|
408
|
-
const de_ListIndexesCommand = async (output, context) => {
|
|
409
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
-
return de_CommandError(output, context);
|
|
411
|
-
}
|
|
412
|
-
const contents = (0, smithy_client_1.map)({
|
|
413
|
-
$metadata: deserializeMetadata(output),
|
|
414
|
-
});
|
|
415
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
416
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
417
|
-
indexes: (_) => de_ListIndexesOutputList(_, context),
|
|
418
|
-
nextToken: smithy_client_1.expectString,
|
|
419
|
-
});
|
|
420
|
-
Object.assign(contents, doc);
|
|
421
|
-
return contents;
|
|
422
|
-
};
|
|
423
|
-
exports.de_ListIndexesCommand = de_ListIndexesCommand;
|
|
424
|
-
const de_ListVectorBucketsCommand = async (output, context) => {
|
|
425
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
426
|
-
return de_CommandError(output, context);
|
|
427
|
-
}
|
|
428
|
-
const contents = (0, smithy_client_1.map)({
|
|
429
|
-
$metadata: deserializeMetadata(output),
|
|
430
|
-
});
|
|
431
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
432
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
433
|
-
nextToken: smithy_client_1.expectString,
|
|
434
|
-
vectorBuckets: (_) => de_ListVectorBucketsOutputList(_, context),
|
|
435
|
-
});
|
|
436
|
-
Object.assign(contents, doc);
|
|
437
|
-
return contents;
|
|
438
|
-
};
|
|
439
|
-
exports.de_ListVectorBucketsCommand = de_ListVectorBucketsCommand;
|
|
440
|
-
const de_ListVectorsCommand = async (output, context) => {
|
|
441
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
442
|
-
return de_CommandError(output, context);
|
|
443
|
-
}
|
|
444
|
-
const contents = (0, smithy_client_1.map)({
|
|
445
|
-
$metadata: deserializeMetadata(output),
|
|
446
|
-
});
|
|
447
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
448
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
449
|
-
nextToken: smithy_client_1.expectString,
|
|
450
|
-
vectors: (_) => de_ListVectorsOutputList(_, context),
|
|
451
|
-
});
|
|
452
|
-
Object.assign(contents, doc);
|
|
453
|
-
return contents;
|
|
454
|
-
};
|
|
455
|
-
exports.de_ListVectorsCommand = de_ListVectorsCommand;
|
|
456
|
-
const de_PutVectorBucketPolicyCommand = async (output, context) => {
|
|
457
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
458
|
-
return de_CommandError(output, context);
|
|
459
|
-
}
|
|
460
|
-
const contents = (0, smithy_client_1.map)({
|
|
461
|
-
$metadata: deserializeMetadata(output),
|
|
462
|
-
});
|
|
463
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
464
|
-
return contents;
|
|
465
|
-
};
|
|
466
|
-
exports.de_PutVectorBucketPolicyCommand = de_PutVectorBucketPolicyCommand;
|
|
467
|
-
const de_PutVectorsCommand = async (output, context) => {
|
|
468
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
469
|
-
return de_CommandError(output, context);
|
|
470
|
-
}
|
|
471
|
-
const contents = (0, smithy_client_1.map)({
|
|
472
|
-
$metadata: deserializeMetadata(output),
|
|
473
|
-
});
|
|
474
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
475
|
-
return contents;
|
|
476
|
-
};
|
|
477
|
-
exports.de_PutVectorsCommand = de_PutVectorsCommand;
|
|
478
|
-
const de_QueryVectorsCommand = async (output, context) => {
|
|
479
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
|
-
return de_CommandError(output, context);
|
|
481
|
-
}
|
|
482
|
-
const contents = (0, smithy_client_1.map)({
|
|
483
|
-
$metadata: deserializeMetadata(output),
|
|
484
|
-
});
|
|
485
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
486
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
487
|
-
vectors: (_) => de_QueryVectorsOutputList(_, context),
|
|
488
|
-
});
|
|
489
|
-
Object.assign(contents, doc);
|
|
490
|
-
return contents;
|
|
491
|
-
};
|
|
492
|
-
exports.de_QueryVectorsCommand = de_QueryVectorsCommand;
|
|
493
|
-
const de_CommandError = async (output, context) => {
|
|
494
|
-
const parsedOutput = {
|
|
495
|
-
...output,
|
|
496
|
-
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
497
|
-
};
|
|
498
|
-
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
499
|
-
switch (errorCode) {
|
|
500
|
-
case "AccessDeniedException":
|
|
501
|
-
case "com.amazonaws.s3vectors#AccessDeniedException":
|
|
502
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
503
|
-
case "ConflictException":
|
|
504
|
-
case "com.amazonaws.s3vectors#ConflictException":
|
|
505
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
506
|
-
case "InternalServerException":
|
|
507
|
-
case "com.amazonaws.s3vectors#InternalServerException":
|
|
508
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
509
|
-
case "NotFoundException":
|
|
510
|
-
case "com.amazonaws.s3vectors#NotFoundException":
|
|
511
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
512
|
-
case "ServiceQuotaExceededException":
|
|
513
|
-
case "com.amazonaws.s3vectors#ServiceQuotaExceededException":
|
|
514
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
515
|
-
case "ServiceUnavailableException":
|
|
516
|
-
case "com.amazonaws.s3vectors#ServiceUnavailableException":
|
|
517
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
518
|
-
case "TooManyRequestsException":
|
|
519
|
-
case "com.amazonaws.s3vectors#TooManyRequestsException":
|
|
520
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
521
|
-
case "ValidationException":
|
|
522
|
-
case "com.amazonaws.s3vectors#ValidationException":
|
|
523
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
524
|
-
case "KmsDisabledException":
|
|
525
|
-
case "com.amazonaws.s3vectors#KmsDisabledException":
|
|
526
|
-
throw await de_KmsDisabledExceptionRes(parsedOutput, context);
|
|
527
|
-
case "KmsInvalidKeyUsageException":
|
|
528
|
-
case "com.amazonaws.s3vectors#KmsInvalidKeyUsageException":
|
|
529
|
-
throw await de_KmsInvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
530
|
-
case "KmsInvalidStateException":
|
|
531
|
-
case "com.amazonaws.s3vectors#KmsInvalidStateException":
|
|
532
|
-
throw await de_KmsInvalidStateExceptionRes(parsedOutput, context);
|
|
533
|
-
case "KmsNotFoundException":
|
|
534
|
-
case "com.amazonaws.s3vectors#KmsNotFoundException":
|
|
535
|
-
throw await de_KmsNotFoundExceptionRes(parsedOutput, context);
|
|
536
|
-
default:
|
|
537
|
-
const parsedBody = parsedOutput.body;
|
|
538
|
-
return throwDefaultError({
|
|
539
|
-
output,
|
|
540
|
-
parsedBody,
|
|
541
|
-
errorCode,
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(S3VectorsServiceException_1.S3VectorsServiceException);
|
|
546
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
547
|
-
const contents = (0, smithy_client_1.map)({});
|
|
548
|
-
const data = parsedOutput.body;
|
|
549
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
550
|
-
message: smithy_client_1.expectString,
|
|
551
|
-
});
|
|
552
|
-
Object.assign(contents, doc);
|
|
553
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
554
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
555
|
-
...contents,
|
|
556
|
-
});
|
|
557
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
558
|
-
};
|
|
559
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
560
|
-
const contents = (0, smithy_client_1.map)({});
|
|
561
|
-
const data = parsedOutput.body;
|
|
562
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
563
|
-
message: smithy_client_1.expectString,
|
|
564
|
-
});
|
|
565
|
-
Object.assign(contents, doc);
|
|
566
|
-
const exception = new models_0_1.ConflictException({
|
|
567
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
568
|
-
...contents,
|
|
569
|
-
});
|
|
570
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
571
|
-
};
|
|
572
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
573
|
-
const contents = (0, smithy_client_1.map)({});
|
|
574
|
-
const data = parsedOutput.body;
|
|
575
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
576
|
-
message: smithy_client_1.expectString,
|
|
577
|
-
});
|
|
578
|
-
Object.assign(contents, doc);
|
|
579
|
-
const exception = new models_0_1.InternalServerException({
|
|
580
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
581
|
-
...contents,
|
|
582
|
-
});
|
|
583
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
584
|
-
};
|
|
585
|
-
const de_KmsDisabledExceptionRes = async (parsedOutput, context) => {
|
|
586
|
-
const contents = (0, smithy_client_1.map)({});
|
|
587
|
-
const data = parsedOutput.body;
|
|
588
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
589
|
-
message: smithy_client_1.expectString,
|
|
590
|
-
});
|
|
591
|
-
Object.assign(contents, doc);
|
|
592
|
-
const exception = new models_0_1.KmsDisabledException({
|
|
593
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
594
|
-
...contents,
|
|
595
|
-
});
|
|
596
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
597
|
-
};
|
|
598
|
-
const de_KmsInvalidKeyUsageExceptionRes = async (parsedOutput, context) => {
|
|
599
|
-
const contents = (0, smithy_client_1.map)({});
|
|
600
|
-
const data = parsedOutput.body;
|
|
601
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
602
|
-
message: smithy_client_1.expectString,
|
|
603
|
-
});
|
|
604
|
-
Object.assign(contents, doc);
|
|
605
|
-
const exception = new models_0_1.KmsInvalidKeyUsageException({
|
|
606
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
607
|
-
...contents,
|
|
608
|
-
});
|
|
609
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
610
|
-
};
|
|
611
|
-
const de_KmsInvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
612
|
-
const contents = (0, smithy_client_1.map)({});
|
|
613
|
-
const data = parsedOutput.body;
|
|
614
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
615
|
-
message: smithy_client_1.expectString,
|
|
616
|
-
});
|
|
617
|
-
Object.assign(contents, doc);
|
|
618
|
-
const exception = new models_0_1.KmsInvalidStateException({
|
|
619
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
620
|
-
...contents,
|
|
621
|
-
});
|
|
622
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
623
|
-
};
|
|
624
|
-
const de_KmsNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
625
|
-
const contents = (0, smithy_client_1.map)({});
|
|
626
|
-
const data = parsedOutput.body;
|
|
627
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
628
|
-
message: smithy_client_1.expectString,
|
|
629
|
-
});
|
|
630
|
-
Object.assign(contents, doc);
|
|
631
|
-
const exception = new models_0_1.KmsNotFoundException({
|
|
632
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
633
|
-
...contents,
|
|
634
|
-
});
|
|
635
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
636
|
-
};
|
|
637
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
638
|
-
const contents = (0, smithy_client_1.map)({});
|
|
639
|
-
const data = parsedOutput.body;
|
|
640
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
641
|
-
message: smithy_client_1.expectString,
|
|
642
|
-
});
|
|
643
|
-
Object.assign(contents, doc);
|
|
644
|
-
const exception = new models_0_1.NotFoundException({
|
|
645
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
646
|
-
...contents,
|
|
647
|
-
});
|
|
648
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
649
|
-
};
|
|
650
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
651
|
-
const contents = (0, smithy_client_1.map)({});
|
|
652
|
-
const data = parsedOutput.body;
|
|
653
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
654
|
-
message: smithy_client_1.expectString,
|
|
655
|
-
});
|
|
656
|
-
Object.assign(contents, doc);
|
|
657
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
658
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
659
|
-
...contents,
|
|
660
|
-
});
|
|
661
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
662
|
-
};
|
|
663
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
664
|
-
const contents = (0, smithy_client_1.map)({});
|
|
665
|
-
const data = parsedOutput.body;
|
|
666
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
667
|
-
message: smithy_client_1.expectString,
|
|
668
|
-
});
|
|
669
|
-
Object.assign(contents, doc);
|
|
670
|
-
const exception = new models_0_1.ServiceUnavailableException({
|
|
671
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
672
|
-
...contents,
|
|
673
|
-
});
|
|
674
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
675
|
-
};
|
|
676
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
677
|
-
const contents = (0, smithy_client_1.map)({});
|
|
678
|
-
const data = parsedOutput.body;
|
|
679
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
680
|
-
message: smithy_client_1.expectString,
|
|
681
|
-
});
|
|
682
|
-
Object.assign(contents, doc);
|
|
683
|
-
const exception = new models_0_1.TooManyRequestsException({
|
|
684
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
685
|
-
...contents,
|
|
686
|
-
});
|
|
687
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
688
|
-
};
|
|
689
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
690
|
-
const contents = (0, smithy_client_1.map)({});
|
|
691
|
-
const data = parsedOutput.body;
|
|
692
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
693
|
-
fieldList: smithy_client_1._json,
|
|
694
|
-
message: smithy_client_1.expectString,
|
|
695
|
-
});
|
|
696
|
-
Object.assign(contents, doc);
|
|
697
|
-
const exception = new models_0_1.ValidationException({
|
|
698
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
699
|
-
...contents,
|
|
700
|
-
});
|
|
701
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
702
|
-
};
|
|
703
|
-
const se_Float32VectorData = (input, context) => {
|
|
704
|
-
return input
|
|
705
|
-
.filter((e) => e != null)
|
|
706
|
-
.map((entry) => {
|
|
707
|
-
return (0, smithy_client_1.serializeFloat)(entry);
|
|
708
|
-
});
|
|
709
|
-
};
|
|
710
|
-
const se_PutInputVector = (input, context) => {
|
|
711
|
-
return (0, smithy_client_1.take)(input, {
|
|
712
|
-
data: (_) => se_VectorData(_, context),
|
|
713
|
-
key: [],
|
|
714
|
-
metadata: (_) => se_VectorMetadata(_, context),
|
|
715
|
-
});
|
|
716
|
-
};
|
|
717
|
-
const se_PutVectorsInputList = (input, context) => {
|
|
718
|
-
return input
|
|
719
|
-
.filter((e) => e != null)
|
|
720
|
-
.map((entry) => {
|
|
721
|
-
return se_PutInputVector(entry, context);
|
|
722
|
-
});
|
|
723
|
-
};
|
|
724
|
-
const se_VectorData = (input, context) => {
|
|
725
|
-
return models_0_1.VectorData.visit(input, {
|
|
726
|
-
float32: (value) => ({ float32: se_Float32VectorData(value, context) }),
|
|
727
|
-
_: (name, value) => ({ [name]: value }),
|
|
728
|
-
});
|
|
729
|
-
};
|
|
730
|
-
const se_VectorMetadata = (input, context) => {
|
|
731
|
-
return input;
|
|
732
|
-
};
|
|
733
|
-
const se_Document = (input, context) => {
|
|
734
|
-
return input;
|
|
735
|
-
};
|
|
736
|
-
const de_Float32VectorData = (output, context) => {
|
|
737
|
-
const retVal = (output || [])
|
|
738
|
-
.filter((e) => e != null)
|
|
739
|
-
.map((entry) => {
|
|
740
|
-
return (0, smithy_client_1.limitedParseFloat32)(entry);
|
|
741
|
-
});
|
|
742
|
-
return retVal;
|
|
743
|
-
};
|
|
744
|
-
const de_GetOutputVector = (output, context) => {
|
|
745
|
-
return (0, smithy_client_1.take)(output, {
|
|
746
|
-
data: (_) => de_VectorData((0, core_1.awsExpectUnion)(_), context),
|
|
747
|
-
key: smithy_client_1.expectString,
|
|
748
|
-
metadata: (_) => de_VectorMetadata(_, context),
|
|
749
|
-
});
|
|
750
|
-
};
|
|
751
|
-
const de_GetVectorsOutputList = (output, context) => {
|
|
752
|
-
const retVal = (output || [])
|
|
753
|
-
.filter((e) => e != null)
|
|
754
|
-
.map((entry) => {
|
|
755
|
-
return de_GetOutputVector(entry, context);
|
|
756
|
-
});
|
|
757
|
-
return retVal;
|
|
758
|
-
};
|
|
759
|
-
const de_Index = (output, context) => {
|
|
760
|
-
return (0, smithy_client_1.take)(output, {
|
|
761
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
762
|
-
dataType: smithy_client_1.expectString,
|
|
763
|
-
dimension: smithy_client_1.expectInt32,
|
|
764
|
-
distanceMetric: smithy_client_1.expectString,
|
|
765
|
-
indexArn: smithy_client_1.expectString,
|
|
766
|
-
indexName: smithy_client_1.expectString,
|
|
767
|
-
metadataConfiguration: smithy_client_1._json,
|
|
768
|
-
vectorBucketName: smithy_client_1.expectString,
|
|
769
|
-
});
|
|
770
|
-
};
|
|
771
|
-
const de_IndexSummary = (output, context) => {
|
|
772
|
-
return (0, smithy_client_1.take)(output, {
|
|
773
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
774
|
-
indexArn: smithy_client_1.expectString,
|
|
775
|
-
indexName: smithy_client_1.expectString,
|
|
776
|
-
vectorBucketName: smithy_client_1.expectString,
|
|
777
|
-
});
|
|
778
|
-
};
|
|
779
|
-
const de_ListIndexesOutputList = (output, context) => {
|
|
780
|
-
const retVal = (output || [])
|
|
781
|
-
.filter((e) => e != null)
|
|
782
|
-
.map((entry) => {
|
|
783
|
-
return de_IndexSummary(entry, context);
|
|
784
|
-
});
|
|
785
|
-
return retVal;
|
|
786
|
-
};
|
|
787
|
-
const de_ListOutputVector = (output, context) => {
|
|
788
|
-
return (0, smithy_client_1.take)(output, {
|
|
789
|
-
data: (_) => de_VectorData((0, core_1.awsExpectUnion)(_), context),
|
|
790
|
-
key: smithy_client_1.expectString,
|
|
791
|
-
metadata: (_) => de_VectorMetadata(_, context),
|
|
792
|
-
});
|
|
793
|
-
};
|
|
794
|
-
const de_ListVectorBucketsOutputList = (output, context) => {
|
|
795
|
-
const retVal = (output || [])
|
|
796
|
-
.filter((e) => e != null)
|
|
797
|
-
.map((entry) => {
|
|
798
|
-
return de_VectorBucketSummary(entry, context);
|
|
799
|
-
});
|
|
800
|
-
return retVal;
|
|
801
|
-
};
|
|
802
|
-
const de_ListVectorsOutputList = (output, context) => {
|
|
803
|
-
const retVal = (output || [])
|
|
804
|
-
.filter((e) => e != null)
|
|
805
|
-
.map((entry) => {
|
|
806
|
-
return de_ListOutputVector(entry, context);
|
|
807
|
-
});
|
|
808
|
-
return retVal;
|
|
809
|
-
};
|
|
810
|
-
const de_QueryOutputVector = (output, context) => {
|
|
811
|
-
return (0, smithy_client_1.take)(output, {
|
|
812
|
-
data: (_) => de_VectorData((0, core_1.awsExpectUnion)(_), context),
|
|
813
|
-
distance: smithy_client_1.limitedParseFloat32,
|
|
814
|
-
key: smithy_client_1.expectString,
|
|
815
|
-
metadata: (_) => de_VectorMetadata(_, context),
|
|
816
|
-
});
|
|
817
|
-
};
|
|
818
|
-
const de_QueryVectorsOutputList = (output, context) => {
|
|
819
|
-
const retVal = (output || [])
|
|
820
|
-
.filter((e) => e != null)
|
|
821
|
-
.map((entry) => {
|
|
822
|
-
return de_QueryOutputVector(entry, context);
|
|
823
|
-
});
|
|
824
|
-
return retVal;
|
|
825
|
-
};
|
|
826
|
-
const de_VectorBucket = (output, context) => {
|
|
827
|
-
return (0, smithy_client_1.take)(output, {
|
|
828
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
829
|
-
encryptionConfiguration: smithy_client_1._json,
|
|
830
|
-
vectorBucketArn: smithy_client_1.expectString,
|
|
831
|
-
vectorBucketName: smithy_client_1.expectString,
|
|
832
|
-
});
|
|
833
|
-
};
|
|
834
|
-
const de_VectorBucketSummary = (output, context) => {
|
|
835
|
-
return (0, smithy_client_1.take)(output, {
|
|
836
|
-
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
837
|
-
vectorBucketArn: smithy_client_1.expectString,
|
|
838
|
-
vectorBucketName: smithy_client_1.expectString,
|
|
839
|
-
});
|
|
840
|
-
};
|
|
841
|
-
const de_VectorData = (output, context) => {
|
|
842
|
-
if (output.float32 != null) {
|
|
843
|
-
return {
|
|
844
|
-
float32: de_Float32VectorData(output.float32, context),
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
return { $unknown: Object.entries(output)[0] };
|
|
848
|
-
};
|
|
849
|
-
const de_VectorMetadata = (output, context) => {
|
|
850
|
-
return output;
|
|
851
|
-
};
|
|
852
|
-
const deserializeMetadata = (output) => ({
|
|
853
|
-
httpStatusCode: output.statusCode,
|
|
854
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
855
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
856
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
857
|
-
});
|
|
858
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|