import type { Dispatcher } from "undici"; import type { PushType } from "../notifications/notification.js"; export declare const Connector: { readonly Certificate: 1; readonly Token: 2; }; export type Connector = (typeof Connector)[keyof typeof Connector]; export interface APNsHeaders { "apns-id"?: string; "apns-expiration": string; "apns-priority": string; "apns-push-type": PushType; /** * Only broadcast notifications */ "apns-channel-id"?: string; "apns-request-id"?: string; /** * Only classic notifications, * not broaadcast ones. */ "apns-topic"?: string; "apns-collapse-id"?: string; } export type ConnectorSendPayload> = { baseUrl: string; requestPath: string; headers: Headers; } & ({ method: "POST"; body: Record; } | { method: "DELETE"; body?: Record | undefined; } | { method: "GET"; }); export interface DeliveryResult { apnsId: string; apnsUniqueId?: string | undefined; } export interface ConnectorProtocol { readonly connectionType: Connector; send>(payload: ConnectorSendPayload, debug?: boolean): Promise>; }