import * as plugins from '../plugins.js'; import { type TWebPushDnsLookup } from './helpers.webpush-endpoint.js'; export interface IWebPushTransportRequest { subscription: plugins.webpush.PushSubscription; payload: string; ttlSeconds: number; urgency: plugins.webpush.Urgency; topic?: string; vapid: { subject: string; publicKey: string; privateKey: string; }; } export interface IWebPushTransportResponse { statusCode: number; retryAfter?: string; } export interface IWebPushTransport { send(requestArg: IWebPushTransportRequest): Promise; } export type TWebPushTransportErrorCode = 'PUSH_DNS_TIMEOUT' | 'PUSH_REQUEST_TIMEOUT' | 'PUSH_RESPONSE_TOO_LARGE' | 'PUSH_RESPONSE_INVALID' | 'PUSH_NETWORK_ERROR'; export declare class WebPushTransportError extends Error { readonly code: TWebPushTransportErrorCode; constructor(code: TWebPushTransportErrorCode, optionsArg?: { cause?: unknown; }); } export interface IWebPushHttpTransportOptions { dnsLookup?: TWebPushDnsLookup; dnsTimeoutMs?: number; connectTimeoutMs?: number; requestTimeoutMs?: number; maxResponseBytes?: number; } export declare class WebPushHttpTransport implements IWebPushTransport { private readonly dnsLookup?; private readonly dnsTimeoutMs; private readonly connectTimeoutMs; private readonly requestTimeoutMs; private readonly maxResponseBytes; constructor(optionsArg?: IWebPushHttpTransportOptions); send(requestArg: IWebPushTransportRequest): Promise; private normalizePositiveInteger; }