import { type BlipDomain, type Command, type CommandMethods, type Identity, type Message, type MessageTypes, type NodeLike, type Notification, type UnknownCommandResponse } from '../types/index.ts'; import type { Closable } from './closable.ts'; import { EnvelopeResolver, type EventMap, type Listener } from './enveloperesolver.ts'; import type { Authentication } from './security.ts'; import type { SessionNegotiator } from './sessionnegotiator.ts'; export interface Sender { sendMessage(message: Message): Promise; sendCommand(command: Command): Promise; } export type ConnectionSenderConstructor = new (options: { node: NodeLike; authentication: Authentication; tenantId?: string; }) => TSender; export declare class ConnectionSender { private readonly _domain; constructor(options: ConstructorParameters[0]); get domain(): BlipDomain; protected static login(bot: string | Identity, accessKey: string, tenantId?: string): S; protected static login(token: string, tenantId?: string): S; static createToken(node: NodeLike, secret: string): string; static parseToken(token: string): { identity: import("../index.ts").NodeShape; secret: string; }; } export declare abstract class OpenConnectionSender extends ConnectionSender implements Sender, Closable { protected readonly envelopeResolver: EnvelopeResolver; protected sessionNegotiator: SessionNegotiator | null; abstract sendMessage(message: Message): Promise; abstract sendCommand(command: Command): Promise; abstract sendNotification(notification: Notification): Promise; abstract sendCommandResponse(response: UnknownCommandResponse): Promise; on(ev: K, listener: Listener['callback'], predicate?: Listener['predicate']): this; off(ev: K, listener: Listener['callback']): this; get session(): import("./sessionnegotiator.ts").ConnectionSession | null; close(): Promise; } //# sourceMappingURL=sender.d.ts.map