export type WebhookEventType = 'subscription_cancelled' | 'subscription_updated' | 'license_key_created' | 'order_created' | 'subscription_created' | 'subscription_paused' | 'subscription_unpaused' | 'subscription_expired' | 'subscription_payment_success' | 'subscription_payment_failed' | 'subscription_payment_recovered';
export interface LemonSqueezyWebhookAttributes {
    readonly status?: string;
    readonly cancelled?: boolean;
    readonly variant_id?: number;
    readonly variant_name?: string;
    readonly product_name?: string;
    readonly customer_id?: number;
    readonly user_name?: string;
    readonly user_email?: string;
    readonly ends_at?: string | null;
    readonly renews_at?: string | null;
    readonly trial_ends_at?: string | null;
    readonly created_at?: string;
    readonly updated_at?: string;
}
export interface LemonSqueezyWebhookData {
    readonly id: string;
    readonly type: string;
    readonly attributes: LemonSqueezyWebhookAttributes;
}
export interface LemonSqueezyWebhookPayload {
    readonly meta: {
        readonly event_name: string;
        readonly custom_data?: Record<string, unknown>;
        readonly webhook_id?: string;
    };
    readonly data: LemonSqueezyWebhookData;
}
export interface WebhookEventRecord {
    readonly id: string;
    readonly eventType: WebhookEventType;
    readonly receivedAt: string;
    readonly processed: boolean;
    readonly error?: string;
    readonly summary: string;
}
export interface WebhookServerState {
    readonly running: boolean;
    readonly port: number;
    readonly startedAt: string | null;
    readonly eventsProcessed: number;
    readonly recentEvents: WebhookEventRecord[];
}
export interface WebhookProcessResult {
    readonly success: boolean;
    readonly eventType: string;
    readonly message: string;
    readonly statusCode: number;
}
export type EventHandler = (payload: LemonSqueezyWebhookPayload) => WebhookProcessResult;
export interface StartWebhookInput {
    readonly port?: number;
    readonly secret?: string;
}
export interface StopWebhookInput {
    readonly force?: boolean;
}
export interface WebhookStatusInput {
    readonly includeEvents?: boolean;
}
//# sourceMappingURL=webhook.d.ts.map