/** * Possible MQTT V5 reason codes */ import { PacketType } from "./PacketType.ts"; import type { InvertRecord } from "./types.ts"; export declare const ReasonCode: { readonly success: 0; readonly normalDisconnection: 0; readonly grantedQos0: 0; readonly grantedQos1: 1; readonly grantedQos2: 2; readonly disconnectWithWillMessage: 4; readonly noMatchingSubscribers: 16; readonly noSubscriptionExisted: 17; readonly continueAuthentication: 24; readonly reAuthenticate: 25; readonly unspecifiedError: 128; readonly malformedPacket: 129; readonly protocolError: 130; readonly implementationSpecificError: 131; readonly unsupportedProtocolVersion: 132; readonly clientIdentifierNotValid: 133; readonly badUserNameOrPassword: 134; readonly notAuthorized: 135; readonly serverUnavailable: 136; readonly serverBusy: 137; readonly banned: 138; readonly serverShuttingDown: 139; readonly badAuthenticationMethod: 140; readonly keepAliveTimeout: 141; readonly sessionTakenOver: 142; readonly topicFilterInvalid: 143; readonly topicNameInvalid: 144; readonly packetIdentifierInUse: 145; readonly packetIdentifierNotFound: 146; readonly receiveMaximumExceeded: 147; readonly topicAliasInvalid: 148; readonly packetTooLarge: 149; readonly messageRateTooHigh: 150; readonly quotaExceeded: 151; readonly administrativeAction: 152; readonly payloadFormatInvalid: 153; readonly retainNotSupported: 154; readonly qosNotSupported: 155; readonly useAnotherServer: 156; readonly serverMoved: 157; readonly sharedSubscriptionsNotSupported: 158; readonly connectionRateExceeded: 159; readonly maximumConnectTime: 160; readonly subscriptionIdentifiersNotSupported: 161; readonly wildcardSubscriptionsNotSupported: 162; }; /** * Reverse lookup for ReasonCode */ export type ReasonCodeByNumberType = InvertRecord; /** Map of numeric reason codes to names. */ export declare const ReasonCodeByNumber: ReasonCodeByNumberType; export declare const ReasonCodebyPacket: { readonly 2: readonly [0, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 144, 149, 151, 153, 154, 155, 156, 157, 159]; readonly 4: readonly [0, 16, 128, 131, 135, 144, 145, 151, 153]; readonly 5: readonly [0, 16, 128, 131, 135, 144, 145, 151, 153]; readonly 6: readonly [0, 146]; readonly 7: readonly [0, 146]; readonly 11: readonly [0, 17, 128, 131, 135, 143, 145]; readonly 15: readonly [0, 24, 25]; readonly 14: readonly [0, 4, 128, 129, 130, 131, 135, 137, 139, 140, 141, 142, 143, 144, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162]; readonly 9: readonly [0, 1, 2, 128, 131, 135, 143, 145, 151, 158, 161, 162]; }; export type ReasonCode = typeof ReasonCode[keyof typeof ReasonCode]; export declare function reasonCodeToString(packetType: PacketType, code: ReasonCode): string; export declare function isValidReasonCode(packetType: PacketType, code: number): boolean; //# sourceMappingURL=ReasonCode.d.ts.map