/** * @module minions-sdk/index-layer/supabase * Supabase (Postgres) index adapter for the Minions structured object system. * * Reuses the existing `@supabase/supabase-js` peer dependency. * * Stores index entries in a dedicated `minion_index` table (separate from the * data storage table used by `SupabaseStorageAdapter`). This allows the index * layer to be used independently of the data layer. * * @example * ```typescript * import { createClient } from '@supabase/supabase-js'; * import { SupabaseIndexAdapter } from 'minions-sdk'; * * const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); * const index = new SupabaseIndexAdapter(supabase); * const minions = new Minions({ storage, index }); * ``` */ import type { StorageFilter } from '../storage/StorageAdapter.js'; import type { SupabaseClientLike } from '../storage/SupabaseStorageAdapter.js'; import type { IndexAdapter, IndexEntry } from './IndexAdapter.js'; /** Options for the Supabase index adapter. */ export interface SupabaseIndexOptions { /** * Name of the Postgres table for the index. * Defaults to `"minion_index"`. */ table?: string; } /** * Index adapter backed by **Supabase** (Postgres). * * Use {@link SupabaseIndexAdapter.createTableSQL} to get the DDL for * creating the index table. * * This table is separate from the `minions` data table used by * `SupabaseStorageAdapter`, so you can mix and match: * - Supabase storage + Supabase index * - File storage + Supabase index * - Convex storage + Supabase index */ export declare class SupabaseIndexAdapter implements IndexAdapter { private client; private table; constructor(client: SupabaseClientLike, options?: SupabaseIndexOptions); /** * Returns the SQL DDL for creating the index table. * Run this in your Supabase SQL editor or in a migration. */ static createTableSQL(table?: string): string; private toRow; private fromRow; private throwIfError; upsert(entry: IndexEntry): Promise; remove(id: string): Promise; list(filter?: StorageFilter): Promise; search(query: string): Promise; count(filter?: StorageFilter): Promise; clear(): Promise; } //# sourceMappingURL=SupabaseIndexAdapter.d.ts.map