@supabase/storage-js 2.81.1 → 2.81.2-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 +15 -0
- package/dist/main/StorageClient.d.ts.map +1 -1
- package/dist/main/StorageClient.js +15 -0
- package/dist/main/StorageClient.js.map +1 -1
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts +49 -0
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts.map +1 -1
- package/dist/main/lib/vectors/StorageVectorsClient.js +47 -0
- package/dist/main/lib/vectors/StorageVectorsClient.js.map +1 -1
- package/dist/main/lib/vectors/VectorBucketApi.d.ts +19 -0
- package/dist/main/lib/vectors/VectorBucketApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorBucketApi.js +19 -0
- package/dist/main/lib/vectors/VectorBucketApi.js.map +1 -1
- package/dist/main/lib/vectors/VectorDataApi.d.ts +23 -0
- package/dist/main/lib/vectors/VectorDataApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorDataApi.js +23 -0
- package/dist/main/lib/vectors/VectorDataApi.js.map +1 -1
- package/dist/main/lib/vectors/VectorIndexApi.d.ts +23 -0
- package/dist/main/lib/vectors/VectorIndexApi.d.ts.map +1 -1
- package/dist/main/lib/vectors/VectorIndexApi.js +21 -0
- 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/module/StorageClient.d.ts +15 -0
- package/dist/module/StorageClient.d.ts.map +1 -1
- package/dist/module/StorageClient.js +15 -0
- package/dist/module/StorageClient.js.map +1 -1
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts +49 -0
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts.map +1 -1
- package/dist/module/lib/vectors/StorageVectorsClient.js +47 -0
- package/dist/module/lib/vectors/StorageVectorsClient.js.map +1 -1
- package/dist/module/lib/vectors/VectorBucketApi.d.ts +19 -0
- package/dist/module/lib/vectors/VectorBucketApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorBucketApi.js +19 -0
- package/dist/module/lib/vectors/VectorBucketApi.js.map +1 -1
- package/dist/module/lib/vectors/VectorDataApi.d.ts +23 -0
- package/dist/module/lib/vectors/VectorDataApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorDataApi.js +23 -0
- package/dist/module/lib/vectors/VectorDataApi.js.map +1 -1
- package/dist/module/lib/vectors/VectorIndexApi.d.ts +23 -0
- package/dist/module/lib/vectors/VectorIndexApi.d.ts.map +1 -1
- package/dist/module/lib/vectors/VectorIndexApi.js +21 -0
- 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/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 +15 -0
- package/src/lib/vectors/StorageVectorsClient.ts +49 -0
- package/src/lib/vectors/VectorBucketApi.ts +20 -3
- package/src/lib/vectors/VectorDataApi.ts +23 -0
- package/src/lib/vectors/VectorIndexApi.ts +23 -0
- package/src/lib/version.ts +1 -1
package/src/StorageClient.ts
CHANGED
|
@@ -9,6 +9,19 @@ export interface StorageClientOptions {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export class StorageClient extends StorageBucketApi {
|
|
12
|
+
/**
|
|
13
|
+
* Creates a client for Storage buckets, files, analytics, and vectors.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { StorageClient } from '@supabase/storage-js'
|
|
18
|
+
*
|
|
19
|
+
* const storage = new StorageClient('https://xyzcompany.supabase.co/storage/v1', {
|
|
20
|
+
* apikey: 'public-anon-key',
|
|
21
|
+
* })
|
|
22
|
+
* const avatars = storage.from('avatars')
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
12
25
|
constructor(
|
|
13
26
|
url: string,
|
|
14
27
|
headers: { [key: string]: string } = {},
|
|
@@ -30,6 +43,8 @@ export class StorageClient extends StorageBucketApi {
|
|
|
30
43
|
/**
|
|
31
44
|
* Access vector storage operations.
|
|
32
45
|
*
|
|
46
|
+
* **Private alpha:** This API is part of a private alpha release and may change or be removed without notice.
|
|
47
|
+
*
|
|
33
48
|
* @returns A StorageVectorsClient instance configured with the current storage settings.
|
|
34
49
|
*/
|
|
35
50
|
get vectors(): StorageVectorsClient {
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Configuration options for the Storage Vectors client
|
|
16
|
+
*
|
|
17
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
16
18
|
*/
|
|
17
19
|
export interface StorageVectorsClientOptions {
|
|
18
20
|
/**
|
|
@@ -30,6 +32,8 @@ export interface StorageVectorsClientOptions {
|
|
|
30
32
|
* Main client for interacting with S3 Vectors API
|
|
31
33
|
* Provides access to bucket, index, and vector data operations
|
|
32
34
|
*
|
|
35
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
36
|
+
*
|
|
33
37
|
* **Usage Patterns:**
|
|
34
38
|
*
|
|
35
39
|
* 1. **Via StorageClient (recommended for most use cases):**
|
|
@@ -82,6 +86,15 @@ export interface StorageVectorsClientOptions {
|
|
|
82
86
|
* ```
|
|
83
87
|
*/
|
|
84
88
|
export class StorageVectorsClient extends VectorBucketApi {
|
|
89
|
+
/**
|
|
90
|
+
* Creates a StorageVectorsClient that can manage buckets, indexes, and vectors.
|
|
91
|
+
*
|
|
92
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
93
|
+
*
|
|
94
|
+
* @param url - Base URL of the Storage Vectors REST API.
|
|
95
|
+
* @param options.headers - Optional headers (for example `Authorization`) applied to every request.
|
|
96
|
+
* @param options.fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
97
|
+
*/
|
|
85
98
|
constructor(url: string, options: StorageVectorsClientOptions = {}) {
|
|
86
99
|
super(url, options.headers || {}, options.fetch)
|
|
87
100
|
}
|
|
@@ -90,6 +103,8 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
90
103
|
* Access operations for a specific vector bucket
|
|
91
104
|
* Returns a scoped client for index and vector operations within the bucket
|
|
92
105
|
*
|
|
106
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
107
|
+
*
|
|
93
108
|
* @param vectorBucketName - Name of the vector bucket
|
|
94
109
|
* @returns Bucket-scoped client with index and vector operations
|
|
95
110
|
*
|
|
@@ -117,10 +132,17 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
117
132
|
/**
|
|
118
133
|
* Scoped client for operations within a specific vector bucket
|
|
119
134
|
* Provides index management and access to vector operations
|
|
135
|
+
*
|
|
136
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
120
137
|
*/
|
|
121
138
|
export class VectorBucketScope extends VectorIndexApi {
|
|
122
139
|
private vectorBucketName: string
|
|
123
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Creates a helper that automatically scopes all index operations to the provided bucket.
|
|
143
|
+
*
|
|
144
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
145
|
+
*/
|
|
124
146
|
constructor(
|
|
125
147
|
url: string,
|
|
126
148
|
headers: { [key: string]: string },
|
|
@@ -135,6 +157,8 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
135
157
|
* Creates a new vector index in this bucket
|
|
136
158
|
* Convenience method that automatically includes the bucket name
|
|
137
159
|
*
|
|
160
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
161
|
+
*
|
|
138
162
|
* @param options - Index configuration (vectorBucketName is automatically set)
|
|
139
163
|
* @returns Promise with empty response on success or error
|
|
140
164
|
*
|
|
@@ -163,6 +187,8 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
163
187
|
* Lists indexes in this bucket
|
|
164
188
|
* Convenience method that automatically includes the bucket name
|
|
165
189
|
*
|
|
190
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
191
|
+
*
|
|
166
192
|
* @param options - Listing options (vectorBucketName is automatically set)
|
|
167
193
|
* @returns Promise with list of indexes or error
|
|
168
194
|
*
|
|
@@ -183,6 +209,8 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
183
209
|
* Retrieves metadata for a specific index in this bucket
|
|
184
210
|
* Convenience method that automatically includes the bucket name
|
|
185
211
|
*
|
|
212
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
213
|
+
*
|
|
186
214
|
* @param indexName - Name of the index to retrieve
|
|
187
215
|
* @returns Promise with index metadata or error
|
|
188
216
|
*
|
|
@@ -201,6 +229,8 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
201
229
|
* Deletes an index from this bucket
|
|
202
230
|
* Convenience method that automatically includes the bucket name
|
|
203
231
|
*
|
|
232
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
233
|
+
*
|
|
204
234
|
* @param indexName - Name of the index to delete
|
|
205
235
|
* @returns Promise with empty response on success or error
|
|
206
236
|
*
|
|
@@ -218,6 +248,8 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
218
248
|
* Access operations for a specific index within this bucket
|
|
219
249
|
* Returns a scoped client for vector data operations
|
|
220
250
|
*
|
|
251
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
252
|
+
*
|
|
221
253
|
* @param indexName - Name of the index
|
|
222
254
|
* @returns Index-scoped client with vector data operations
|
|
223
255
|
*
|
|
@@ -253,11 +285,18 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
253
285
|
/**
|
|
254
286
|
* Scoped client for operations within a specific vector index
|
|
255
287
|
* Provides vector data operations (put, get, list, query, delete)
|
|
288
|
+
*
|
|
289
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
256
290
|
*/
|
|
257
291
|
export class VectorIndexScope extends VectorDataApi {
|
|
258
292
|
private vectorBucketName: string
|
|
259
293
|
private indexName: string
|
|
260
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Creates a helper that automatically scopes all vector operations to the provided bucket/index names.
|
|
297
|
+
*
|
|
298
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
299
|
+
*/
|
|
261
300
|
constructor(
|
|
262
301
|
url: string,
|
|
263
302
|
headers: { [key: string]: string },
|
|
@@ -274,6 +313,8 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
274
313
|
* Inserts or updates vectors in this index
|
|
275
314
|
* Convenience method that automatically includes bucket and index names
|
|
276
315
|
*
|
|
316
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
317
|
+
*
|
|
277
318
|
* @param options - Vector insertion options (bucket and index names automatically set)
|
|
278
319
|
* @returns Promise with empty response on success or error
|
|
279
320
|
*
|
|
@@ -303,6 +344,8 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
303
344
|
* Retrieves vectors by keys from this index
|
|
304
345
|
* Convenience method that automatically includes bucket and index names
|
|
305
346
|
*
|
|
347
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
348
|
+
*
|
|
306
349
|
* @param options - Vector retrieval options (bucket and index names automatically set)
|
|
307
350
|
* @returns Promise with array of vectors or error
|
|
308
351
|
*
|
|
@@ -327,6 +370,8 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
327
370
|
* Lists vectors in this index with pagination
|
|
328
371
|
* Convenience method that automatically includes bucket and index names
|
|
329
372
|
*
|
|
373
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
374
|
+
*
|
|
330
375
|
* @param options - Listing options (bucket and index names automatically set)
|
|
331
376
|
* @returns Promise with array of vectors and pagination token
|
|
332
377
|
*
|
|
@@ -353,6 +398,8 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
353
398
|
* Queries for similar vectors in this index
|
|
354
399
|
* Convenience method that automatically includes bucket and index names
|
|
355
400
|
*
|
|
401
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
402
|
+
*
|
|
356
403
|
* @param options - Query options (bucket and index names automatically set)
|
|
357
404
|
* @returns Promise with array of similar vectors ordered by distance
|
|
358
405
|
*
|
|
@@ -382,6 +429,8 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
382
429
|
* Deletes vectors by keys from this index
|
|
383
430
|
* Convenience method that automatically includes bucket and index names
|
|
384
431
|
*
|
|
432
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
433
|
+
*
|
|
385
434
|
* @param options - Deletion options (bucket and index names automatically set)
|
|
386
435
|
* @returns Promise with empty response on success or error
|
|
387
436
|
*
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
/**
|
|
13
13
|
* API class for managing Vector Buckets
|
|
14
14
|
* Provides methods for creating, reading, listing, and deleting vector buckets
|
|
15
|
+
*
|
|
16
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
15
17
|
*/
|
|
16
18
|
export default class VectorBucketApi {
|
|
17
19
|
protected url: string
|
|
@@ -21,9 +23,16 @@ export default class VectorBucketApi {
|
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* Creates a new VectorBucketApi instance
|
|
26
|
+
*
|
|
27
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
24
28
|
* @param url - The base URL for the storage vectors API
|
|
25
29
|
* @param headers - HTTP headers to include in requests
|
|
26
30
|
* @param fetch - Optional custom fetch implementation
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const client = new VectorBucketApi(url, headers)
|
|
35
|
+
* ```
|
|
27
36
|
*/
|
|
28
37
|
constructor(url: string, headers: { [key: string]: string } = {}, fetch?: Fetch) {
|
|
29
38
|
this.url = url.replace(/\/$/, '')
|
|
@@ -35,6 +44,8 @@ export default class VectorBucketApi {
|
|
|
35
44
|
* Enable throwing errors instead of returning them in the response
|
|
36
45
|
* When enabled, failed operations will throw instead of returning { data: null, error }
|
|
37
46
|
*
|
|
47
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
48
|
+
*
|
|
38
49
|
* @returns This instance for method chaining
|
|
39
50
|
* @example
|
|
40
51
|
* ```typescript
|
|
@@ -52,6 +63,8 @@ export default class VectorBucketApi {
|
|
|
52
63
|
* Creates a new vector bucket
|
|
53
64
|
* Vector buckets are containers for vector indexes and their data
|
|
54
65
|
*
|
|
66
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
67
|
+
*
|
|
55
68
|
* @param vectorBucketName - Unique name for the vector bucket
|
|
56
69
|
* @returns Promise with empty response on success or error
|
|
57
70
|
*
|
|
@@ -92,6 +105,8 @@ export default class VectorBucketApi {
|
|
|
92
105
|
* Retrieves metadata for a specific vector bucket
|
|
93
106
|
* Returns bucket configuration including encryption settings and creation time
|
|
94
107
|
*
|
|
108
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
109
|
+
*
|
|
95
110
|
* @param vectorBucketName - Name of the vector bucket to retrieve
|
|
96
111
|
* @returns Promise with bucket metadata or error
|
|
97
112
|
*
|
|
@@ -107,9 +122,7 @@ export default class VectorBucketApi {
|
|
|
107
122
|
* }
|
|
108
123
|
* ```
|
|
109
124
|
*/
|
|
110
|
-
async getBucket(
|
|
111
|
-
vectorBucketName: string
|
|
112
|
-
): Promise<ApiResponse<{ vectorBucket: VectorBucket }>> {
|
|
125
|
+
async getBucket(vectorBucketName: string): Promise<ApiResponse<{ vectorBucket: VectorBucket }>> {
|
|
113
126
|
try {
|
|
114
127
|
const data = await post(
|
|
115
128
|
this.fetch,
|
|
@@ -133,6 +146,8 @@ export default class VectorBucketApi {
|
|
|
133
146
|
* Lists vector buckets with optional filtering and pagination
|
|
134
147
|
* Supports prefix-based filtering and paginated results
|
|
135
148
|
*
|
|
149
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
150
|
+
*
|
|
136
151
|
* @param options - Listing options
|
|
137
152
|
* @param options.prefix - Filter buckets by name prefix
|
|
138
153
|
* @param options.maxResults - Maximum results per page (default: 100)
|
|
@@ -178,6 +193,8 @@ export default class VectorBucketApi {
|
|
|
178
193
|
* Deletes a vector bucket
|
|
179
194
|
* Bucket must be empty before deletion (all indexes must be removed first)
|
|
180
195
|
*
|
|
196
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
197
|
+
*
|
|
181
198
|
* @param vectorBucketName - Name of the vector bucket to delete
|
|
182
199
|
* @returns Promise with empty response on success or error
|
|
183
200
|
*
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
/**
|
|
18
18
|
* API class for managing Vector Data within Vector Indexes
|
|
19
19
|
* Provides methods for inserting, querying, listing, and deleting vector embeddings
|
|
20
|
+
*
|
|
21
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
20
22
|
*/
|
|
21
23
|
export default class VectorDataApi {
|
|
22
24
|
protected url: string
|
|
@@ -24,6 +26,15 @@ export default class VectorDataApi {
|
|
|
24
26
|
protected fetch: Fetch
|
|
25
27
|
protected shouldThrowOnError = false
|
|
26
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Creates a VectorDataApi bound to a Storage Vectors deployment.
|
|
31
|
+
*
|
|
32
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
33
|
+
*
|
|
34
|
+
* @param url - Base URL for the Storage Vectors API.
|
|
35
|
+
* @param headers - Default headers (for example authentication tokens).
|
|
36
|
+
* @param fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
37
|
+
*/
|
|
27
38
|
constructor(url: string, headers: { [key: string]: string } = {}, fetch?: Fetch) {
|
|
28
39
|
this.url = url.replace(/\/$/, '')
|
|
29
40
|
this.headers = { ...DEFAULT_HEADERS, ...headers }
|
|
@@ -34,6 +45,8 @@ export default class VectorDataApi {
|
|
|
34
45
|
* Enable throwing errors instead of returning them in the response
|
|
35
46
|
* When enabled, failed operations will throw instead of returning { data: null, error }
|
|
36
47
|
*
|
|
48
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
49
|
+
*
|
|
37
50
|
* @returns This instance for method chaining
|
|
38
51
|
* @example
|
|
39
52
|
* ```typescript
|
|
@@ -51,6 +64,8 @@ export default class VectorDataApi {
|
|
|
51
64
|
* Inserts or updates vectors in batch (upsert operation)
|
|
52
65
|
* Accepts 1-500 vectors per request. Larger batches should be split
|
|
53
66
|
*
|
|
67
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
68
|
+
*
|
|
54
69
|
* @param options - Vector insertion options
|
|
55
70
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
56
71
|
* @param options.indexName - Name of the target index
|
|
@@ -109,6 +124,8 @@ export default class VectorDataApi {
|
|
|
109
124
|
* Optionally includes vector data and/or metadata in response
|
|
110
125
|
* Additional permissions required when returning data or metadata
|
|
111
126
|
*
|
|
127
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
128
|
+
*
|
|
112
129
|
* @param options - Vector retrieval options
|
|
113
130
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
114
131
|
* @param options.indexName - Name of the index
|
|
@@ -157,6 +174,8 @@ export default class VectorDataApi {
|
|
|
157
174
|
* Supports parallel scanning via segment configuration for high-throughput scenarios
|
|
158
175
|
* Additional permissions required when returning data or metadata
|
|
159
176
|
*
|
|
177
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
178
|
+
*
|
|
160
179
|
* @param options - Vector listing options
|
|
161
180
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
162
181
|
* @param options.indexName - Name of the index
|
|
@@ -237,6 +256,8 @@ export default class VectorDataApi {
|
|
|
237
256
|
* Returns top-K most similar vectors based on the configured distance metric
|
|
238
257
|
* Supports optional metadata filtering (requires GetVectors permission)
|
|
239
258
|
*
|
|
259
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
260
|
+
*
|
|
240
261
|
* @param options - Query options
|
|
241
262
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
242
263
|
* @param options.indexName - Name of the index
|
|
@@ -295,6 +316,8 @@ export default class VectorDataApi {
|
|
|
295
316
|
* Deletes vectors by their keys in batch
|
|
296
317
|
* Accepts 1-500 keys per request
|
|
297
318
|
*
|
|
319
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
320
|
+
*
|
|
298
321
|
* @param options - Vector deletion options
|
|
299
322
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
300
323
|
* @param options.indexName - Name of the index
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Options for creating a vector index
|
|
17
|
+
*
|
|
18
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
17
19
|
*/
|
|
18
20
|
export interface CreateIndexOptions {
|
|
19
21
|
vectorBucketName: string
|
|
@@ -27,6 +29,8 @@ export interface CreateIndexOptions {
|
|
|
27
29
|
/**
|
|
28
30
|
* API class for managing Vector Indexes within Vector Buckets
|
|
29
31
|
* Provides methods for creating, reading, listing, and deleting vector indexes
|
|
32
|
+
*
|
|
33
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
30
34
|
*/
|
|
31
35
|
export default class VectorIndexApi {
|
|
32
36
|
protected url: string
|
|
@@ -34,6 +38,15 @@ export default class VectorIndexApi {
|
|
|
34
38
|
protected fetch: Fetch
|
|
35
39
|
protected shouldThrowOnError = false
|
|
36
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Creates an API client for managing vector indexes.
|
|
43
|
+
*
|
|
44
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
45
|
+
*
|
|
46
|
+
* @param url - Base URL for the Storage Vectors API.
|
|
47
|
+
* @param headers - Default headers sent with each request.
|
|
48
|
+
* @param fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
49
|
+
*/
|
|
37
50
|
constructor(url: string, headers: { [key: string]: string } = {}, fetch?: Fetch) {
|
|
38
51
|
this.url = url.replace(/\/$/, '')
|
|
39
52
|
this.headers = { ...DEFAULT_HEADERS, ...headers }
|
|
@@ -44,6 +57,8 @@ export default class VectorIndexApi {
|
|
|
44
57
|
* Enable throwing errors instead of returning them in the response
|
|
45
58
|
* When enabled, failed operations will throw instead of returning { data: null, error }
|
|
46
59
|
*
|
|
60
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
61
|
+
*
|
|
47
62
|
* @returns This instance for method chaining
|
|
48
63
|
* @example
|
|
49
64
|
* ```typescript
|
|
@@ -61,6 +76,8 @@ export default class VectorIndexApi {
|
|
|
61
76
|
* Creates a new vector index within a bucket
|
|
62
77
|
* Defines the schema for vectors including dimensionality, distance metric, and metadata config
|
|
63
78
|
*
|
|
79
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
80
|
+
*
|
|
64
81
|
* @param options - Index configuration
|
|
65
82
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
66
83
|
* @param options.indexName - Unique name for the index within the bucket
|
|
@@ -111,6 +128,8 @@ export default class VectorIndexApi {
|
|
|
111
128
|
* Retrieves metadata for a specific vector index
|
|
112
129
|
* Returns index configuration including dimension, distance metric, and metadata settings
|
|
113
130
|
*
|
|
131
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
132
|
+
*
|
|
114
133
|
* @param vectorBucketName - Name of the parent vector bucket
|
|
115
134
|
* @param indexName - Name of the index to retrieve
|
|
116
135
|
* @returns Promise with index metadata or error
|
|
@@ -155,6 +174,8 @@ export default class VectorIndexApi {
|
|
|
155
174
|
* Lists vector indexes within a bucket with optional filtering and pagination
|
|
156
175
|
* Supports prefix-based filtering and paginated results
|
|
157
176
|
*
|
|
177
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
178
|
+
*
|
|
158
179
|
* @param options - Listing options
|
|
159
180
|
* @param options.vectorBucketName - Name of the parent vector bucket
|
|
160
181
|
* @param options.prefix - Filter indexes by name prefix
|
|
@@ -206,6 +227,8 @@ export default class VectorIndexApi {
|
|
|
206
227
|
* Deletes a vector index and all its data
|
|
207
228
|
* This operation removes the index schema and all vectors stored in the index
|
|
208
229
|
*
|
|
230
|
+
* **Private alpha:** Vector storage APIs are currently in private alpha and may not be accessible.
|
|
231
|
+
*
|
|
209
232
|
* @param vectorBucketName - Name of the parent vector bucket
|
|
210
233
|
* @param indexName - Name of the index to delete
|
|
211
234
|
* @returns Promise with empty response on success or error
|
package/src/lib/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '2.81.1'
|
|
7
|
+
export const version = '2.81.2-canary.1'
|