Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/storagee/src/lib/index.ts>StorageBucketApi

JS Client library to interact with Supabase Storage
Latest
class StorageBucketApi
import { StorageBucketApi } from "https://deno.land/x/storagee@1.3.0/src/lib/index.ts";

Constructors

new
StorageBucketApi(url: string, headers?: { [key: string]: string; })

Properties

protected
headers: { [key: string]: string; }
protected
url: string

Methods

createBucket(id: string, options?: { public: boolean; }): Promise<{ data: string | null; error: Error | null; }>

Creates a new Storage bucket

deleteBucket(id: string): Promise<{ data: { message: string; } | null; error: Error | null; }>

Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first empty() the bucket.

emptyBucket(id: string): Promise<{ data: { message: string; } | null; error: Error | null; }>

Removes all objects inside a single bucket.

getBucket(id: string): Promise<{ data: Bucket | null; error: Error | null; }>

Retrieves the details of an existing Storage bucket.

listBuckets(): Promise<{ data: Bucket[] | null; error: Error | null; }>

Retrieves the details of all Storage buckets within an existing product.

updateBucket(id: string, options: { public: boolean; }): Promise<{ data: { message: string; } | null; error: Error | null; }>

Updates a new Storage bucket