export declare const CURRENT_PROTOCOL_VERSION = 4; export declare const REGISTER_ACK_TIMEOUT_MS = 15000; export declare const SEND_ACK_TIMEOUT_MS = 15000; export interface RegisterEvent { event: "REGISTER"; token: string; protocolVersion: number; clientVersion?: string; hostVersion?: string; } export interface AddressedSendEvent { event: "SEND_MESSAGE"; messageId: string; to: string; content: string; contentType: string; metadata?: Record; } export interface RegisterAckEvent { event: "REGISTER_ACK"; status: "ok" | "error"; reason?: string; protocolVersion: number; } export interface SendAckEvent { event: "SEND_ACK"; messageId: string; status: "delivered" | "stored"; messageRef?: string; addressedTarget?: { address: string; basis: "resolved" | "forwarded"; }; } export type ObservedSendAckEvent = Omit & { status: string; messageRef?: unknown; addressedTarget?: unknown; }; export interface AddressedMessageEvent { event: "MESSAGE_RECEIVED"; messageId?: string; from: string; content: string; contentType: string; metadata: Record; sentAt?: string; } export interface NodeRefView { kind: string; mstpAddress: string; handle?: string; displayName?: string; avatarUrl?: string; } export interface StructuredErrorEvent { event: "ERROR"; messageId?: string; to?: string; code: string; message: string; } export type PluginToConnectorEvent = RegisterEvent | AddressedSendEvent; export type ConnectorToPluginEvent = RegisterAckEvent | SendAckEvent | AddressedMessageEvent | StructuredErrorEvent; export declare function isRegisterAck(data: unknown): data is RegisterAckEvent; export declare function isSendAck(data: unknown): data is ObservedSendAckEvent; export declare function isAddressedMessage(data: unknown): data is AddressedMessageEvent; export declare function isStructuredError(data: unknown): data is StructuredErrorEvent; //# sourceMappingURL=types.d.ts.map