import type { CodecOpts, PacketId, ReturnCodes } from "./types.ts"; import type { ReasonCode } from "./ReasonCode.ts"; import type { ProtocolLevelNoV5 } from "./protocolLevels.ts"; import type { SubackProperties } from "./Properties.ts"; import { PacketType } from "./PacketType.ts"; export type SubackPacketV4 = { type: PacketType; protocolLevel: ProtocolLevelNoV5; id: PacketId; returnCodes: ReturnCodes; }; export type SubackPacketV5 = { type: PacketType; protocolLevel: 5; id: PacketId; properties: SubackProperties; reasonCodes: Array; }; /** * SubackPacket is sent by the server to the client to confirm receipt and * processing of a SubscribePacket. */ export type SubackPacket = SubackPacketV4 | SubackPacketV5; export declare function encode(packet: SubackPacket, codecOpts: CodecOpts): Uint8Array; export declare function decode(buffer: Uint8Array, _flags: number, codecOpts: CodecOpts, packetType: PacketType): SubackPacket; //# sourceMappingURL=suback.d.ts.map