@supabase/storage-js 2.84.0 → 2.84.1-canary.1
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/main/StorageClient.d.ts +1 -15
- package/dist/main/StorageClient.d.ts.map +1 -1
- package/dist/main/StorageClient.js +1 -15
- package/dist/main/StorageClient.js.map +1 -1
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts +18 -47
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts.map +1 -1
- package/dist/main/lib/vectors/StorageVectorsClient.js +18 -47
- package/dist/main/lib/vectors/StorageVectorsClient.js.map +1 -1
- package/dist/main/lib/vectors/VectorBucketApi.d.ts +9 -153
- package/dist/main/lib/vectors/VectorBucketApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorBucketApi.js +9 -153
- package/dist/main/lib/vectors/VectorBucketApi.js.map +1 -1
- package/dist/main/lib/vectors/VectorDataApi.d.ts +10 -258
- package/dist/main/lib/vectors/VectorDataApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorDataApi.js +10 -258
- package/dist/main/lib/vectors/VectorDataApi.js.map +1 -1
- package/dist/main/lib/vectors/VectorIndexApi.d.ts +9 -177
- package/dist/main/lib/vectors/VectorIndexApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorIndexApi.js +9 -176
- package/dist/main/lib/vectors/VectorIndexApi.js.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.d.ts.map +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/main/lib/version.js.map +1 -1
- package/dist/main/packages/StorageAnalyticsClient.d.ts +6 -2
- package/dist/main/packages/StorageAnalyticsClient.d.ts.map +1 -1
- package/dist/main/packages/StorageAnalyticsClient.js +6 -2
- package/dist/main/packages/StorageAnalyticsClient.js.map +1 -1
- package/dist/module/StorageClient.d.ts +1 -15
- package/dist/module/StorageClient.d.ts.map +1 -1
- package/dist/module/StorageClient.js +1 -15
- package/dist/module/StorageClient.js.map +1 -1
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts +18 -47
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts.map +1 -1
- package/dist/module/lib/vectors/StorageVectorsClient.js +18 -47
- package/dist/module/lib/vectors/StorageVectorsClient.js.map +1 -1
- package/dist/module/lib/vectors/VectorBucketApi.d.ts +9 -153
- package/dist/module/lib/vectors/VectorBucketApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorBucketApi.js +9 -153
- package/dist/module/lib/vectors/VectorBucketApi.js.map +1 -1
- package/dist/module/lib/vectors/VectorDataApi.d.ts +10 -258
- package/dist/module/lib/vectors/VectorDataApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorDataApi.js +10 -258
- package/dist/module/lib/vectors/VectorDataApi.js.map +1 -1
- package/dist/module/lib/vectors/VectorIndexApi.d.ts +9 -177
- package/dist/module/lib/vectors/VectorIndexApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorIndexApi.js +9 -176
- package/dist/module/lib/vectors/VectorIndexApi.js.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.d.ts.map +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/module/lib/version.js.map +1 -1
- package/dist/module/packages/StorageAnalyticsClient.d.ts +6 -2
- package/dist/module/packages/StorageAnalyticsClient.d.ts.map +1 -1
- package/dist/module/packages/StorageAnalyticsClient.js +6 -2
- package/dist/module/packages/StorageAnalyticsClient.js.map +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/umd/supabase.js +1 -1
- package/package.json +1 -1
- package/src/StorageClient.ts +1 -15
- package/src/lib/vectors/StorageVectorsClient.ts +18 -47
- package/src/lib/vectors/VectorBucketApi.ts +9 -153
- package/src/lib/vectors/VectorDataApi.ts +10 -258
- package/src/lib/vectors/VectorIndexApi.ts +9 -177
- package/src/lib/version.ts +1 -1
- package/src/packages/StorageAnalyticsClient.ts +6 -2
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Fetch } from './fetch';
|
|
2
2
|
import { ApiResponse, PutVectorsOptions, GetVectorsOptions, GetVectorsResponse, DeleteVectorsOptions, ListVectorsOptions, ListVectorsResponse, QueryVectorsOptions, QueryVectorsResponse } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* API class for managing Vector Data within Vector Indexes
|
|
8
|
-
* Provides methods for inserting, querying, listing, and deleting vector embeddings
|
|
9
|
-
*
|
|
10
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
4
|
+
* @hidden
|
|
5
|
+
* Base implementation for vector data operations.
|
|
6
|
+
* Use {@link VectorIndexScope} via `supabase.storage.vectors.from('bucket').index('idx')` instead.
|
|
11
7
|
*/
|
|
12
8
|
export default class VectorDataApi {
|
|
13
9
|
protected url: string;
|
|
@@ -16,265 +12,21 @@ export default class VectorDataApi {
|
|
|
16
12
|
};
|
|
17
13
|
protected fetch: Fetch;
|
|
18
14
|
protected shouldThrowOnError: boolean;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @alpha
|
|
22
|
-
*
|
|
23
|
-
* Creates a VectorDataApi bound to a Storage Vectors deployment.
|
|
24
|
-
*
|
|
25
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
26
|
-
*
|
|
27
|
-
* @category Vector Buckets
|
|
28
|
-
* @param url - Base URL for the Storage Vectors API.
|
|
29
|
-
* @param headers - Default headers (for example authentication tokens).
|
|
30
|
-
* @param fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* const client = new VectorDataApi(url, headers)
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
15
|
+
/** Creates a new VectorDataApi instance */
|
|
37
16
|
constructor(url: string, headers?: {
|
|
38
17
|
[key: string]: string;
|
|
39
18
|
}, fetch?: Fetch);
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @alpha
|
|
43
|
-
*
|
|
44
|
-
* Enable throwing errors instead of returning them in the response
|
|
45
|
-
* When enabled, failed operations will throw instead of returning { data: null, error }
|
|
46
|
-
*
|
|
47
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
48
|
-
*
|
|
49
|
-
* @category Vector Buckets
|
|
50
|
-
* @returns This instance for method chaining
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const client = new VectorDataApi(url, headers)
|
|
54
|
-
* client.throwOnError()
|
|
55
|
-
* const { data } = await client.putVectors(options) // throws on error
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
19
|
+
/** Enable throwing errors instead of returning them in the response */
|
|
58
20
|
throwOnError(): this;
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @alpha
|
|
62
|
-
*
|
|
63
|
-
* Inserts or updates vectors in batch (upsert operation)
|
|
64
|
-
* Accepts 1-500 vectors per request. Larger batches should be split
|
|
65
|
-
*
|
|
66
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
67
|
-
*
|
|
68
|
-
* @category Vector Buckets
|
|
69
|
-
* @param options - Vector insertion options
|
|
70
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
71
|
-
* @param options.indexName - Name of the target index
|
|
72
|
-
* @param options.vectors - Array of vectors to insert/update (1-500 items)
|
|
73
|
-
* @returns Promise with empty response on success or error
|
|
74
|
-
*
|
|
75
|
-
* @throws {StorageVectorsApiError} With code:
|
|
76
|
-
* - `S3VectorConflictException` if duplicate key conflict occurs (HTTP 409)
|
|
77
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
78
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```typescript
|
|
82
|
-
* const { data, error } = await client.putVectors({
|
|
83
|
-
* vectorBucketName: 'embeddings-prod',
|
|
84
|
-
* indexName: 'documents-openai-small',
|
|
85
|
-
* vectors: [
|
|
86
|
-
* {
|
|
87
|
-
* key: 'doc-1',
|
|
88
|
-
* data: { float32: [0.1, 0.2, 0.3, ...] }, // 1536 dimensions
|
|
89
|
-
* metadata: { title: 'Introduction', page: 1 }
|
|
90
|
-
* },
|
|
91
|
-
* {
|
|
92
|
-
* key: 'doc-2',
|
|
93
|
-
* data: { float32: [0.4, 0.5, 0.6, ...] },
|
|
94
|
-
* metadata: { title: 'Conclusion', page: 42 }
|
|
95
|
-
* }
|
|
96
|
-
* ]
|
|
97
|
-
* })
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
21
|
+
/** Inserts or updates vectors in batch (1-500 per request) */
|
|
100
22
|
putVectors(options: PutVectorsOptions): Promise<ApiResponse<undefined>>;
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @alpha
|
|
104
|
-
*
|
|
105
|
-
* Retrieves vectors by their keys in batch
|
|
106
|
-
* Optionally includes vector data and/or metadata in response
|
|
107
|
-
* Additional permissions required when returning data or metadata
|
|
108
|
-
*
|
|
109
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
110
|
-
*
|
|
111
|
-
* @category Vector Buckets
|
|
112
|
-
* @param options - Vector retrieval options
|
|
113
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
114
|
-
* @param options.indexName - Name of the index
|
|
115
|
-
* @param options.keys - Array of vector keys to retrieve
|
|
116
|
-
* @param options.returnData - Whether to include vector embeddings (requires permission)
|
|
117
|
-
* @param options.returnMetadata - Whether to include metadata (requires permission)
|
|
118
|
-
* @returns Promise with array of vectors or error
|
|
119
|
-
*
|
|
120
|
-
* @throws {StorageVectorsApiError} With code:
|
|
121
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
122
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```typescript
|
|
126
|
-
* const { data, error } = await client.getVectors({
|
|
127
|
-
* vectorBucketName: 'embeddings-prod',
|
|
128
|
-
* indexName: 'documents-openai-small',
|
|
129
|
-
* keys: ['doc-1', 'doc-2', 'doc-3'],
|
|
130
|
-
* returnData: false, // Don't return embeddings
|
|
131
|
-
* returnMetadata: true // Return metadata only
|
|
132
|
-
* })
|
|
133
|
-
* if (data) {
|
|
134
|
-
* data.vectors.forEach(v => console.log(v.key, v.metadata))
|
|
135
|
-
* }
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
23
|
+
/** Retrieves vectors by their keys in batch */
|
|
138
24
|
getVectors(options: GetVectorsOptions): Promise<ApiResponse<GetVectorsResponse>>;
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
* @alpha
|
|
142
|
-
*
|
|
143
|
-
* Lists/scans vectors in an index with pagination
|
|
144
|
-
* Supports parallel scanning via segment configuration for high-throughput scenarios
|
|
145
|
-
* Additional permissions required when returning data or metadata
|
|
146
|
-
*
|
|
147
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
148
|
-
*
|
|
149
|
-
* @category Vector Buckets
|
|
150
|
-
* @param options - Vector listing options
|
|
151
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
152
|
-
* @param options.indexName - Name of the index
|
|
153
|
-
* @param options.maxResults - Maximum results per page (default: 500, max: 1000)
|
|
154
|
-
* @param options.nextToken - Pagination token from previous response
|
|
155
|
-
* @param options.returnData - Whether to include vector embeddings (requires permission)
|
|
156
|
-
* @param options.returnMetadata - Whether to include metadata (requires permission)
|
|
157
|
-
* @param options.segmentCount - Total parallel segments (1-16) for distributed scanning
|
|
158
|
-
* @param options.segmentIndex - Zero-based segment index (0 to segmentCount-1)
|
|
159
|
-
* @returns Promise with array of vectors, pagination token, or error
|
|
160
|
-
*
|
|
161
|
-
* @throws {StorageVectorsApiError} With code:
|
|
162
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
163
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
164
|
-
*
|
|
165
|
-
* @example
|
|
166
|
-
* ```typescript
|
|
167
|
-
* // Simple pagination
|
|
168
|
-
* let nextToken: string | undefined
|
|
169
|
-
* do {
|
|
170
|
-
* const { data, error } = await client.listVectors({
|
|
171
|
-
* vectorBucketName: 'embeddings-prod',
|
|
172
|
-
* indexName: 'documents-openai-small',
|
|
173
|
-
* maxResults: 500,
|
|
174
|
-
* nextToken,
|
|
175
|
-
* returnMetadata: true
|
|
176
|
-
* })
|
|
177
|
-
* if (error) break
|
|
178
|
-
* console.log('Batch:', data.vectors.length)
|
|
179
|
-
* nextToken = data.nextToken
|
|
180
|
-
* } while (nextToken)
|
|
181
|
-
*
|
|
182
|
-
* // Parallel scanning (4 concurrent workers)
|
|
183
|
-
* const workers = [0, 1, 2, 3].map(async (segmentIndex) => {
|
|
184
|
-
* const { data } = await client.listVectors({
|
|
185
|
-
* vectorBucketName: 'embeddings-prod',
|
|
186
|
-
* indexName: 'documents-openai-small',
|
|
187
|
-
* segmentCount: 4,
|
|
188
|
-
* segmentIndex,
|
|
189
|
-
* returnMetadata: true
|
|
190
|
-
* })
|
|
191
|
-
* return data?.vectors || []
|
|
192
|
-
* })
|
|
193
|
-
* const results = await Promise.all(workers)
|
|
194
|
-
* ```
|
|
195
|
-
*/
|
|
25
|
+
/** Lists vectors in an index with pagination */
|
|
196
26
|
listVectors(options: ListVectorsOptions): Promise<ApiResponse<ListVectorsResponse>>;
|
|
197
|
-
/**
|
|
198
|
-
*
|
|
199
|
-
* @alpha
|
|
200
|
-
*
|
|
201
|
-
* Queries for similar vectors using approximate nearest neighbor (ANN) search
|
|
202
|
-
* Returns top-K most similar vectors based on the configured distance metric
|
|
203
|
-
* Supports optional metadata filtering (requires GetVectors permission)
|
|
204
|
-
*
|
|
205
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
206
|
-
*
|
|
207
|
-
* @category Vector Buckets
|
|
208
|
-
* @param options - Query options
|
|
209
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
210
|
-
* @param options.indexName - Name of the index
|
|
211
|
-
* @param options.queryVector - Query embedding to find similar vectors
|
|
212
|
-
* @param options.topK - Number of nearest neighbors to return (default: 10)
|
|
213
|
-
* @param options.filter - Optional JSON filter for metadata (requires GetVectors permission)
|
|
214
|
-
* @param options.returnDistance - Whether to include similarity distances
|
|
215
|
-
* @param options.returnMetadata - Whether to include metadata (requires GetVectors permission)
|
|
216
|
-
* @returns Promise with array of similar vectors ordered by distance
|
|
217
|
-
*
|
|
218
|
-
* @throws {StorageVectorsApiError} With code:
|
|
219
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
220
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```typescript
|
|
224
|
-
* // Semantic search with filtering
|
|
225
|
-
* const { data, error } = await client.queryVectors({
|
|
226
|
-
* vectorBucketName: 'embeddings-prod',
|
|
227
|
-
* indexName: 'documents-openai-small',
|
|
228
|
-
* queryVector: { float32: [0.1, 0.2, 0.3, ...] }, // 1536 dimensions
|
|
229
|
-
* topK: 5,
|
|
230
|
-
* filter: {
|
|
231
|
-
* category: 'technical',
|
|
232
|
-
* published: true
|
|
233
|
-
* },
|
|
234
|
-
* returnDistance: true,
|
|
235
|
-
* returnMetadata: true
|
|
236
|
-
* })
|
|
237
|
-
* if (data) {
|
|
238
|
-
* data.matches.forEach(match => {
|
|
239
|
-
* console.log(`${match.key}: distance=${match.distance}`)
|
|
240
|
-
* console.log('Metadata:', match.metadata)
|
|
241
|
-
* })
|
|
242
|
-
* }
|
|
243
|
-
* ```
|
|
244
|
-
*/
|
|
27
|
+
/** Queries for similar vectors using approximate nearest neighbor search */
|
|
245
28
|
queryVectors(options: QueryVectorsOptions): Promise<ApiResponse<QueryVectorsResponse>>;
|
|
246
|
-
/**
|
|
247
|
-
*
|
|
248
|
-
* @alpha
|
|
249
|
-
*
|
|
250
|
-
* Deletes vectors by their keys in batch
|
|
251
|
-
* Accepts 1-500 keys per request
|
|
252
|
-
*
|
|
253
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
254
|
-
*
|
|
255
|
-
* @category Vector Buckets
|
|
256
|
-
* @param options - Vector deletion options
|
|
257
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
258
|
-
* @param options.indexName - Name of the index
|
|
259
|
-
* @param options.keys - Array of vector keys to delete (1-500 items)
|
|
260
|
-
* @returns Promise with empty response on success or error
|
|
261
|
-
*
|
|
262
|
-
* @throws {StorageVectorsApiError} With code:
|
|
263
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
264
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
265
|
-
*
|
|
266
|
-
* @example
|
|
267
|
-
* ```typescript
|
|
268
|
-
* const { error } = await client.deleteVectors({
|
|
269
|
-
* vectorBucketName: 'embeddings-prod',
|
|
270
|
-
* indexName: 'documents-openai-small',
|
|
271
|
-
* keys: ['doc-1', 'doc-2', 'doc-3']
|
|
272
|
-
* })
|
|
273
|
-
* if (!error) {
|
|
274
|
-
* console.log('Vectors deleted successfully')
|
|
275
|
-
* }
|
|
276
|
-
* ```
|
|
277
|
-
*/
|
|
29
|
+
/** Deletes vectors by their keys in batch (1-500 per request) */
|
|
278
30
|
deleteVectors(options: DeleteVectorsOptions): Promise<ApiResponse<undefined>>;
|
|
279
31
|
}
|
|
280
32
|
//# sourceMappingURL=VectorDataApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorDataApi.d.ts","sourceRoot":"","sources":["../../../../src/lib/vectors/VectorDataApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAQ,MAAM,SAAS,CAAA;AAErC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAi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AAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAiB5F,iEAAiE;IAC3D,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;CAqBpF"}
|
|
@@ -4,102 +4,24 @@ import { isStorageVectorsError } from './errors';
|
|
|
4
4
|
import { post } from './fetch';
|
|
5
5
|
import { resolveFetch } from './helpers';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* API class for managing Vector Data within Vector Indexes
|
|
11
|
-
* Provides methods for inserting, querying, listing, and deleting vector embeddings
|
|
12
|
-
*
|
|
13
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
7
|
+
* @hidden
|
|
8
|
+
* Base implementation for vector data operations.
|
|
9
|
+
* Use {@link VectorIndexScope} via `supabase.storage.vectors.from('bucket').index('idx')` instead.
|
|
14
10
|
*/
|
|
15
11
|
export default class VectorDataApi {
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @alpha
|
|
19
|
-
*
|
|
20
|
-
* Creates a VectorDataApi bound to a Storage Vectors deployment.
|
|
21
|
-
*
|
|
22
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
23
|
-
*
|
|
24
|
-
* @category Vector Buckets
|
|
25
|
-
* @param url - Base URL for the Storage Vectors API.
|
|
26
|
-
* @param headers - Default headers (for example authentication tokens).
|
|
27
|
-
* @param fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* const client = new VectorDataApi(url, headers)
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
12
|
+
/** Creates a new VectorDataApi instance */
|
|
34
13
|
constructor(url, headers = {}, fetch) {
|
|
35
14
|
this.shouldThrowOnError = false;
|
|
36
15
|
this.url = url.replace(/\/$/, '');
|
|
37
16
|
this.headers = Object.assign(Object.assign({}, DEFAULT_HEADERS), headers);
|
|
38
17
|
this.fetch = resolveFetch(fetch);
|
|
39
18
|
}
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @alpha
|
|
43
|
-
*
|
|
44
|
-
* Enable throwing errors instead of returning them in the response
|
|
45
|
-
* When enabled, failed operations will throw instead of returning { data: null, error }
|
|
46
|
-
*
|
|
47
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
48
|
-
*
|
|
49
|
-
* @category Vector Buckets
|
|
50
|
-
* @returns This instance for method chaining
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* const client = new VectorDataApi(url, headers)
|
|
54
|
-
* client.throwOnError()
|
|
55
|
-
* const { data } = await client.putVectors(options) // throws on error
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
19
|
+
/** Enable throwing errors instead of returning them in the response */
|
|
58
20
|
throwOnError() {
|
|
59
21
|
this.shouldThrowOnError = true;
|
|
60
22
|
return this;
|
|
61
23
|
}
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @alpha
|
|
65
|
-
*
|
|
66
|
-
* Inserts or updates vectors in batch (upsert operation)
|
|
67
|
-
* Accepts 1-500 vectors per request. Larger batches should be split
|
|
68
|
-
*
|
|
69
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
70
|
-
*
|
|
71
|
-
* @category Vector Buckets
|
|
72
|
-
* @param options - Vector insertion options
|
|
73
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
74
|
-
* @param options.indexName - Name of the target index
|
|
75
|
-
* @param options.vectors - Array of vectors to insert/update (1-500 items)
|
|
76
|
-
* @returns Promise with empty response on success or error
|
|
77
|
-
*
|
|
78
|
-
* @throws {StorageVectorsApiError} With code:
|
|
79
|
-
* - `S3VectorConflictException` if duplicate key conflict occurs (HTTP 409)
|
|
80
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
81
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* const { data, error } = await client.putVectors({
|
|
86
|
-
* vectorBucketName: 'embeddings-prod',
|
|
87
|
-
* indexName: 'documents-openai-small',
|
|
88
|
-
* vectors: [
|
|
89
|
-
* {
|
|
90
|
-
* key: 'doc-1',
|
|
91
|
-
* data: { float32: [0.1, 0.2, 0.3, ...] }, // 1536 dimensions
|
|
92
|
-
* metadata: { title: 'Introduction', page: 1 }
|
|
93
|
-
* },
|
|
94
|
-
* {
|
|
95
|
-
* key: 'doc-2',
|
|
96
|
-
* data: { float32: [0.4, 0.5, 0.6, ...] },
|
|
97
|
-
* metadata: { title: 'Conclusion', page: 42 }
|
|
98
|
-
* }
|
|
99
|
-
* ]
|
|
100
|
-
* })
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
24
|
+
/** Inserts or updates vectors in batch (1-500 per request) */
|
|
103
25
|
putVectors(options) {
|
|
104
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
27
|
try {
|
|
@@ -123,43 +45,7 @@ export default class VectorDataApi {
|
|
|
123
45
|
}
|
|
124
46
|
});
|
|
125
47
|
}
|
|
126
|
-
/**
|
|
127
|
-
*
|
|
128
|
-
* @alpha
|
|
129
|
-
*
|
|
130
|
-
* Retrieves vectors by their keys in batch
|
|
131
|
-
* Optionally includes vector data and/or metadata in response
|
|
132
|
-
* Additional permissions required when returning data or metadata
|
|
133
|
-
*
|
|
134
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
135
|
-
*
|
|
136
|
-
* @category Vector Buckets
|
|
137
|
-
* @param options - Vector retrieval options
|
|
138
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
139
|
-
* @param options.indexName - Name of the index
|
|
140
|
-
* @param options.keys - Array of vector keys to retrieve
|
|
141
|
-
* @param options.returnData - Whether to include vector embeddings (requires permission)
|
|
142
|
-
* @param options.returnMetadata - Whether to include metadata (requires permission)
|
|
143
|
-
* @returns Promise with array of vectors or error
|
|
144
|
-
*
|
|
145
|
-
* @throws {StorageVectorsApiError} With code:
|
|
146
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
147
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* const { data, error } = await client.getVectors({
|
|
152
|
-
* vectorBucketName: 'embeddings-prod',
|
|
153
|
-
* indexName: 'documents-openai-small',
|
|
154
|
-
* keys: ['doc-1', 'doc-2', 'doc-3'],
|
|
155
|
-
* returnData: false, // Don't return embeddings
|
|
156
|
-
* returnMetadata: true // Return metadata only
|
|
157
|
-
* })
|
|
158
|
-
* if (data) {
|
|
159
|
-
* data.vectors.forEach(v => console.log(v.key, v.metadata))
|
|
160
|
-
* }
|
|
161
|
-
* ```
|
|
162
|
-
*/
|
|
48
|
+
/** Retrieves vectors by their keys in batch */
|
|
163
49
|
getVectors(options) {
|
|
164
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
51
|
try {
|
|
@@ -179,63 +65,7 @@ export default class VectorDataApi {
|
|
|
179
65
|
}
|
|
180
66
|
});
|
|
181
67
|
}
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* @alpha
|
|
185
|
-
*
|
|
186
|
-
* Lists/scans vectors in an index with pagination
|
|
187
|
-
* Supports parallel scanning via segment configuration for high-throughput scenarios
|
|
188
|
-
* Additional permissions required when returning data or metadata
|
|
189
|
-
*
|
|
190
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
191
|
-
*
|
|
192
|
-
* @category Vector Buckets
|
|
193
|
-
* @param options - Vector listing options
|
|
194
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
195
|
-
* @param options.indexName - Name of the index
|
|
196
|
-
* @param options.maxResults - Maximum results per page (default: 500, max: 1000)
|
|
197
|
-
* @param options.nextToken - Pagination token from previous response
|
|
198
|
-
* @param options.returnData - Whether to include vector embeddings (requires permission)
|
|
199
|
-
* @param options.returnMetadata - Whether to include metadata (requires permission)
|
|
200
|
-
* @param options.segmentCount - Total parallel segments (1-16) for distributed scanning
|
|
201
|
-
* @param options.segmentIndex - Zero-based segment index (0 to segmentCount-1)
|
|
202
|
-
* @returns Promise with array of vectors, pagination token, or error
|
|
203
|
-
*
|
|
204
|
-
* @throws {StorageVectorsApiError} With code:
|
|
205
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
206
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```typescript
|
|
210
|
-
* // Simple pagination
|
|
211
|
-
* let nextToken: string | undefined
|
|
212
|
-
* do {
|
|
213
|
-
* const { data, error } = await client.listVectors({
|
|
214
|
-
* vectorBucketName: 'embeddings-prod',
|
|
215
|
-
* indexName: 'documents-openai-small',
|
|
216
|
-
* maxResults: 500,
|
|
217
|
-
* nextToken,
|
|
218
|
-
* returnMetadata: true
|
|
219
|
-
* })
|
|
220
|
-
* if (error) break
|
|
221
|
-
* console.log('Batch:', data.vectors.length)
|
|
222
|
-
* nextToken = data.nextToken
|
|
223
|
-
* } while (nextToken)
|
|
224
|
-
*
|
|
225
|
-
* // Parallel scanning (4 concurrent workers)
|
|
226
|
-
* const workers = [0, 1, 2, 3].map(async (segmentIndex) => {
|
|
227
|
-
* const { data } = await client.listVectors({
|
|
228
|
-
* vectorBucketName: 'embeddings-prod',
|
|
229
|
-
* indexName: 'documents-openai-small',
|
|
230
|
-
* segmentCount: 4,
|
|
231
|
-
* segmentIndex,
|
|
232
|
-
* returnMetadata: true
|
|
233
|
-
* })
|
|
234
|
-
* return data?.vectors || []
|
|
235
|
-
* })
|
|
236
|
-
* const results = await Promise.all(workers)
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
68
|
+
/** Lists vectors in an index with pagination */
|
|
239
69
|
listVectors(options) {
|
|
240
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
241
71
|
try {
|
|
@@ -266,54 +96,7 @@ export default class VectorDataApi {
|
|
|
266
96
|
}
|
|
267
97
|
});
|
|
268
98
|
}
|
|
269
|
-
/**
|
|
270
|
-
*
|
|
271
|
-
* @alpha
|
|
272
|
-
*
|
|
273
|
-
* Queries for similar vectors using approximate nearest neighbor (ANN) search
|
|
274
|
-
* Returns top-K most similar vectors based on the configured distance metric
|
|
275
|
-
* Supports optional metadata filtering (requires GetVectors permission)
|
|
276
|
-
*
|
|
277
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
278
|
-
*
|
|
279
|
-
* @category Vector Buckets
|
|
280
|
-
* @param options - Query options
|
|
281
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
282
|
-
* @param options.indexName - Name of the index
|
|
283
|
-
* @param options.queryVector - Query embedding to find similar vectors
|
|
284
|
-
* @param options.topK - Number of nearest neighbors to return (default: 10)
|
|
285
|
-
* @param options.filter - Optional JSON filter for metadata (requires GetVectors permission)
|
|
286
|
-
* @param options.returnDistance - Whether to include similarity distances
|
|
287
|
-
* @param options.returnMetadata - Whether to include metadata (requires GetVectors permission)
|
|
288
|
-
* @returns Promise with array of similar vectors ordered by distance
|
|
289
|
-
*
|
|
290
|
-
* @throws {StorageVectorsApiError} With code:
|
|
291
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
292
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
293
|
-
*
|
|
294
|
-
* @example
|
|
295
|
-
* ```typescript
|
|
296
|
-
* // Semantic search with filtering
|
|
297
|
-
* const { data, error } = await client.queryVectors({
|
|
298
|
-
* vectorBucketName: 'embeddings-prod',
|
|
299
|
-
* indexName: 'documents-openai-small',
|
|
300
|
-
* queryVector: { float32: [0.1, 0.2, 0.3, ...] }, // 1536 dimensions
|
|
301
|
-
* topK: 5,
|
|
302
|
-
* filter: {
|
|
303
|
-
* category: 'technical',
|
|
304
|
-
* published: true
|
|
305
|
-
* },
|
|
306
|
-
* returnDistance: true,
|
|
307
|
-
* returnMetadata: true
|
|
308
|
-
* })
|
|
309
|
-
* if (data) {
|
|
310
|
-
* data.matches.forEach(match => {
|
|
311
|
-
* console.log(`${match.key}: distance=${match.distance}`)
|
|
312
|
-
* console.log('Metadata:', match.metadata)
|
|
313
|
-
* })
|
|
314
|
-
* }
|
|
315
|
-
* ```
|
|
316
|
-
*/
|
|
99
|
+
/** Queries for similar vectors using approximate nearest neighbor search */
|
|
317
100
|
queryVectors(options) {
|
|
318
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
319
102
|
try {
|
|
@@ -333,38 +116,7 @@ export default class VectorDataApi {
|
|
|
333
116
|
}
|
|
334
117
|
});
|
|
335
118
|
}
|
|
336
|
-
/**
|
|
337
|
-
*
|
|
338
|
-
* @alpha
|
|
339
|
-
*
|
|
340
|
-
* Deletes vectors by their keys in batch
|
|
341
|
-
* Accepts 1-500 keys per request
|
|
342
|
-
*
|
|
343
|
-
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
344
|
-
*
|
|
345
|
-
* @category Vector Buckets
|
|
346
|
-
* @param options - Vector deletion options
|
|
347
|
-
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
348
|
-
* @param options.indexName - Name of the index
|
|
349
|
-
* @param options.keys - Array of vector keys to delete (1-500 items)
|
|
350
|
-
* @returns Promise with empty response on success or error
|
|
351
|
-
*
|
|
352
|
-
* @throws {StorageVectorsApiError} With code:
|
|
353
|
-
* - `S3VectorNotFoundException` if bucket or index doesn't exist (HTTP 404)
|
|
354
|
-
* - `InternalError` for server errors (HTTP 500)
|
|
355
|
-
*
|
|
356
|
-
* @example
|
|
357
|
-
* ```typescript
|
|
358
|
-
* const { error } = await client.deleteVectors({
|
|
359
|
-
* vectorBucketName: 'embeddings-prod',
|
|
360
|
-
* indexName: 'documents-openai-small',
|
|
361
|
-
* keys: ['doc-1', 'doc-2', 'doc-3']
|
|
362
|
-
* })
|
|
363
|
-
* if (!error) {
|
|
364
|
-
* console.log('Vectors deleted successfully')
|
|
365
|
-
* }
|
|
366
|
-
* ```
|
|
367
|
-
*/
|
|
119
|
+
/** Deletes vectors by their keys in batch (1-500 per request) */
|
|
368
120
|
deleteVectors(options) {
|
|
369
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
370
122
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorDataApi.js","sourceRoot":"","sources":["../../../../src/lib/vectors/VectorDataApi.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAS,IAAI,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAaxC
|
|
1
|
+
{"version":3,"file":"VectorDataApi.js","sourceRoot":"","sources":["../../../../src/lib/vectors/VectorDataApi.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAS,IAAI,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAaxC;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;IAMhC,2CAA2C;IAC3C,YAAY,GAAW,EAAE,UAAqC,EAAE,EAAE,KAAa;QAHrE,uBAAkB,GAAG,KAAK,CAAA;QAIlC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO,mCAAQ,eAAe,GAAK,OAAO,CAAE,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAA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