@supabase/storage-js 2.100.0-rc.0 → 2.100.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/index.cjs +152 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -23
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +145 -23
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +152 -38
- package/dist/index.mjs.map +1 -1
- package/dist/umd/supabase.js +1 -1
- package/package.json +1 -1
- package/src/StorageClient.ts +2 -2
- package/src/lib/common/BaseApiClient.ts +1 -1
- package/src/lib/common/fetch.ts +19 -34
- package/src/lib/version.ts +1 -1
- package/src/packages/StorageAnalyticsClient.ts +12 -1
- package/src/packages/StorageBucketApi.ts +36 -0
- package/src/packages/StorageFileApi.ts +77 -2
- package/src/packages/StorageVectorsClient.ts +18 -18
|
@@ -90,7 +90,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
90
90
|
* @param options.headers - Optional headers (for example `Authorization`) applied to every request.
|
|
91
91
|
* @param options.fetch - Optional custom `fetch` implementation for non-browser runtimes.
|
|
92
92
|
*
|
|
93
|
-
* @example
|
|
93
|
+
* @example Creating a StorageVectorsClient instance
|
|
94
94
|
* ```typescript
|
|
95
95
|
* const client = new StorageVectorsClient(url, options)
|
|
96
96
|
* ```
|
|
@@ -112,7 +112,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
112
112
|
* @param vectorBucketName - Name of the vector bucket
|
|
113
113
|
* @returns Bucket-scoped client with index and vector operations
|
|
114
114
|
*
|
|
115
|
-
* @example
|
|
115
|
+
* @example Accessing a vector bucket
|
|
116
116
|
* ```typescript
|
|
117
117
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
118
118
|
* ```
|
|
@@ -134,7 +134,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
134
134
|
* @param vectorBucketName - Unique name for the vector bucket
|
|
135
135
|
* @returns Promise with empty response on success or error
|
|
136
136
|
*
|
|
137
|
-
* @example
|
|
137
|
+
* @example Creating a vector bucket
|
|
138
138
|
* ```typescript
|
|
139
139
|
* const { data, error } = await supabase
|
|
140
140
|
* .storage
|
|
@@ -158,7 +158,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
158
158
|
* @param vectorBucketName - Name of the vector bucket
|
|
159
159
|
* @returns Promise with bucket metadata or error
|
|
160
160
|
*
|
|
161
|
-
* @example
|
|
161
|
+
* @example Get bucket metadata
|
|
162
162
|
* ```typescript
|
|
163
163
|
* const { data, error } = await supabase
|
|
164
164
|
* .storage
|
|
@@ -184,7 +184,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
184
184
|
* @param options - Optional filters (prefix, maxResults, nextToken)
|
|
185
185
|
* @returns Promise with list of buckets or error
|
|
186
186
|
*
|
|
187
|
-
* @example
|
|
187
|
+
* @example List vector buckets
|
|
188
188
|
* ```typescript
|
|
189
189
|
* const { data, error } = await supabase
|
|
190
190
|
* .storage
|
|
@@ -215,7 +215,7 @@ export class StorageVectorsClient extends VectorBucketApi {
|
|
|
215
215
|
* @param vectorBucketName - Name of the vector bucket to delete
|
|
216
216
|
* @returns Promise with empty response on success or error
|
|
217
217
|
*
|
|
218
|
-
* @example
|
|
218
|
+
* @example Delete a vector bucket
|
|
219
219
|
* ```typescript
|
|
220
220
|
* const { data, error } = await supabase
|
|
221
221
|
* .storage
|
|
@@ -248,7 +248,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
248
248
|
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
249
249
|
*
|
|
250
250
|
* @category Vector Buckets
|
|
251
|
-
* @example
|
|
251
|
+
* @example Creating a vector bucket scope
|
|
252
252
|
* ```typescript
|
|
253
253
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
254
254
|
* ```
|
|
@@ -276,7 +276,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
276
276
|
* @param options - Index configuration (vectorBucketName is automatically set)
|
|
277
277
|
* @returns Promise with empty response on success or error
|
|
278
278
|
*
|
|
279
|
-
* @example
|
|
279
|
+
* @example Creating a vector index
|
|
280
280
|
* ```typescript
|
|
281
281
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
282
282
|
* await bucket.createIndex({
|
|
@@ -310,7 +310,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
310
310
|
* @param options - Listing options (vectorBucketName is automatically set)
|
|
311
311
|
* @returns Promise with response containing indexes array and pagination token or error
|
|
312
312
|
*
|
|
313
|
-
* @example
|
|
313
|
+
* @example List indexes
|
|
314
314
|
* ```typescript
|
|
315
315
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
316
316
|
* const { data } = await bucket.listIndexes({ prefix: 'documents-' })
|
|
@@ -336,7 +336,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
336
336
|
* @param indexName - Name of the index to retrieve
|
|
337
337
|
* @returns Promise with index metadata or error
|
|
338
338
|
*
|
|
339
|
-
* @example
|
|
339
|
+
* @example Get index metadata
|
|
340
340
|
* ```typescript
|
|
341
341
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
342
342
|
* const { data } = await bucket.getIndex('documents-openai')
|
|
@@ -360,7 +360,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
360
360
|
* @param indexName - Name of the index to delete
|
|
361
361
|
* @returns Promise with empty response on success or error
|
|
362
362
|
*
|
|
363
|
-
* @example
|
|
363
|
+
* @example Delete an index
|
|
364
364
|
* ```typescript
|
|
365
365
|
* const bucket = supabase.storage.vectors.from('embeddings-prod')
|
|
366
366
|
* await bucket.deleteIndex('old-index')
|
|
@@ -383,7 +383,7 @@ export class VectorBucketScope extends VectorIndexApi {
|
|
|
383
383
|
* @param indexName - Name of the index
|
|
384
384
|
* @returns Index-scoped client with vector data operations
|
|
385
385
|
*
|
|
386
|
-
* @example
|
|
386
|
+
* @example Accessing an index
|
|
387
387
|
* ```typescript
|
|
388
388
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
389
389
|
*
|
|
@@ -434,7 +434,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
434
434
|
* **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
|
|
435
435
|
*
|
|
436
436
|
* @category Vector Buckets
|
|
437
|
-
* @example
|
|
437
|
+
* @example Creating a vector index scope
|
|
438
438
|
* ```typescript
|
|
439
439
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
440
440
|
* ```
|
|
@@ -464,7 +464,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
464
464
|
* @param options - Vector insertion options (bucket and index names automatically set)
|
|
465
465
|
* @returns Promise with empty response on success or error
|
|
466
466
|
*
|
|
467
|
-
* @example
|
|
467
|
+
* @example Insert vectors into an index
|
|
468
468
|
* ```typescript
|
|
469
469
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
470
470
|
* await index.putVectors({
|
|
@@ -499,7 +499,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
499
499
|
* @param options - Vector retrieval options (bucket and index names automatically set)
|
|
500
500
|
* @returns Promise with response containing vectors array or error
|
|
501
501
|
*
|
|
502
|
-
* @example
|
|
502
|
+
* @example Get vectors by keys
|
|
503
503
|
* ```typescript
|
|
504
504
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
505
505
|
* const { data } = await index.getVectors({
|
|
@@ -529,7 +529,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
529
529
|
* @param options - Listing options (bucket and index names automatically set)
|
|
530
530
|
* @returns Promise with response containing vectors array and pagination token or error
|
|
531
531
|
*
|
|
532
|
-
* @example
|
|
532
|
+
* @example List vectors with pagination
|
|
533
533
|
* ```typescript
|
|
534
534
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
535
535
|
* const { data } = await index.listVectors({
|
|
@@ -561,7 +561,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
561
561
|
* @param options - Query options (bucket and index names automatically set)
|
|
562
562
|
* @returns Promise with response containing matches array of similar vectors ordered by distance or error
|
|
563
563
|
*
|
|
564
|
-
* @example
|
|
564
|
+
* @example Query similar vectors
|
|
565
565
|
* ```typescript
|
|
566
566
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
567
567
|
* const { data } = await index.queryVectors({
|
|
@@ -596,7 +596,7 @@ export class VectorIndexScope extends VectorDataApi {
|
|
|
596
596
|
* @param options - Deletion options (bucket and index names automatically set)
|
|
597
597
|
* @returns Promise with empty response on success or error
|
|
598
598
|
*
|
|
599
|
-
* @example
|
|
599
|
+
* @example Delete vectors by keys
|
|
600
600
|
* ```typescript
|
|
601
601
|
* const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
|
|
602
602
|
* await index.deleteVectors({
|