VectorIndexScope
import { VectorIndexScope } from "https://esm.sh/@supabase/storage-js@2.89.0/dist/index.d.mts";class VectorIndexScope extends VectorDataApi { }
constructor(
url: string,
headers: {},
[key: string]: string;
vectorBucketName: string,
indexName: string,
fetch?: Fetch,
);private indexName;
private vectorBucketName;
deleteVectors(options: Omit<DeleteVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<undefined>>;
getVectors(options: Omit<GetVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<GetVectorsResponse>>;
listVectors(options?: Omit<ListVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<ListVectorsResponse>>;
putVectors(options: Omit<PutVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<undefined>>;
queryVectors(options: Omit<QueryVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<QueryVectorsResponse>>;
§Constructors
§Properties
§Methods
§
deleteVectors(options: Omit<DeleteVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<undefined>>
[src]@param options
- Deletion options (bucket and index names automatically set)
@return
Promise with empty response on success or error
@example
const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
await index.deleteVectors({
keys: ['doc-1', 'doc-2', 'doc-3']
})
§
getVectors(options: Omit<GetVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<GetVectorsResponse>>
[src]@param options
- Vector retrieval options (bucket and index names automatically set)
@return
Promise with response containing vectors array or error
@example
const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
const { data } = await index.getVectors({
keys: ['doc-1', 'doc-2'],
returnMetadata: true
})
§
listVectors(options?: Omit<ListVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<ListVectorsResponse>>
[src]@param options
- Listing options (bucket and index names automatically set)
@return
Promise with response containing vectors array and pagination token or error
@example
const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
const { data } = await index.listVectors({
maxResults: 500,
returnMetadata: true
})
§
putVectors(options: Omit<PutVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<undefined>>
[src]@param options
- Vector insertion options (bucket and index names automatically set)
@return
Promise with empty response on success or error
@example
const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
await index.putVectors({
vectors: [
{
key: 'doc-1',
data: { float32: [0.1, 0.2, ...] },
metadata: { title: 'Introduction', page: 1 }
}
]
})
§
queryVectors(options: Omit<QueryVectorsOptions, "vectorBucketName" | "indexName">): Promise<ApiResponse<QueryVectorsResponse>>
[src]@param options
- Query options (bucket and index names automatically set)
@return
Promise with response containing matches array of similar vectors ordered by distance or error
@example
const index = supabase.storage.vectors.from('embeddings-prod').index('documents-openai')
const { data } = await index.queryVectors({
queryVector: { float32: [0.1, 0.2, ...] },
topK: 5,
filter: { category: 'technical' },
returnDistance: true,
returnMetadata: true
})