declare module 'web-push' {
	export interface PushSubscription {
		endpoint: string;
		keys: {
			p256dh: string;
			auth: string;
		};
	}

	export interface SendOptions {
		TTL?: number;
		headers?: Record<string, string>;
		vapidDetails?: {
			subject: string;
			publicKey: string;
			privateKey: string;
		};
	}

	export function setVapidDetails(subject: string, publicKey: string, privateKey: string): void;

	export function sendNotification(
		subscription: PushSubscription,
		payload: string | Buffer,
		options?: SendOptions
	): Promise<void>;

	export function generateVAPIDKeys(): {
		publicKey: string;
		privateKey: string;
	};

	interface WebPush {
		setVapidDetails: typeof setVapidDetails;
		sendNotification: typeof sendNotification;
		generateVAPIDKeys: typeof generateVAPIDKeys;
	}

	const webpush: WebPush;
	export default webpush;
}
