import { BaseConnector } from '../../base/base.connector'; import type { IPushOptions, IPushProvider, ISendMessageSuccessResponse, WithPassthrough, PushSendResult, IPushConnector } from '../../types'; import { ChannelTypeEnum } from '../../types'; import type { WonderPushConfig } from './wonderpush.config'; import type { WonderPushNarrowedInput } from './wonderpush.types'; export declare class WonderPushPushConnector extends BaseConnector implements IPushProvider, IPushConnector { private config; readonly id: "wonderpush"; readonly channelType: ChannelTypeEnum.PUSH; constructor(config: WonderPushConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `IPushConnector`. * * Wire shape (per WonderPush Management API `/v1/deliveries`): * - `Authorization: Bearer ` header (no query-param auth). * - `Content-Type: application/json` body. * - Body fields: `applicationId?`, `targetUserIds`, `targetSegmentIds?`, * `customSegmentation?`, plus a structured `notification` object. * * Recipient routing (per-connector augmentation): * - Default: `targetUserIds = [input.to]`. * - `input.targetUserIds` (augmentation) overrides the default. * - `input.targetSegmentIds` flows through verbatim and may coexist. * * Error handling: vendor errors map to canonical `ConnectorError` via * `mapVendorError`. Retry-After is informational only * — parsed seconds in `providerMessage` text, raw header value * on `cause.retryAfter`. No structured `retryAfterSeconds` field. */ send(input: WonderPushNarrowedInput): Promise; /** * Build the canonical WonderPush deliveries body. Strips `undefined` values * so the wire payload stays compact. */ private buildRequestBody; /** * HTTP-layer mapping. Parses `Retry-After` and embeds * the parsed seconds in `providerMessage` text; raw header value attached * to `cause.retryAfter`. No structured `retryAfterSeconds` field per * Retry is consumer policy (no retryAfterSeconds field) — the wrapper performs no retry. * * WonderPush vendor error shape: `{ error: { code, message, status } }`. */ private mapVendorError; sendMessage(options: IPushOptions, bridgeProviderData?: WithPassthrough>): Promise; }