import { Client, Storage } from "node-appwrite"; import type { Adapter } from "../index.js"; import { FilesError } from "../internal/errors.js"; export interface AppwriteAdapterOptions { /** * Appwrite storage bucket ID. */ bucket: string; /** * Existing client instance or Storage instance. * Highest precedence. */ client?: Client | Storage; /** * Appwrite API endpoint (e.g. `https://cloud.appwrite.io/v1`). * Falls back to `APPWRITE_ENDPOINT` then `NEXT_PUBLIC_APPWRITE_ENDPOINT`. */ endpoint?: string; /** * Appwrite Project ID. * Falls back to `APPWRITE_PROJECT_ID` then `NEXT_PUBLIC_APPWRITE_PROJECT_ID`. */ projectId?: string; /** * Appwrite API Key. * Falls back to `APPWRITE_API_KEY` then `APPWRITE_KEY`. */ key?: string; /** * Set to `true` if the bucket is configured as a public bucket. * `url()` will then return a constructed permanent, unsigned URL. * Otherwise, `url()` throws an error. */ public?: boolean; } export type AppwriteAdapter = Adapter & { readonly bucket: string; }; export declare const mapAppwriteError: (err: unknown) => FilesError; export declare const appwrite: (opts: AppwriteAdapterOptions) => AppwriteAdapter; //# sourceMappingURL=index.d.ts.map