UNPKG

@api-buddy/supabase

Version:

Supabase client and utilities for API Buddy

42 lines (38 loc) 1.1 kB
import { SupabaseClient } from '@supabase/supabase-js'; export * from '@supabase/supabase-js'; /** * @package @api-buddy/supabase * Supabase client and utilities for API Buddy */ interface SupabaseConfig { url: string; anonKey: string; options?: { auth?: { autoRefreshToken?: boolean; persistSession?: boolean; detectSessionInUrl?: boolean; }; }; } /** * Extended Supabase client with API Buddy specific functionality */ declare class SupabaseService { private client; private logger; constructor(config: SupabaseConfig, logger?: any); /** * Get the underlying Supabase client */ getClient(): SupabaseClient; /** * Execute a query with error handling */ query<T = any>(table: string, query: string, params?: Record<string, unknown>): Promise<T | null>; } /** * Create a new Supabase service instance */ declare function createSupabaseService(config: SupabaseConfig, logger?: any): SupabaseService; export { type SupabaseConfig, SupabaseService, createSupabaseService };