@aws-sdk/client-s3vectors 3.1069.0 → 3.1071.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 +4 -0
- package/dist-cjs/schemas/schemas_0.js +4 -4
- package/dist-es/S3Vectors.js +2 -0
- package/dist-es/pagination/QueryVectorsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/schemas/schemas_0.js +4 -4
- package/dist-types/S3Vectors.d.ts +7 -0
- package/dist-types/commands/QueryVectorsCommand.d.ts +3 -1
- package/dist-types/models/models_0.d.ts +10 -0
- package/dist-types/pagination/QueryVectorsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/S3Vectors.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/dist-types/ts3.4/pagination/QueryVectorsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -343,6 +343,8 @@ const paginateListVectorBuckets = createPaginator(S3VectorsClient, ListVectorBuc
|
|
|
343
343
|
|
|
344
344
|
const paginateListVectors = createPaginator(S3VectorsClient, ListVectorsCommand, "nextToken", "nextToken", "maxResults");
|
|
345
345
|
|
|
346
|
+
const paginateQueryVectors = createPaginator(S3VectorsClient, QueryVectorsCommand, "nextToken", "nextToken", "");
|
|
347
|
+
|
|
346
348
|
const commands = {
|
|
347
349
|
CreateIndexCommand,
|
|
348
350
|
CreateVectorBucketCommand,
|
|
@@ -368,6 +370,7 @@ const paginators = {
|
|
|
368
370
|
paginateListIndexes,
|
|
369
371
|
paginateListVectorBuckets,
|
|
370
372
|
paginateListVectors,
|
|
373
|
+
paginateQueryVectors,
|
|
371
374
|
};
|
|
372
375
|
class S3Vectors extends S3VectorsClient {
|
|
373
376
|
}
|
|
@@ -412,3 +415,4 @@ exports.UntagResourceCommand = UntagResourceCommand;
|
|
|
412
415
|
exports.paginateListIndexes = paginateListIndexes;
|
|
413
416
|
exports.paginateListVectorBuckets = paginateListVectorBuckets;
|
|
414
417
|
exports.paginateListVectors = paginateListVectors;
|
|
418
|
+
exports.paginateQueryVectors = paginateQueryVectors;
|
|
@@ -482,14 +482,14 @@ const QueryOutputVector$ = [3, n0, _QOV,
|
|
|
482
482
|
exports.QueryOutputVector$ = QueryOutputVector$;
|
|
483
483
|
const QueryVectorsInput$ = [3, n0, _QVI,
|
|
484
484
|
0,
|
|
485
|
-
[_tK, _qV, _vBN, _iN, _iA, _f, _rM, _rDe],
|
|
486
|
-
[1, () => VectorData$, 0, 0, 0, 15, 2, 2], 2
|
|
485
|
+
[_tK, _qV, _vBN, _iN, _iA, _f, _rM, _rDe, _nT],
|
|
486
|
+
[1, () => VectorData$, 0, 0, 0, 15, 2, 2, 0], 2
|
|
487
487
|
];
|
|
488
488
|
exports.QueryVectorsInput$ = QueryVectorsInput$;
|
|
489
489
|
const QueryVectorsOutput$ = [3, n0, _QVO,
|
|
490
490
|
0,
|
|
491
|
-
[_v, _dM],
|
|
492
|
-
[() => QueryVectorsOutputList, 0], 2
|
|
491
|
+
[_v, _dM, _nT],
|
|
492
|
+
[() => QueryVectorsOutputList, 0, 0], 2
|
|
493
493
|
];
|
|
494
494
|
exports.QueryVectorsOutput$ = QueryVectorsOutput$;
|
|
495
495
|
const TagResourceInput$ = [3, n0, _TRI,
|
package/dist-es/S3Vectors.js
CHANGED
|
@@ -21,6 +21,7 @@ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
|
21
21
|
import { paginateListIndexes } from "./pagination/ListIndexesPaginator";
|
|
22
22
|
import { paginateListVectorBuckets } from "./pagination/ListVectorBucketsPaginator";
|
|
23
23
|
import { paginateListVectors } from "./pagination/ListVectorsPaginator";
|
|
24
|
+
import { paginateQueryVectors } from "./pagination/QueryVectorsPaginator";
|
|
24
25
|
import { S3VectorsClient } from "./S3VectorsClient";
|
|
25
26
|
const commands = {
|
|
26
27
|
CreateIndexCommand,
|
|
@@ -47,6 +48,7 @@ const paginators = {
|
|
|
47
48
|
paginateListIndexes,
|
|
48
49
|
paginateListVectorBuckets,
|
|
49
50
|
paginateListVectors,
|
|
51
|
+
paginateQueryVectors,
|
|
50
52
|
};
|
|
51
53
|
export class S3Vectors extends S3VectorsClient {
|
|
52
54
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { QueryVectorsCommand, } from "../commands/QueryVectorsCommand";
|
|
3
|
+
import { S3VectorsClient } from "../S3VectorsClient";
|
|
4
|
+
export const paginateQueryVectors = createPaginator(S3VectorsClient, QueryVectorsCommand, "nextToken", "nextToken", "");
|
|
@@ -428,13 +428,13 @@ export var QueryOutputVector$ = [3, n0, _QOV,
|
|
|
428
428
|
];
|
|
429
429
|
export var QueryVectorsInput$ = [3, n0, _QVI,
|
|
430
430
|
0,
|
|
431
|
-
[_tK, _qV, _vBN, _iN, _iA, _f, _rM, _rDe],
|
|
432
|
-
[1, () => VectorData$, 0, 0, 0, 15, 2, 2], 2
|
|
431
|
+
[_tK, _qV, _vBN, _iN, _iA, _f, _rM, _rDe, _nT],
|
|
432
|
+
[1, () => VectorData$, 0, 0, 0, 15, 2, 2, 0], 2
|
|
433
433
|
];
|
|
434
434
|
export var QueryVectorsOutput$ = [3, n0, _QVO,
|
|
435
435
|
0,
|
|
436
|
-
[_v, _dM],
|
|
437
|
-
[() => QueryVectorsOutputList, 0], 2
|
|
436
|
+
[_v, _dM, _nT],
|
|
437
|
+
[() => QueryVectorsOutputList, 0, 0], 2
|
|
438
438
|
];
|
|
439
439
|
export var TagResourceInput$ = [3, n0, _TRI,
|
|
440
440
|
0,
|
|
@@ -164,6 +164,13 @@ export interface S3Vectors {
|
|
|
164
164
|
* @returns AsyncIterable of {@link ListVectorsCommandOutput}.
|
|
165
165
|
*/
|
|
166
166
|
paginateListVectors(args?: ListVectorsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListVectorsCommandOutput>;
|
|
167
|
+
/**
|
|
168
|
+
* @see {@link QueryVectorsCommand}
|
|
169
|
+
* @param args - command input.
|
|
170
|
+
* @param paginationConfig - optional pagination config.
|
|
171
|
+
* @returns AsyncIterable of {@link QueryVectorsCommandOutput}.
|
|
172
|
+
*/
|
|
173
|
+
paginateQueryVectors(args: QueryVectorsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<QueryVectorsCommandOutput>;
|
|
167
174
|
}
|
|
168
175
|
/**
|
|
169
176
|
* <p>Amazon S3 vector buckets are a bucket type to store and search vectors with sub-second search times. They are designed to provide dedicated API operations for you to interact with vectors to do similarity search. Within a vector bucket, you use a vector index to organize and logically group your vector data. When you make a write or read request, you direct it to a single vector index. You store your vector data as vectors. A vector contains a key (a name that you assign), a multi-dimensional vector, and, optionally, metadata that describes a vector. The key uniquely identifies the vector in a vector index.</p>
|
|
@@ -29,7 +29,7 @@ declare const QueryVectorsCommand_base: {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
|
-
* <p>Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response)
|
|
32
|
+
* <p>Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response) and metadata of each vector in the response.</p> <p>To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN). </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3vectors:QueryVectors</code> permission to use this operation. Additional permissions are required based on the request parameters you specify:</p> <ul> <li> <p>With only <code>s3vectors:QueryVectors</code> permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request metadata (by keeping the <code>returnMetadata</code> parameter set to <code>false</code> or not specified).</p> </li> <li> <p>If you specify a metadata filter or set <code>returnMetadata</code> to true, you must have both <code>s3vectors:QueryVectors</code> and <code>s3vectors:GetVectors</code> permissions. The request fails with a <code>403 Forbidden error</code> if you request metadata filtering or metadata without the <code>s3vectors:GetVectors</code> permission.</p> </li> </ul> </dd> </dl>
|
|
33
33
|
* @example
|
|
34
34
|
* Use a bare-bones client and the command you need to make an API call.
|
|
35
35
|
* ```javascript
|
|
@@ -51,6 +51,7 @@ declare const QueryVectorsCommand_base: {
|
|
|
51
51
|
* filter: "DOCUMENT_VALUE",
|
|
52
52
|
* returnMetadata: true || false,
|
|
53
53
|
* returnDistance: true || false,
|
|
54
|
+
* nextToken: "STRING_VALUE",
|
|
54
55
|
* };
|
|
55
56
|
* const command = new QueryVectorsCommand(input);
|
|
56
57
|
* const response = await client.send(command);
|
|
@@ -63,6 +64,7 @@ declare const QueryVectorsCommand_base: {
|
|
|
63
64
|
* // },
|
|
64
65
|
* // ],
|
|
65
66
|
* // distanceMetric: "euclidean" || "cosine", // required
|
|
67
|
+
* // nextToken: "STRING_VALUE",
|
|
66
68
|
* // };
|
|
67
69
|
*
|
|
68
70
|
* ```
|
|
@@ -736,6 +736,11 @@ export interface QueryVectorsInput {
|
|
|
736
736
|
* @public
|
|
737
737
|
*/
|
|
738
738
|
returnDistance?: boolean | undefined;
|
|
739
|
+
/**
|
|
740
|
+
* <p>Pagination token from a previous request. The value of this field is empty for an initial request.</p>
|
|
741
|
+
* @public
|
|
742
|
+
*/
|
|
743
|
+
nextToken?: string | undefined;
|
|
739
744
|
}
|
|
740
745
|
/**
|
|
741
746
|
* <p>The attributes of a vector in the approximate nearest neighbor search.</p>
|
|
@@ -772,6 +777,11 @@ export interface QueryVectorsOutput {
|
|
|
772
777
|
* @public
|
|
773
778
|
*/
|
|
774
779
|
distanceMetric: DistanceMetric | undefined;
|
|
780
|
+
/**
|
|
781
|
+
* <p>Pagination token to be used in the subsequent page request. The field is empty if no further pagination is required.</p>
|
|
782
|
+
* @public
|
|
783
|
+
*/
|
|
784
|
+
nextToken?: string | undefined;
|
|
775
785
|
}
|
|
776
786
|
/**
|
|
777
787
|
* @public
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Paginator } from "@smithy/types";
|
|
2
|
+
import { QueryVectorsCommandInput, QueryVectorsCommandOutput } from "../commands/QueryVectorsCommand";
|
|
3
|
+
import type { S3VectorsPaginationConfiguration } from "./Interfaces";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const paginateQueryVectors: (config: S3VectorsPaginationConfiguration, input: QueryVectorsCommandInput, ...rest: any[]) => Paginator<QueryVectorsCommandOutput>;
|
|
@@ -358,5 +358,12 @@ export interface S3Vectors {
|
|
|
358
358
|
Exclude<keyof PaginationConfiguration, "client">
|
|
359
359
|
>
|
|
360
360
|
): Paginator<ListVectorsCommandOutput>;
|
|
361
|
+
paginateQueryVectors(
|
|
362
|
+
args: QueryVectorsCommandInput,
|
|
363
|
+
paginationConfig?: Pick<
|
|
364
|
+
PaginationConfiguration,
|
|
365
|
+
Exclude<keyof PaginationConfiguration, "client">
|
|
366
|
+
>
|
|
367
|
+
): Paginator<QueryVectorsCommandOutput>;
|
|
361
368
|
}
|
|
362
369
|
export declare class S3Vectors extends S3VectorsClient implements S3Vectors {}
|
|
@@ -184,6 +184,7 @@ export interface QueryVectorsInput {
|
|
|
184
184
|
filter?: __DocumentType | undefined;
|
|
185
185
|
returnMetadata?: boolean | undefined;
|
|
186
186
|
returnDistance?: boolean | undefined;
|
|
187
|
+
nextToken?: string | undefined;
|
|
187
188
|
}
|
|
188
189
|
export interface QueryOutputVector {
|
|
189
190
|
distance?: number | undefined;
|
|
@@ -193,6 +194,7 @@ export interface QueryOutputVector {
|
|
|
193
194
|
export interface QueryVectorsOutput {
|
|
194
195
|
vectors: QueryOutputVector[] | undefined;
|
|
195
196
|
distanceMetric: DistanceMetric | undefined;
|
|
197
|
+
nextToken?: string | undefined;
|
|
196
198
|
}
|
|
197
199
|
export interface ListTagsForResourceInput {
|
|
198
200
|
resourceArn: string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Paginator } from "@smithy/types";
|
|
2
|
+
import {
|
|
3
|
+
QueryVectorsCommandInput,
|
|
4
|
+
QueryVectorsCommandOutput,
|
|
5
|
+
} from "../commands/QueryVectorsCommand";
|
|
6
|
+
import { S3VectorsPaginationConfiguration } from "./Interfaces";
|
|
7
|
+
export declare const paginateQueryVectors: (
|
|
8
|
+
config: S3VectorsPaginationConfiguration,
|
|
9
|
+
input: QueryVectorsCommandInput,
|
|
10
|
+
...rest: any[]
|
|
11
|
+
) => Paginator<QueryVectorsCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-s3vectors",
|
|
3
3
|
"description": "AWS SDK for JavaScript S3vectors Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1071.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
25
25
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
26
|
-
"@aws-sdk/core": "^3.974.
|
|
27
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
26
|
+
"@aws-sdk/core": "^3.974.22",
|
|
27
|
+
"@aws-sdk/credential-provider-node": "^3.972.57",
|
|
28
28
|
"@aws-sdk/types": "^3.973.13",
|
|
29
29
|
"@smithy/core": "^3.24.6",
|
|
30
30
|
"@smithy/fetch-http-handler": "^5.4.6",
|