bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
47 lines (46 loc) • 2.15 kB
TypeScript
import type { TObject } from "@sinclair/typebox";
import { type Constructor, Registry } from "../core";
export { guess as guessMimeType } from "./storage/mime-types-tiny";
export { Storage, type FileMeta, type FileListObject, type StorageConfig, type FileBody, type FileUploadPayload, } from "./storage/Storage";
import { StorageAdapter } from "./storage/StorageAdapter";
import { type CloudinaryConfig, StorageCloudinaryAdapter } from "./storage/adapters/cloudinary/StorageCloudinaryAdapter";
import { type S3AdapterConfig, StorageS3Adapter } from "./storage/adapters/s3/StorageS3Adapter";
export { StorageAdapter };
export { StorageS3Adapter, type S3AdapterConfig, StorageCloudinaryAdapter, type CloudinaryConfig };
export * as StorageEvents from "./storage/events";
export * as MediaPermissions from "./media-permissions";
export type { FileUploadedEventData } from "./storage/events";
export * from "./utils";
type ClassThatImplements<T> = Constructor<T> & {
prototype: T;
};
export declare const MediaAdapterRegistry: Registry<{
cls: ClassThatImplements<StorageAdapter>;
schema: TObject;
}, Record<string, {
cls: ClassThatImplements<StorageAdapter>;
schema: TObject;
}>, import("../core/registry/Registry").RegisterFn<{
cls: ClassThatImplements<StorageAdapter>;
schema: TObject;
}>>;
export declare const Adapters: {
readonly s3: {
readonly cls: typeof StorageS3Adapter;
readonly schema: TObject<{
access_key: import("@sinclair/typebox").TString;
secret_access_key: import("@sinclair/typebox").TString;
url: import("@sinclair/typebox").TString;
}>;
};
readonly cloudinary: {
readonly cls: typeof StorageCloudinaryAdapter;
readonly schema: TObject<{
cloud_name: import("@sinclair/typebox").TString;
api_key: import("@sinclair/typebox").TString;
api_secret: import("@sinclair/typebox").TString;
upload_preset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
};
};
export { adapterTestSuite } from "./storage/adapters/adapter-test-suite";