import type { CodecOpts, PacketId } from "./types.ts"; import type { ProtocolLevelNoV5 } from "./protocolLevels.ts"; import { ReasonCode } from "./ReasonCode.ts"; import type { PubackProperties } from "./Properties.ts"; import { PacketType } from "./PacketType.ts"; export type AckPacketV4 = { type: T; protocolLevel: ProtocolLevelNoV5; id: PacketId; }; export type AckPacketV5 = { type: T; protocolLevel: 5; id: PacketId; reasonCode?: ReasonCode; properties?: PubackProperties; }; /** * all 4 ack packets are identical except for packet type and flags of Pubrel */ export type AckPacket = AckPacketV4 | AckPacketV5; /** * PubackPacket is sent to indicate publish complete (QoS 1) */ export type PubackPacket = AckPacket; /** * Pubrec is sent to indicate publish received (QoS 2) */ export type PubrecPacket = AckPacket; /** * Pubrel is sent to indicate publish release (QoS 2) */ export type PubrelPacket = AckPacket; /** * Pubcomp is sent to indicate publish complete (QoS 2) */ export type PubcompPacket = AckPacket; export type AnyAckPacket = PubackPacket | PubrecPacket | PubrelPacket | PubcompPacket; export declare function encode(packet: AnyAckPacket, codecOpts: CodecOpts): Uint8Array; export declare function decode(buffer: Uint8Array, flags: number, codecOpts: CodecOpts, packetType: PacketType): AnyAckPacket; //# sourceMappingURL=pubblishAcks.d.ts.map