Skip to content

web


web / lib/supabase / supabase

Variable: supabase ​

const supabase: SupabaseClient<Database, "public", "public", { CompositeTypes: { }; Enums: { }; Functions: { }; Tables: { addresses: { Insert: { address_line?: string | null; city?: string | null; country?: string | null; id?: number; latitude?: number | null; longitude?: number | null; postal_code?: string | null; state?: string | null; }; Relationships: []; Row: { address_line: string | null; city: string | null; country: string | null; id: number; latitude: number | null; longitude: number | null; postal_code: string | null; state: string | null; }; Update: { address_line?: string | null; city?: string | null; country?: string | null; id?: number; latitude?: number | null; longitude?: number | null; postal_code?: string | null; state?: string | null; }; }; brokers: { Insert: { company_address?: string | null; company_name?: string | null; first_name?: string | null; id?: number; last_name?: string | null; phone_number?: string | null; user_id?: number | null; }; Relationships: [{ columns: ["user_id"]; foreignKeyName: "brokers_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { company_address: string | null; company_name: string | null; first_name: string | null; id: number; last_name: string | null; phone_number: string | null; user_id: number | null; }; Update: { company_address?: string | null; company_name?: string | null; first_name?: string | null; id?: number; last_name?: string | null; phone_number?: string | null; user_id?: number | null; }; }; businesses: { Insert: { address_id?: number | null; business_hours?: string | null; confidential_sale?: boolean | null; customer_type?: string | null; description?: string | null; ebitda?: number | null; gross_margin?: number | null; gross_per_year?: number | null; id?: number; lease_status?: string | null; lease_term_remaining?: string | null; market?: string | null; monthly_recurring_revenue?: number | null; name?: string | null; number_of_employees?: number | null; ownership_type?: string | null; physical_location?: string | null; profit_per_year?: number | null; reason_for_sale?: string | null; revenue_per_year?: number | null; type_of_sale?: string | null; website?: string | null; will_stay_post_sale?: boolean | null; years_in_business?: number | null; }; Relationships: [{ columns: ["address_id"]; foreignKeyName: "businesses_address_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "addresses"; }, { columns: ["address_id"]; foreignKeyName: "businesses_address_id_fkey"; isOneToOne: false; referencedColumns: ["address_id"]; referencedRelation: "listings_with_address"; }]; Row: { address_id: number | null; business_hours: string | null; confidential_sale: boolean | null; customer_type: string | null; description: string | null; ebitda: number | null; gross_margin: number | null; gross_per_year: number | null; id: number; lease_status: string | null; lease_term_remaining: string | null; market: string | null; monthly_recurring_revenue: number | null; name: string | null; number_of_employees: number | null; ownership_type: string | null; physical_location: string | null; profit_per_year: number | null; reason_for_sale: string | null; revenue_per_year: number | null; type_of_sale: string | null; website: string | null; will_stay_post_sale: boolean | null; years_in_business: number | null; }; Update: { address_id?: number | null; business_hours?: string | null; confidential_sale?: boolean | null; customer_type?: string | null; description?: string | null; ebitda?: number | null; gross_margin?: number | null; gross_per_year?: number | null; id?: number; lease_status?: string | null; lease_term_remaining?: string | null; market?: string | null; monthly_recurring_revenue?: number | null; name?: string | null; number_of_employees?: number | null; ownership_type?: string | null; physical_location?: string | null; profit_per_year?: number | null; reason_for_sale?: string | null; revenue_per_year?: number | null; type_of_sale?: string | null; website?: string | null; will_stay_post_sale?: boolean | null; years_in_business?: number | null; }; }; documents: { Insert: { business_id?: number | null; document_name?: string | null; document_type?: string | null; file_path?: string | null; id?: number; uploaded_at?: string | null; }; Relationships: [{ columns: ["business_id"]; foreignKeyName: "documents_business_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "businesses"; }, { columns: ["business_id"]; foreignKeyName: "documents_business_id_fkey"; isOneToOne: false; referencedColumns: ["business_id"]; referencedRelation: "listings_with_address"; }]; Row: { business_id: number | null; document_name: string | null; document_type: string | null; file_path: string | null; id: number; uploaded_at: string | null; }; Update: { business_id?: number | null; document_name?: string | null; document_type?: string | null; file_path?: string | null; id?: number; uploaded_at?: string | null; }; }; favorites: { Insert: { id?: number; listing_id?: number | null; user_id?: number | null; }; Relationships: [{ columns: ["listing_id"]; foreignKeyName: "favorites_listing_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "listings"; }, { columns: ["listing_id"]; foreignKeyName: "favorites_listing_id_fkey"; isOneToOne: false; referencedColumns: ["listing_id"]; referencedRelation: "listings_with_address"; }, { columns: ["user_id"]; foreignKeyName: "favorites_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { id: number; listing_id: number | null; user_id: number | null; }; Update: { id?: number; listing_id?: number | null; user_id?: number | null; }; }; listing_images: { Insert: { id?: number; image_path?: string | null; listing_id?: number | null; }; Relationships: [{ columns: ["listing_id"]; foreignKeyName: "listing_images_listing_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "listings"; }, { columns: ["listing_id"]; foreignKeyName: "listing_images_listing_id_fkey"; isOneToOne: false; referencedColumns: ["listing_id"]; referencedRelation: "listings_with_address"; }]; Row: { id: number; image_path: string | null; listing_id: number | null; }; Update: { id?: number; image_path?: string | null; listing_id?: number | null; }; }; listings: { Insert: { asking_price?: number | null; business_id?: number | null; contact_company?: string | null; contact_email?: string | null; contact_method?: string | null; contact_name?: string | null; contact_phone?: string | null; contact_role?: string | null; date_established?: string | null; id?: number; is_public?: boolean | null; listed_at?: string | null; preferred_contact?: string | null; status?: string | null; user_id?: number | null; valuation_multiple?: number | null; views?: number | null; }; Relationships: [{ columns: ["business_id"]; foreignKeyName: "listings_business_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "businesses"; }, { columns: ["business_id"]; foreignKeyName: "listings_business_id_fkey"; isOneToOne: false; referencedColumns: ["business_id"]; referencedRelation: "listings_with_address"; }, { columns: ["user_id"]; foreignKeyName: "listings_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { asking_price: number | null; business_id: number | null; contact_company: string | null; contact_email: string | null; contact_method: string | null; contact_name: string | null; contact_phone: string | null; contact_role: string | null; date_established: string | null; id: number; is_public: boolean | null; listed_at: string | null; preferred_contact: string | null; status: string | null; user_id: number | null; valuation_multiple: number | null; views: number | null; }; Update: { asking_price?: number | null; business_id?: number | null; contact_company?: string | null; contact_email?: string | null; contact_method?: string | null; contact_name?: string | null; contact_phone?: string | null; contact_role?: string | null; date_established?: string | null; id?: number; is_public?: boolean | null; listed_at?: string | null; preferred_contact?: string | null; status?: string | null; user_id?: number | null; valuation_multiple?: number | null; views?: number | null; }; }; product_purchases: { Insert: { amount_paid?: number | null; currency?: string | null; id?: number; payment_status?: string | null; product_id?: number | null; purchased_at?: string | null; stripe_session_id?: string | null; user_id?: number | null; }; Relationships: [{ columns: ["product_id"]; foreignKeyName: "product_purchases_product_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "products"; }, { columns: ["user_id"]; foreignKeyName: "product_purchases_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { amount_paid: number | null; currency: string | null; id: number; payment_status: string | null; product_id: number | null; purchased_at: string | null; stripe_session_id: string | null; user_id: number | null; }; Update: { amount_paid?: number | null; currency?: string | null; id?: number; payment_status?: string | null; product_id?: number | null; purchased_at?: string | null; stripe_session_id?: string | null; user_id?: number | null; }; }; products: { Insert: { category: string; created_at?: string | null; description?: string | null; file_path?: string | null; id?: number; locked?: boolean | null; name: string; popular?: boolean | null; preview_available?: boolean | null; price: number; tags?: string | null; updated_at?: string | null; }; Relationships: []; Row: { category: string; created_at: string | null; description: string | null; file_path: string | null; id: number; locked: boolean | null; name: string; popular: boolean | null; preview_available: boolean | null; price: number; tags: string | null; updated_at: string | null; }; Update: { category?: string; created_at?: string | null; description?: string | null; file_path?: string | null; id?: number; locked?: boolean | null; name?: string; popular?: boolean | null; preview_available?: boolean | null; price?: number; tags?: string | null; updated_at?: string | null; }; }; subscriptions: { Insert: { current_period_end?: string | null; id?: number; plan_id?: string | null; stripe_customer_id?: string | null; stripe_subscription_id?: string | null; subscription_status?: string | null; }; Relationships: []; Row: { current_period_end: string | null; id: number; plan_id: string | null; stripe_customer_id: string | null; stripe_subscription_id: string | null; subscription_status: string | null; }; Update: { current_period_end?: string | null; id?: number; plan_id?: string | null; stripe_customer_id?: string | null; stripe_subscription_id?: string | null; subscription_status?: string | null; }; }; transactions: { Insert: { buyer_user_id?: number | null; id?: number; listing_id?: number | null; price?: number | null; seller_user_id?: number | null; sold_at?: string | null; }; Relationships: [{ columns: ["buyer_user_id"]; foreignKeyName: "transactions_buyer_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }, { columns: ["listing_id"]; foreignKeyName: "transactions_listing_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "listings"; }, { columns: ["listing_id"]; foreignKeyName: "transactions_listing_id_fkey"; isOneToOne: false; referencedColumns: ["listing_id"]; referencedRelation: "listings_with_address"; }, { columns: ["seller_user_id"]; foreignKeyName: "transactions_seller_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { buyer_user_id: number | null; id: number; listing_id: number | null; price: number | null; seller_user_id: number | null; sold_at: string | null; }; Update: { buyer_user_id?: number | null; id?: number; listing_id?: number | null; price?: number | null; seller_user_id?: number | null; sold_at?: string | null; }; }; users: { Insert: { auth_user_id?: string | null; created_at?: string | null; email?: string | null; first_name?: string | null; id?: number; last_name?: string | null; profile_image_path?: string | null; role?: string | null; subscription_id?: number | null; }; Relationships: [{ columns: ["subscription_id"]; foreignKeyName: "users_subscription_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "subscriptions"; }]; Row: { auth_user_id: string | null; created_at: string | null; email: string | null; first_name: string | null; id: number; last_name: string | null; profile_image_path: string | null; role: string | null; subscription_id: number | null; }; Update: { auth_user_id?: string | null; created_at?: string | null; email?: string | null; first_name?: string | null; id?: number; last_name?: string | null; profile_image_path?: string | null; role?: string | null; subscription_id?: number | null; }; }; }; Views: { listings_with_address: { Relationships: [{ columns: ["listing_business_id"]; foreignKeyName: "listings_business_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "businesses"; }, { columns: ["listing_business_id"]; foreignKeyName: "listings_business_id_fkey"; isOneToOne: false; referencedColumns: ["business_id"]; referencedRelation: "listings_with_address"; }, { columns: ["user_id"]; foreignKeyName: "listings_user_id_fkey"; isOneToOne: false; referencedColumns: ["id"]; referencedRelation: "users"; }]; Row: { address_id: number | null; address_line: string | null; asking_price: number | null; business_hours: string | null; business_id: number | null; business_name: string | null; city: string | null; confidential_sale: boolean | null; contact_company: string | null; contact_email: string | null; contact_method: string | null; contact_name: string | null; contact_phone: string | null; contact_role: string | null; country: string | null; customer_type: string | null; date_established: string | null; description: string | null; ebitda: number | null; gross_margin: number | null; gross_per_year: number | null; is_public: boolean | null; latitude: number | null; lease_status: string | null; lease_term_remaining: string | null; listed_at: string | null; listing_business_id: number | null; listing_id: number | null; longitude: number | null; market: string | null; monthly_recurring_revenue: number | null; number_of_employees: number | null; ownership_type: string | null; physical_location: string | null; postal_code: string | null; preferred_contact: string | null; profit_per_year: number | null; reason_for_sale: string | null; revenue_per_year: number | null; state: string | null; status: string | null; type_of_sale: string | null; user_id: number | null; valuation_multiple: number | null; views: number | null; website: string | null; will_stay_post_sale: boolean | null; years_in_business: number | null; }; }; }; }, { PostgrestVersion: "13.0.5"; }>

Defined in: lib/supabase.ts:8