@supabase/storage-js 2.87.4-canary.2 → 2.87.4-canary.4

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.
Files changed (206) hide show
  1. package/README.md +2 -106
  2. package/dist/index.cjs +3019 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +2601 -0
  5. package/dist/index.d.cts.map +1 -0
  6. package/dist/index.d.mts +2601 -0
  7. package/dist/index.d.mts.map +1 -0
  8. package/dist/index.mjs +2998 -0
  9. package/dist/index.mjs.map +1 -0
  10. package/dist/umd/supabase.js +1 -1
  11. package/package.json +21 -12
  12. package/src/lib/version.ts +1 -1
  13. package/dist/main/StorageClient.d.ts +0 -64
  14. package/dist/main/StorageClient.d.ts.map +0 -1
  15. package/dist/main/StorageClient.js +0 -74
  16. package/dist/main/StorageClient.js.map +0 -1
  17. package/dist/main/index.d.ts +0 -7
  18. package/dist/main/index.d.ts.map +0 -1
  19. package/dist/main/index.js +0 -12
  20. package/dist/main/index.js.map +0 -1
  21. package/dist/main/lib/constants.d.ts +0 -4
  22. package/dist/main/lib/constants.d.ts.map +0 -1
  23. package/dist/main/lib/constants.js +0 -8
  24. package/dist/main/lib/constants.js.map +0 -1
  25. package/dist/main/lib/errors.d.ts +0 -21
  26. package/dist/main/lib/errors.d.ts.map +0 -1
  27. package/dist/main/lib/errors.js +0 -41
  28. package/dist/main/lib/errors.js.map +0 -1
  29. package/dist/main/lib/fetch.d.ts +0 -16
  30. package/dist/main/lib/fetch.d.ts.map +0 -1
  31. package/dist/main/lib/fetch.js +0 -95
  32. package/dist/main/lib/fetch.js.map +0 -1
  33. package/dist/main/lib/helpers.d.ts +0 -28
  34. package/dist/main/lib/helpers.d.ts.map +0 -1
  35. package/dist/main/lib/helpers.js +0 -87
  36. package/dist/main/lib/helpers.js.map +0 -1
  37. package/dist/main/lib/index.d.ts +0 -6
  38. package/dist/main/lib/index.d.ts.map +0 -1
  39. package/dist/main/lib/index.js +0 -9
  40. package/dist/main/lib/index.js.map +0 -1
  41. package/dist/main/lib/types.d.ts +0 -226
  42. package/dist/main/lib/types.d.ts.map +0 -1
  43. package/dist/main/lib/types.js +0 -3
  44. package/dist/main/lib/types.js.map +0 -1
  45. package/dist/main/lib/vectors/StorageVectorsClient.d.ts +0 -505
  46. package/dist/main/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
  47. package/dist/main/lib/vectors/StorageVectorsClient.js +0 -582
  48. package/dist/main/lib/vectors/StorageVectorsClient.js.map +0 -1
  49. package/dist/main/lib/vectors/VectorBucketApi.d.ts +0 -32
  50. package/dist/main/lib/vectors/VectorBucketApi.d.ts.map +0 -1
  51. package/dist/main/lib/vectors/VectorBucketApi.js +0 -102
  52. package/dist/main/lib/vectors/VectorBucketApi.js.map +0 -1
  53. package/dist/main/lib/vectors/VectorDataApi.d.ts +0 -32
  54. package/dist/main/lib/vectors/VectorDataApi.d.ts.map +0 -1
  55. package/dist/main/lib/vectors/VectorDataApi.js +0 -147
  56. package/dist/main/lib/vectors/VectorDataApi.js.map +0 -1
  57. package/dist/main/lib/vectors/VectorIndexApi.d.ts +0 -47
  58. package/dist/main/lib/vectors/VectorIndexApi.d.ts.map +0 -1
  59. package/dist/main/lib/vectors/VectorIndexApi.js +0 -104
  60. package/dist/main/lib/vectors/VectorIndexApi.js.map +0 -1
  61. package/dist/main/lib/vectors/constants.d.ts +0 -5
  62. package/dist/main/lib/vectors/constants.d.ts.map +0 -1
  63. package/dist/main/lib/vectors/constants.js +0 -9
  64. package/dist/main/lib/vectors/constants.js.map +0 -1
  65. package/dist/main/lib/vectors/errors.d.ts +0 -55
  66. package/dist/main/lib/vectors/errors.d.ts.map +0 -1
  67. package/dist/main/lib/vectors/errors.js +0 -76
  68. package/dist/main/lib/vectors/errors.js.map +0 -1
  69. package/dist/main/lib/vectors/fetch.d.ts +0 -57
  70. package/dist/main/lib/vectors/fetch.d.ts.map +0 -1
  71. package/dist/main/lib/vectors/fetch.js +0 -167
  72. package/dist/main/lib/vectors/fetch.js.map +0 -1
  73. package/dist/main/lib/vectors/helpers.d.ts +0 -46
  74. package/dist/main/lib/vectors/helpers.d.ts.map +0 -1
  75. package/dist/main/lib/vectors/helpers.js +0 -74
  76. package/dist/main/lib/vectors/helpers.js.map +0 -1
  77. package/dist/main/lib/vectors/index.d.ts +0 -11
  78. package/dist/main/lib/vectors/index.d.ts.map +0 -1
  79. package/dist/main/lib/vectors/index.js +0 -31
  80. package/dist/main/lib/vectors/index.js.map +0 -1
  81. package/dist/main/lib/vectors/types.d.ts +0 -279
  82. package/dist/main/lib/vectors/types.d.ts.map +0 -1
  83. package/dist/main/lib/vectors/types.js +0 -3
  84. package/dist/main/lib/vectors/types.js.map +0 -1
  85. package/dist/main/lib/version.d.ts +0 -2
  86. package/dist/main/lib/version.d.ts.map +0 -1
  87. package/dist/main/lib/version.js +0 -11
  88. package/dist/main/lib/version.js.map +0 -1
  89. package/dist/main/packages/BlobDownloadBuilder.d.ts +0 -16
  90. package/dist/main/packages/BlobDownloadBuilder.d.ts.map +0 -1
  91. package/dist/main/packages/BlobDownloadBuilder.js +0 -55
  92. package/dist/main/packages/BlobDownloadBuilder.js.map +0 -1
  93. package/dist/main/packages/StorageAnalyticsClient.d.ts +0 -324
  94. package/dist/main/packages/StorageAnalyticsClient.d.ts.map +0 -1
  95. package/dist/main/packages/StorageAnalyticsClient.js +0 -395
  96. package/dist/main/packages/StorageAnalyticsClient.js.map +0 -1
  97. package/dist/main/packages/StorageBucketApi.d.ts +0 -266
  98. package/dist/main/packages/StorageBucketApi.d.ts.map +0 -1
  99. package/dist/main/packages/StorageBucketApi.js +0 -362
  100. package/dist/main/packages/StorageBucketApi.js.map +0 -1
  101. package/dist/main/packages/StorageFileApi.d.ts +0 -680
  102. package/dist/main/packages/StorageFileApi.d.ts.map +0 -1
  103. package/dist/main/packages/StorageFileApi.js +0 -1002
  104. package/dist/main/packages/StorageFileApi.js.map +0 -1
  105. package/dist/main/packages/StreamDownloadBuilder.d.ts +0 -9
  106. package/dist/main/packages/StreamDownloadBuilder.d.ts.map +0 -1
  107. package/dist/main/packages/StreamDownloadBuilder.js +0 -35
  108. package/dist/main/packages/StreamDownloadBuilder.js.map +0 -1
  109. package/dist/module/StorageClient.d.ts +0 -64
  110. package/dist/module/StorageClient.d.ts.map +0 -1
  111. package/dist/module/StorageClient.js +0 -69
  112. package/dist/module/StorageClient.js.map +0 -1
  113. package/dist/module/index.d.ts +0 -7
  114. package/dist/module/index.d.ts.map +0 -1
  115. package/dist/module/index.js +0 -6
  116. package/dist/module/index.js.map +0 -1
  117. package/dist/module/lib/constants.d.ts +0 -4
  118. package/dist/module/lib/constants.d.ts.map +0 -1
  119. package/dist/module/lib/constants.js +0 -5
  120. package/dist/module/lib/constants.js.map +0 -1
  121. package/dist/module/lib/errors.d.ts +0 -21
  122. package/dist/module/lib/errors.d.ts.map +0 -1
  123. package/dist/module/lib/errors.js +0 -34
  124. package/dist/module/lib/errors.js.map +0 -1
  125. package/dist/module/lib/fetch.d.ts +0 -16
  126. package/dist/module/lib/fetch.d.ts.map +0 -1
  127. package/dist/module/lib/fetch.js +0 -88
  128. package/dist/module/lib/fetch.js.map +0 -1
  129. package/dist/module/lib/helpers.d.ts +0 -28
  130. package/dist/module/lib/helpers.d.ts.map +0 -1
  131. package/dist/module/lib/helpers.js +0 -79
  132. package/dist/module/lib/helpers.js.map +0 -1
  133. package/dist/module/lib/index.d.ts +0 -6
  134. package/dist/module/lib/index.d.ts.map +0 -1
  135. package/dist/module/lib/index.js +0 -6
  136. package/dist/module/lib/index.js.map +0 -1
  137. package/dist/module/lib/types.d.ts +0 -226
  138. package/dist/module/lib/types.d.ts.map +0 -1
  139. package/dist/module/lib/types.js +0 -2
  140. package/dist/module/lib/types.js.map +0 -1
  141. package/dist/module/lib/vectors/StorageVectorsClient.d.ts +0 -505
  142. package/dist/module/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
  143. package/dist/module/lib/vectors/StorageVectorsClient.js +0 -576
  144. package/dist/module/lib/vectors/StorageVectorsClient.js.map +0 -1
  145. package/dist/module/lib/vectors/VectorBucketApi.d.ts +0 -32
  146. package/dist/module/lib/vectors/VectorBucketApi.d.ts.map +0 -1
  147. package/dist/module/lib/vectors/VectorBucketApi.js +0 -99
  148. package/dist/module/lib/vectors/VectorBucketApi.js.map +0 -1
  149. package/dist/module/lib/vectors/VectorDataApi.d.ts +0 -32
  150. package/dist/module/lib/vectors/VectorDataApi.d.ts.map +0 -1
  151. package/dist/module/lib/vectors/VectorDataApi.js +0 -144
  152. package/dist/module/lib/vectors/VectorDataApi.js.map +0 -1
  153. package/dist/module/lib/vectors/VectorIndexApi.d.ts +0 -47
  154. package/dist/module/lib/vectors/VectorIndexApi.d.ts.map +0 -1
  155. package/dist/module/lib/vectors/VectorIndexApi.js +0 -101
  156. package/dist/module/lib/vectors/VectorIndexApi.js.map +0 -1
  157. package/dist/module/lib/vectors/constants.d.ts +0 -5
  158. package/dist/module/lib/vectors/constants.d.ts.map +0 -1
  159. package/dist/module/lib/vectors/constants.js +0 -6
  160. package/dist/module/lib/vectors/constants.js.map +0 -1
  161. package/dist/module/lib/vectors/errors.d.ts +0 -55
  162. package/dist/module/lib/vectors/errors.d.ts.map +0 -1
  163. package/dist/module/lib/vectors/errors.js +0 -69
  164. package/dist/module/lib/vectors/errors.js.map +0 -1
  165. package/dist/module/lib/vectors/fetch.d.ts +0 -57
  166. package/dist/module/lib/vectors/fetch.d.ts.map +0 -1
  167. package/dist/module/lib/vectors/fetch.js +0 -161
  168. package/dist/module/lib/vectors/fetch.js.map +0 -1
  169. package/dist/module/lib/vectors/helpers.d.ts +0 -46
  170. package/dist/module/lib/vectors/helpers.d.ts.map +0 -1
  171. package/dist/module/lib/vectors/helpers.js +0 -66
  172. package/dist/module/lib/vectors/helpers.js.map +0 -1
  173. package/dist/module/lib/vectors/index.d.ts +0 -11
  174. package/dist/module/lib/vectors/index.d.ts.map +0 -1
  175. package/dist/module/lib/vectors/index.js +0 -11
  176. package/dist/module/lib/vectors/index.js.map +0 -1
  177. package/dist/module/lib/vectors/types.d.ts +0 -279
  178. package/dist/module/lib/vectors/types.d.ts.map +0 -1
  179. package/dist/module/lib/vectors/types.js +0 -2
  180. package/dist/module/lib/vectors/types.js.map +0 -1
  181. package/dist/module/lib/version.d.ts +0 -2
  182. package/dist/module/lib/version.d.ts.map +0 -1
  183. package/dist/module/lib/version.js +0 -8
  184. package/dist/module/lib/version.js.map +0 -1
  185. package/dist/module/packages/BlobDownloadBuilder.d.ts +0 -16
  186. package/dist/module/packages/BlobDownloadBuilder.d.ts.map +0 -1
  187. package/dist/module/packages/BlobDownloadBuilder.js +0 -53
  188. package/dist/module/packages/BlobDownloadBuilder.js.map +0 -1
  189. package/dist/module/packages/StorageAnalyticsClient.d.ts +0 -324
  190. package/dist/module/packages/StorageAnalyticsClient.d.ts.map +0 -1
  191. package/dist/module/packages/StorageAnalyticsClient.js +0 -392
  192. package/dist/module/packages/StorageAnalyticsClient.js.map +0 -1
  193. package/dist/module/packages/StorageBucketApi.d.ts +0 -266
  194. package/dist/module/packages/StorageBucketApi.d.ts.map +0 -1
  195. package/dist/module/packages/StorageBucketApi.js +0 -359
  196. package/dist/module/packages/StorageBucketApi.js.map +0 -1
  197. package/dist/module/packages/StorageFileApi.d.ts +0 -680
  198. package/dist/module/packages/StorageFileApi.d.ts.map +0 -1
  199. package/dist/module/packages/StorageFileApi.js +0 -999
  200. package/dist/module/packages/StorageFileApi.js.map +0 -1
  201. package/dist/module/packages/StreamDownloadBuilder.d.ts +0 -9
  202. package/dist/module/packages/StreamDownloadBuilder.d.ts.map +0 -1
  203. package/dist/module/packages/StreamDownloadBuilder.js +0 -32
  204. package/dist/module/packages/StreamDownloadBuilder.js.map +0 -1
  205. package/dist/tsconfig.module.tsbuildinfo +0 -1
  206. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,505 +0,0 @@
1
- import VectorIndexApi, { CreateIndexOptions } from './VectorIndexApi';
2
- import VectorDataApi from './VectorDataApi';
3
- import { Fetch } from './fetch';
4
- import VectorBucketApi from './VectorBucketApi';
5
- import { ApiResponse, DeleteVectorsOptions, GetVectorsOptions, ListIndexesOptions, ListVectorsOptions, ListVectorBucketsOptions, ListVectorBucketsResponse, PutVectorsOptions, QueryVectorsOptions, VectorBucket } from './types';
6
- /**
7
- *
8
- * @alpha
9
- *
10
- * Configuration options for the Storage Vectors client
11
- *
12
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
13
- */
14
- export interface StorageVectorsClientOptions {
15
- /**
16
- * Custom headers to include in all requests
17
- */
18
- headers?: {
19
- [key: string]: string;
20
- };
21
- /**
22
- * Custom fetch implementation (optional)
23
- * Useful for testing or custom request handling
24
- */
25
- fetch?: Fetch;
26
- }
27
- /**
28
- *
29
- * @alpha
30
- *
31
- * Main client for interacting with S3 Vectors API
32
- * Provides access to bucket, index, and vector data operations
33
- *
34
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
35
- *
36
- * **Usage Patterns:**
37
- *
38
- * ```typescript
39
- * const { data, error } = await supabase
40
- * .storage
41
- * .vectors
42
- * .createBucket('embeddings-prod')
43
- *
44
- * // Access index operations via buckets
45
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
46
- * await bucket.createIndex({
47
- * indexName: 'documents',
48
- * dataType: 'float32',
49
- * dimension: 1536,
50
- * distanceMetric: 'cosine'
51
- * })
52
- *
53
- * // Access vector operations via index
54
- * const index = bucket.index('documents')
55
- * await index.putVectors({
56
- * vectors: [
57
- * { key: 'doc-1', data: { float32: [...] }, metadata: { title: 'Intro' } }
58
- * ]
59
- * })
60
- *
61
- * // Query similar vectors
62
- * const { data } = await index.queryVectors({
63
- * queryVector: { float32: [...] },
64
- * topK: 5,
65
- * returnDistance: true
66
- * })
67
- * ```
68
- */
69
- export declare class StorageVectorsClient extends VectorBucketApi {
70
- /**
71
- * @alpha
72
- *
73
- * Creates a StorageVectorsClient that can manage buckets, indexes, and vectors.
74
- *
75
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
76
- *
77
- * @category Vector Buckets
78
- * @param url - Base URL of the Storage Vectors REST API.
79
- * @param options.headers - Optional headers (for example `Authorization`) applied to every request.
80
- * @param options.fetch - Optional custom `fetch` implementation for non-browser runtimes.
81
- *
82
- * @example
83
- * ```typescript
84
- * const client = new StorageVectorsClient(url, options)
85
- * ```
86
- */
87
- constructor(url: string, options?: StorageVectorsClientOptions);
88
- /**
89
- *
90
- * @alpha
91
- *
92
- * Access operations for a specific vector bucket
93
- * Returns a scoped client for index and vector operations within the bucket
94
- *
95
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
96
- *
97
- * @category Vector Buckets
98
- * @param vectorBucketName - Name of the vector bucket
99
- * @returns Bucket-scoped client with index and vector operations
100
- *
101
- * @example
102
- * ```typescript
103
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
104
- * ```
105
- */
106
- from(vectorBucketName: string): VectorBucketScope;
107
- /**
108
- *
109
- * @alpha
110
- *
111
- * Creates a new vector bucket
112
- * Vector buckets are containers for vector indexes and their data
113
- *
114
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
115
- *
116
- * @category Vector Buckets
117
- * @param vectorBucketName - Unique name for the vector bucket
118
- * @returns Promise with empty response on success or error
119
- *
120
- * @example
121
- * ```typescript
122
- * const { data, error } = await supabase
123
- * .storage
124
- * .vectors
125
- * .createBucket('embeddings-prod')
126
- * ```
127
- */
128
- createBucket(vectorBucketName: string): Promise<ApiResponse<undefined>>;
129
- /**
130
- *
131
- * @alpha
132
- *
133
- * Retrieves metadata for a specific vector bucket
134
- *
135
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
136
- *
137
- * @category Vector Buckets
138
- * @param vectorBucketName - Name of the vector bucket
139
- * @returns Promise with bucket metadata or error
140
- *
141
- * @example
142
- * ```typescript
143
- * const { data, error } = await supabase
144
- * .storage
145
- * .vectors
146
- * .getBucket('embeddings-prod')
147
- *
148
- * console.log('Bucket created:', data?.vectorBucket.creationTime)
149
- * ```
150
- */
151
- getBucket(vectorBucketName: string): Promise<ApiResponse<{
152
- vectorBucket: VectorBucket;
153
- }>>;
154
- /**
155
- *
156
- * @alpha
157
- *
158
- * Lists all vector buckets with optional filtering and pagination
159
- *
160
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
161
- *
162
- * @category Vector Buckets
163
- * @param options - Optional filters (prefix, maxResults, nextToken)
164
- * @returns Promise with list of buckets or error
165
- *
166
- * @example
167
- * ```typescript
168
- * const { data, error } = await supabase
169
- * .storage
170
- * .vectors
171
- * .listBuckets({ prefix: 'embeddings-' })
172
- *
173
- * data?.vectorBuckets.forEach(bucket => {
174
- * console.log(bucket.vectorBucketName)
175
- * })
176
- * ```
177
- */
178
- listBuckets(options?: ListVectorBucketsOptions): Promise<ApiResponse<ListVectorBucketsResponse>>;
179
- /**
180
- *
181
- * @alpha
182
- *
183
- * Deletes a vector bucket (bucket must be empty)
184
- * All indexes must be deleted before deleting the bucket
185
- *
186
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
187
- *
188
- * @category Vector Buckets
189
- * @param vectorBucketName - Name of the vector bucket to delete
190
- * @returns Promise with empty response on success or error
191
- *
192
- * @example
193
- * ```typescript
194
- * const { data, error } = await supabase
195
- * .storage
196
- * .vectors
197
- * .deleteBucket('embeddings-old')
198
- * ```
199
- */
200
- deleteBucket(vectorBucketName: string): Promise<ApiResponse<undefined>>;
201
- }
202
- /**
203
- *
204
- * @alpha
205
- *
206
- * Scoped client for operations within a specific vector bucket
207
- * Provides index management and access to vector operations
208
- *
209
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
210
- */
211
- export declare class VectorBucketScope extends VectorIndexApi {
212
- private vectorBucketName;
213
- /**
214
- * @alpha
215
- *
216
- * Creates a helper that automatically scopes all index operations to the provided bucket.
217
- *
218
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
219
- *
220
- * @category Vector Buckets
221
- * @example
222
- * ```typescript
223
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
224
- * ```
225
- */
226
- constructor(url: string, headers: {
227
- [key: string]: string;
228
- }, vectorBucketName: string, fetch?: Fetch);
229
- /**
230
- *
231
- * @alpha
232
- *
233
- * Creates a new vector index in this bucket
234
- * Convenience method that automatically includes the bucket name
235
- *
236
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
237
- *
238
- * @category Vector Buckets
239
- * @param options - Index configuration (vectorBucketName is automatically set)
240
- * @returns Promise with empty response on success or error
241
- *
242
- * @example
243
- * ```typescript
244
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
245
- * await bucket.createIndex({
246
- * indexName: 'documents-openai',
247
- * dataType: 'float32',
248
- * dimension: 1536,
249
- * distanceMetric: 'cosine',
250
- * metadataConfiguration: {
251
- * nonFilterableMetadataKeys: ['raw_text']
252
- * }
253
- * })
254
- * ```
255
- */
256
- createIndex(options: Omit<CreateIndexOptions, 'vectorBucketName'>): Promise<ApiResponse<undefined>>;
257
- /**
258
- *
259
- * @alpha
260
- *
261
- * Lists indexes in this bucket
262
- * Convenience method that automatically includes the bucket name
263
- *
264
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
265
- *
266
- * @category Vector Buckets
267
- * @param options - Listing options (vectorBucketName is automatically set)
268
- * @returns Promise with response containing indexes array and pagination token or error
269
- *
270
- * @example
271
- * ```typescript
272
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
273
- * const { data } = await bucket.listIndexes({ prefix: 'documents-' })
274
- * ```
275
- */
276
- listIndexes(options?: Omit<ListIndexesOptions, 'vectorBucketName'>): Promise<ApiResponse<import("./types").ListIndexesResponse>>;
277
- /**
278
- *
279
- * @alpha
280
- *
281
- * Retrieves metadata for a specific index in this bucket
282
- * Convenience method that automatically includes the bucket name
283
- *
284
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
285
- *
286
- * @category Vector Buckets
287
- * @param indexName - Name of the index to retrieve
288
- * @returns Promise with index metadata or error
289
- *
290
- * @example
291
- * ```typescript
292
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
293
- * const { data } = await bucket.getIndex('documents-openai')
294
- * console.log('Dimension:', data?.index.dimension)
295
- * ```
296
- */
297
- getIndex(indexName: string): Promise<ApiResponse<{
298
- index: import("./types").VectorIndex;
299
- }>>;
300
- /**
301
- *
302
- * @alpha
303
- *
304
- * Deletes an index from this bucket
305
- * Convenience method that automatically includes the bucket name
306
- *
307
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
308
- *
309
- * @category Vector Buckets
310
- * @param indexName - Name of the index to delete
311
- * @returns Promise with empty response on success or error
312
- *
313
- * @example
314
- * ```typescript
315
- * const bucket = supabase.storage.vectors.from('embeddings-prod')
316
- * await bucket.deleteIndex('old-index')
317
- * ```
318
- */
319
- deleteIndex(indexName: string): Promise<ApiResponse<undefined>>;
320
- /**
321
- *
322
- * @alpha
323
- *
324
- * Access operations for a specific index within this bucket
325
- * Returns a scoped client for vector data operations
326
- *
327
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
328
- *
329
- * @category Vector Buckets
330
- * @param indexName - Name of the index
331
- * @returns Index-scoped client with vector data operations
332
- *
333
- * @example
334
- * ```typescript
335
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
336
- *
337
- * // Insert vectors
338
- * await index.putVectors({
339
- * vectors: [
340
- * { key: 'doc-1', data: { float32: [...] }, metadata: { title: 'Intro' } }
341
- * ]
342
- * })
343
- *
344
- * // Query similar vectors
345
- * const { data } = await index.queryVectors({
346
- * queryVector: { float32: [...] },
347
- * topK: 5
348
- * })
349
- * ```
350
- */
351
- index(indexName: string): VectorIndexScope;
352
- }
353
- /**
354
- *
355
- * @alpha
356
- *
357
- * Scoped client for operations within a specific vector index
358
- * Provides vector data operations (put, get, list, query, delete)
359
- *
360
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
361
- */
362
- export declare class VectorIndexScope extends VectorDataApi {
363
- private vectorBucketName;
364
- private indexName;
365
- /**
366
- *
367
- * @alpha
368
- *
369
- * Creates a helper that automatically scopes all vector operations to the provided bucket/index names.
370
- *
371
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
372
- *
373
- * @category Vector Buckets
374
- * @example
375
- * ```typescript
376
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
377
- * ```
378
- */
379
- constructor(url: string, headers: {
380
- [key: string]: string;
381
- }, vectorBucketName: string, indexName: string, fetch?: Fetch);
382
- /**
383
- *
384
- * @alpha
385
- *
386
- * Inserts or updates vectors in this index
387
- * Convenience method that automatically includes bucket and index names
388
- *
389
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
390
- *
391
- * @category Vector Buckets
392
- * @param options - Vector insertion options (bucket and index names automatically set)
393
- * @returns Promise with empty response on success or error
394
- *
395
- * @example
396
- * ```typescript
397
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
398
- * await index.putVectors({
399
- * vectors: [
400
- * {
401
- * key: 'doc-1',
402
- * data: { float32: [0.1, 0.2, ...] },
403
- * metadata: { title: 'Introduction', page: 1 }
404
- * }
405
- * ]
406
- * })
407
- * ```
408
- */
409
- putVectors(options: Omit<PutVectorsOptions, 'vectorBucketName' | 'indexName'>): Promise<ApiResponse<undefined>>;
410
- /**
411
- *
412
- * @alpha
413
- *
414
- * Retrieves vectors by keys from this index
415
- * Convenience method that automatically includes bucket and index names
416
- *
417
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
418
- *
419
- * @category Vector Buckets
420
- * @param options - Vector retrieval options (bucket and index names automatically set)
421
- * @returns Promise with response containing vectors array or error
422
- *
423
- * @example
424
- * ```typescript
425
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
426
- * const { data } = await index.getVectors({
427
- * keys: ['doc-1', 'doc-2'],
428
- * returnMetadata: true
429
- * })
430
- * ```
431
- */
432
- getVectors(options: Omit<GetVectorsOptions, 'vectorBucketName' | 'indexName'>): Promise<ApiResponse<import("./types").GetVectorsResponse>>;
433
- /**
434
- *
435
- * @alpha
436
- *
437
- * Lists vectors in this index with pagination
438
- * Convenience method that automatically includes bucket and index names
439
- *
440
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
441
- *
442
- * @category Vector Buckets
443
- * @param options - Listing options (bucket and index names automatically set)
444
- * @returns Promise with response containing vectors array and pagination token or error
445
- *
446
- * @example
447
- * ```typescript
448
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
449
- * const { data } = await index.listVectors({
450
- * maxResults: 500,
451
- * returnMetadata: true
452
- * })
453
- * ```
454
- */
455
- listVectors(options?: Omit<ListVectorsOptions, 'vectorBucketName' | 'indexName'>): Promise<ApiResponse<import("./types").ListVectorsResponse>>;
456
- /**
457
- *
458
- * @alpha
459
- *
460
- * Queries for similar vectors in this index
461
- * Convenience method that automatically includes bucket and index names
462
- *
463
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
464
- *
465
- * @category Vector Buckets
466
- * @param options - Query options (bucket and index names automatically set)
467
- * @returns Promise with response containing matches array of similar vectors ordered by distance or error
468
- *
469
- * @example
470
- * ```typescript
471
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
472
- * const { data } = await index.queryVectors({
473
- * queryVector: { float32: [0.1, 0.2, ...] },
474
- * topK: 5,
475
- * filter: { category: 'technical' },
476
- * returnDistance: true,
477
- * returnMetadata: true
478
- * })
479
- * ```
480
- */
481
- queryVectors(options: Omit<QueryVectorsOptions, 'vectorBucketName' | 'indexName'>): Promise<ApiResponse<import("./types").QueryVectorsResponse>>;
482
- /**
483
- *
484
- * @alpha
485
- *
486
- * Deletes vectors by keys from this index
487
- * Convenience method that automatically includes bucket and index names
488
- *
489
- * **Public alpha:** This API is part of a public alpha release and may not be available to your account type.
490
- *
491
- * @category Vector Buckets
492
- * @param options - Deletion options (bucket and index names automatically set)
493
- * @returns Promise with empty response on success or error
494
- *
495
- * @example
496
- * ```typescript
497
- * const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
498
- * await index.deleteVectors({
499
- * keys: ['doc-1', 'doc-2', 'doc-3']
500
- * })
501
- * ```
502
- */
503
- deleteVectors(options: Omit<DeleteVectorsOptions, 'vectorBucketName' | 'indexName'>): Promise<ApiResponse<undefined>>;
504
- }
505
- //# sourceMappingURL=StorageVectorsClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageVectorsClient.d.ts","sourceRoot":"","sources":["../../../../src/lib/vectors/StorageVectorsClient.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,EAAE,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACb,MAAM,SAAS,CAAA;AAEhB;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IACvD;;;;;;;;;;;;;;;;OAgBG;gBACS,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,2BAAgC;IAIlE;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,iBAAiB;IAIjD;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,YAAY,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,WAA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