import type { SupabaseClient } from '@supabase/supabase-js'; import type { Note, CreateNoteInput, UpdateNoteInput } from './types'; export type ApiConfig = { apiBase: string; supabaseClient?: SupabaseClient; supabaseAnonKey?: string; }; /** * Configure the notes API client * * @example * ```ts * import { createClient } from '@supabase/supabase-js'; * import { configureNotesApi } from '@micahgoodman/notes'; * * const supabase = createClient(url, key); * configureNotesApi({ * apiBase: process.env.VITE_API_BASE, * supabaseClient: supabase, * supabaseAnonKey: process.env.VITE_SUPABASE_ANON_KEY * }); * ``` */ export declare function configureNotesApi(newConfig: Partial): void; /** * Fetch all notes */ export declare function fetchNotes(): Promise; /** * Fetch notes by context (e.g., notes associated with a specific entity) */ export declare function fetchNotesByContext(contextType: string, contextId: string): Promise; /** * Create a new note */ export declare function createNote(input: CreateNoteInput): Promise<{ id: string; }>; /** * Update an existing note */ export declare function updateNote(id: string, input: UpdateNoteInput): Promise<{ ok: boolean; }>; /** * Delete a note */ export declare function deleteNote(id: string): Promise<{ ok: boolean; }>; /** * Fetch by identity key (for associations) */ export declare function fetchByIdentity(identityKey: string): Promise; /** * Associate a note with another entity */ export declare function associateNote(body: { parentType: string; parentId: string; childId: string; }): Promise<{ ok: boolean; }>; /** * Disassociate a note from another entity */ export declare function disassociateNote(body: { parentType: string; parentId: string; childId: string; }): Promise<{ ok: boolean; }>; /** * Fetch parents that reference this note */ export declare function fetchParentsOfNote(noteId: string): Promise>; //# sourceMappingURL=api.d.ts.map