export declare const NEW_ACCOUNT_FORECASTS = 30;
export declare const SURVEY_BONUS_FORECASTS = 30;
export declare const DAILY_FORECAST_GRANT = 10;
export interface RmUser {
    id: string;
    email: string;
    password_hash: string;
    google_sub: string | null;
    is_weatherman: boolean;
    monthly_pass_start: string | null;
    monthly_pass_expires: string | null;
    monthly_pass_renewal_reminder_sent_at: string | null;
    single_picks: number;
    signup_bonus_forecasts: number;
    survey_bonus_forecasts: number;
    daily_pass_picks: number;
    daily_pass_date: string | null;
    stripe_customer_id: string | null;
    email_verified: boolean;
    email_verified_at: string | null;
    verification_token: string | null;
    verification_expires: string | null;
    verification_email_last_sent_at: string | null;
    password_reset_token: string | null;
    password_reset_expires: string | null;
    daily_free_forecasts: number;
    last_reset_date_pacific: string | null;
    marketing_consent: boolean;
    country_code: string | null;
    country_source: string | null;
    last_free_pick_date: string | null;
    last_free_pick_event_id: string | null;
    affiliate_code: string | null;
    affiliate_tracking_id: string | null;
    affiliate_signup_tracked_at: string | null;
    affiliate_purchase_tracked_at: string | null;
    preferences: Record<string, any> | null;
    signup_ip: string | null;
    last_login_ip: string | null;
    grace_started_at: string | null;
    grace_expires_at: string | null;
    email_changed_at: string | null;
    previous_email_hash: string | null;
    tourist_pass_expires_at: string | null;
    tourist_pass_timezone: string | null;
    tourist_pass_timezone_source: string | null;
    auth_token_version: number;
    created_at: string;
    updated_at: string;
}
export interface RmUserProfile {
    id: string;
    user_id: string;
    favorite_sports_ranked: string[] | null;
    interest_buckets: string[] | null;
    market_participant: string | null;
    profile_version: number;
    created_at: string;
    updated_at: string;
}
export declare function recordLoginIp(userId: string, ip: string, isSignup?: boolean): Promise<void>;
export declare function findUserByEmail(email: string): Promise<RmUser | null>;
export declare function findUserByGoogleSub(googleSub: string): Promise<RmUser | null>;
export declare function findUserById(id: string): Promise<RmUser | null>;
export declare function createUser(email: string, passwordHash: string, marketingConsent?: boolean, countryCode?: string | null, countrySource?: string): Promise<RmUser>;
export declare function updateUserStripeCustomer(userId: string, stripeCustomerId: string): Promise<void>;
export declare function creditSinglePicks(userId: string, count: number): Promise<void>;
/**
 * Compute the next 2:00 a.m. in the given IANA timezone, returned as UTC ISO string.
 * If before 2 AM local → expires at 2 AM today (short pass).
 * If after 2 AM local  → expires at 2 AM tomorrow.
 */
export declare function computeExpiresAtUtc(ianaTimezone: string): string;
export type TzSource = 'ACCOUNT' | 'CLIENT' | 'IP' | 'DEFAULT';
export declare function creditDailyPass(userId: string, picks: number, timezone?: string, tzSource?: TzSource): Promise<{
    expiresAtUtc: string;
}>;
export declare function creditMonthlyPass(userId: string): Promise<void>;
export declare function setVerificationToken(userId: string, token: string, expires: Date): Promise<void>;
export declare function reserveVerificationEmailCooldown(userId: string, cooldownSeconds?: number): Promise<string | null>;
export declare function releaseVerificationEmailCooldown(userId: string, reservedAt: string): Promise<void>;
export declare function verifyEmail(userId: string): Promise<void>;
export declare function linkGoogleAccount(userId: string, googleSub: string): Promise<void>;
export declare function findByVerificationToken(token: string): Promise<RmUser | null>;
export declare function setPasswordResetToken(userId: string, token: string, expires: Date): Promise<void>;
export declare function findByPasswordResetToken(token: string): Promise<RmUser | null>;
export declare function resetPassword(userId: string, newPasswordHash: string): Promise<void>;
export declare function setMarketingConsent(userId: string, consent: boolean): Promise<void>;
export declare function getETDateString(): string;
export declare function ensureDailyGrant(userId: string): Promise<void>;
export interface PickBalance {
    single_picks: number;
    signup_bonus_forecasts: number;
    survey_bonus_forecasts: number;
    daily_pass_picks: number;
    daily_pass_valid: boolean;
    daily_free_forecasts: number;
    email_verified: boolean;
    next_reset_at: string;
    tourist_pass_expires_at: string | null;
    tourist_pass_timezone: string | null;
}
export declare function getPickBalance(userId: string): Promise<PickBalance>;
export type DeductSource = 'daily_free' | 'daily_pass' | 'signup_bonus' | 'survey_bonus' | 'single_pick';
export declare function deductPick(userId: string): Promise<{
    success: boolean;
    source?: DeductSource;
}>;
export declare function setRainMan(userId: string, isWeatherman: boolean): Promise<void>;
export declare function getAllRainMen(): Promise<RmUser[]>;
export declare function hasUsedFreePick(userId: string): Promise<{
    used: boolean;
    eventId: string | null;
}>;
export declare function recordFreePick(userId: string, eventId: string): Promise<void>;
export declare function updateAffiliateAttribution(userId: string, code: string, trackingId: string): Promise<void>;
export declare function markAffiliateSignupTracked(userId: string): Promise<void>;
export declare function markAffiliatePurchaseTracked(userId: string): Promise<void>;
export declare function isInGracePeriod(user: RmUser): boolean;
export declare function needsGraceVerification(user: RmUser): boolean;
export declare function updateCredentials(userId: string, newEmail: string, newPasswordHash: string, oldEmailHash?: string): Promise<number>;
export declare function getProfile(userId: string): Promise<RmUserProfile | null>;
export declare function upsertProfile(userId: string, data: {
    favoriteSports?: string[];
    interestBuckets?: string[];
    marketParticipant?: string;
}): Promise<RmUserProfile>;
//# sourceMappingURL=user.d.ts.map