Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5cd1b5

Browse files
author
Cédric von Allmen
committed
export auth packet to ts types
1 parent b6de745 commit d5cd1b5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

types/index.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import WritableStream = NodeJS.WritableStream
33

44
export declare type QoS = 0 | 1 | 2
55

6-
export declare type PacketCmd = 'connack' |
6+
export declare type PacketCmd = 'auth' |
7+
'connack' |
78
'connect' |
89
'disconnect' |
910
'pingreq' |
@@ -24,6 +25,17 @@ export interface IPacket {
2425
length?: number
2526
}
2627

28+
export interface IAuthPacket extends IPacket {
29+
cmd: 'auth'
30+
reasonCode: number,
31+
properties?: {
32+
authenticationMethod?: string,
33+
authenticationData?: Buffer,
34+
reasonString?: string,
35+
userProperties?: Object,
36+
}
37+
}
38+
2739
export interface IConnectPacket extends IPacket {
2840
cmd: 'connect'
2941
clientId: string

0 commit comments

Comments
 (0)