import { OneBotConnection } from './connection.js'; import type { DirectBatch, DirectConfig, DirectMessage } from '../direct/transport.js'; import { type PartnerInboundAttachment, type PartnerOutboundAttachment } from '../../channel-message.js'; /** Only public QQ media hosts; never forward the OneBot token to media URLs. */ export declare function qqMediaUrl(source: string): URL; export declare class OneBotTransport { readonly config: DirectConfig; private readonly expected?; private validatedRecipient; readonly connection: OneBotConnection; constructor(config: DirectConfig, token: string, expected?: { accountId: string; peerId: string; } | undefined, connection?: OneBotConnection); validate(signal?: AbortSignal): Promise<{ accountId: string; peerId: string; }>; poll(signal: AbortSignal, waitMs: number): Promise; sendText(userId: string, text: string, signal?: AbortSignal, authorize?: () => void): Promise; /** Scoped to one target-bound reply transport; local authorization still runs per send. */ withRecipientValidation(userId: string, signal: AbortSignal, send: () => Promise): Promise; private recipient; sendAttachment(userId: string, file: PartnerOutboundAttachment, signal: AbortSignal, allowed: () => boolean): Promise; private sendAction; private destination; private mention; sendCustomFace(userId: string, emojiId: string, signal: AbortSignal, authorize: () => void): Promise; sendFace(userId: string, faceId: string, signal: AbortSignal, authorize: () => void): Promise; receiveAttachments(message: DirectMessage, signal: AbortSignal, allowed: () => boolean, maxBytes?: number): Promise; private refreshMedia; } //# sourceMappingURL=transport.d.ts.map