import type { SubscriptionData, AuthProvider } from './helpers/updateUserSubscription.js';
import type Stripe from 'stripe';
/**
 * Platform-agnostic auth provider interface for webhook handlers
 */
export interface WebhookAuthProvider {
    getUser(userId: string): Promise<{
        customClaims?: Record<string, unknown>;
    }>;
    setCustomUserClaims(userId: string, claims: Record<string, unknown>): Promise<void>;
}
/**
 * Subscription update function type
 */
export type UpdateSubscriptionFn = (userId: string, data: SubscriptionData, authProvider: AuthProvider) => Promise<void>;
/**
 * Process webhook with automatic idempotency detection
 *
 * @param rawBody - Raw request body
 * @param signature - Stripe signature
 * @param webhookSecret - Stripe webhook secret
 * @param stripe - Stripe instance
 * @param billingConfig - Billing configuration
 * @param updateSubscription - Function to update user subscription
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function processWebhook(rawBody: string | Buffer, signature: string, webhookSecret: string, stripe: Stripe, billingConfig: unknown, updateSubscription: UpdateSubscriptionFn, authProvider: WebhookAuthProvider | null): Promise<{
    success: boolean;
    message: string;
}>;
/**
 * Calculate subscription end date with proper edge case handling
 * Fixes issues like Jan 31 + 1 month = March 3 (should be Feb 28/29)
 */
