import { ReactNode } from 'react'; import { SubscriptionWithPlan } from '../lib/billing/types'; interface LimitInfo { max: number; resetPeriod: string; } /** * CustomerProfile combines team metadata (who they are) with subscription data (what they have) * This enables feature flagging, segmentation, and personalized experiences */ export interface CustomerProfile { teamMetadata: Record; plan: SubscriptionWithPlan['plan'] | null; planSlug: string | null; status: SubscriptionWithPlan['status'] | null; isTrialing: boolean; isActive: boolean; features: string[]; limits: Record; } export interface SubscriptionContextValue { subscription: SubscriptionWithPlan | null; plan: SubscriptionWithPlan['plan'] | null; planSlug: string | null; status: SubscriptionWithPlan['status'] | null; isTrialing: boolean; isActive: boolean; isPastDue: boolean; isCanceled: boolean; isLoading: boolean; /** True once subscription data has been fetched at least once (success or error) */ isReady: boolean; error: Error | null; refetch: () => void; features: string[]; limits: Record; customerProfile: CustomerProfile; } export declare function SubscriptionProvider({ children }: { children: ReactNode; }): import("react/jsx-runtime").JSX.Element; export declare function useSubscriptionContext(): SubscriptionContextValue; export {}; //# sourceMappingURL=SubscriptionContext.d.ts.map