Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as mod from "https://esm.sh/@supabase/storage-js@2.89.0/dist/index.d.mts";

§Classes

StorageAnalyticsClient

Client class for managing Analytics Buckets using Iceberg tables Provides methods for creating, listing, and deleting analytics buckets

StorageApiError
StorageClient
StorageError
StorageUnknownError
StorageVectorsApiError

API error returned from S3 Vectors service Includes HTTP status code and service-specific error code

StorageVectorsClient
StorageVectorsError

Base error class for all Storage Vectors errors

StorageVectorsUnknownError

Unknown error that doesn't match expected error patterns Wraps the original error for debugging

VectorBucketApi
VectorBucketScope
VectorDataApi
VectorIndexApi
VectorIndexScope

§Enums

StorageVectorsErrorCode

Error codes specific to S3 Vectors API Maps AWS service errors to application-friendly error codes

§Variables

isPlainObject

Determine if input is a plain object An object is plain if it's created by either {}, new Object(), or Object.create(null)

normalizeToFloat32

Normalizes a number array to float32 format Ensures all vector values are valid 32-bit floats

resolveFetch

Resolves the fetch implementation to use Uses custom fetch if provided, otherwise uses native fetch

resolveResponse

Resolves the Response constructor to use Returns native Response constructor

validateVectorDimension

Validates vector dimensions match expected dimension Throws error if dimensions don't match

§Functions

isStorageError
isStorageVectorsError

Type guard to check if an error is a StorageVectorsError

§Interfaces

AnalyticBucket

Represents an Analytics Bucket using Apache Iceberg table format. Analytics buckets are optimized for analytical queries and data processing.

Bucket
CreateIndexOptions
DeleteVectorsOptions

Options for batch deleting vectors

DestinationOptions
EncryptionConfiguration

Configuration for encryption at rest

ErrorResponse

Standard response wrapper for failed operations

FetchOptions

Options for fetch requests

FetchParameters
FileObject
FileObjectV2
FileOptions
GetVectorsOptions

Options for batch reading vectors

GetVectorsResponse

Response from getting vectors

ListBucketOptions
ListIndexesOptions

Options for listing indexes within a bucket

ListIndexesResponse

Response from listing indexes

ListVectorBucketsOptions

Options for fetching vector buckets

ListVectorBucketsResponse

Response from listing vector buckets

ListVectorsOptions

Options for listing/scanning vectors in an index Supports parallel scanning via segment configuration

ListVectorsResponse

Response from listing vectors

Metadata
MetadataConfiguration

Metadata configuration for vector index Defines which metadata keys should not be indexed for filtering

PutVectorsOptions

Options for batch inserting/updating vectors

QueryVectorsOptions

Options for querying similar vectors (ANN search)

QueryVectorsResponse

Response from vector similarity query

SearchOptions
SearchV2Object
SearchV2Options
SearchV2Result
SortBy
SortByV2
StorageClientOptions
StorageVectorsClientOptions
SuccessResponse

Standard response wrapper for successful operations

TransformOptions
VectorBucket

Vector bucket metadata

VectorData

Vector data representation Vectors must be float32 arrays with dimensions matching the index

VectorFetchParameters

Fetch-specific parameters like abort signals

VectorIndex

Vector index configuration and metadata

VectorMatch

Vector object returned from queries with optional distance

VectorObject

Single vector object for insertion/update

§Type Aliases

ApiResponse

Union type for all API responses Follows the pattern: { data: T, error: null } | { data: null, error: Error }

BucketType

Type of storage bucket

  • STANDARD: Regular file storage buckets
  • ANALYTICS: Iceberg table-based buckets for analytical workloads
Camelize
DistanceMetric

Distance metrics for vector similarity search

DownloadResult
Fetch
RequestMethodType

HTTP methods supported by the API

SearchV2Folder
VectorDataType

Supported data types for vectors Currently only float32 is supported

VectorFilter

JSON filter expression for metadata filtering Format and syntax depend on the S3 Vectors service implementation

VectorMetadata

Arbitrary JSON metadata attached to vectors Keys configured as non-filterable in the index can be stored but not queried