/**
 * Supabase Client Stub
 *
 * The project has migrated fully to Convex. This module previously exported a
 * Supabase admin client used for dual-write sync in cron jobs and other routes.
 *
 * The exported `supabaseAdmin` is `null`, which is the same value the original
 * module returned when Supabase env vars were not configured. All consuming
 * code already guards with `if (supabaseAdmin)` checks, so this is safe.
 */

/** Minimal type matching the Supabase client shape used across the codebase. */
interface SupabaseInsertResult {
  error: { message: string; code: string } | null;
}

interface SupabaseQueryBuilder {
  insert(data: Record<string, unknown> | Record<string, unknown>[]): Promise<SupabaseInsertResult>;
}

interface SupabaseAdminClient {
  from(table: string): SupabaseQueryBuilder;
}

/**
 * Supabase admin client.
 * Set to null -- Supabase is no longer used. Consuming code already null-checks
 * this value before calling `.from().insert()`.
 */
export const supabaseAdmin: SupabaseAdminClient | null = null;

/**
 * Re-export as `supabase` for test files that import that name.
 */
export const supabase: SupabaseAdminClient | null = null;
