@azure/web-pubsub-express 1.0.6-alpha.20240930.1 → 1.0.6-alpha.20241001.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +165 -0
  2. package/dist/commonjs/cloudEventsDispatcher.d.ts.map +1 -1
  3. package/dist/commonjs/cloudEventsDispatcher.js +143 -8
  4. package/dist/commonjs/cloudEventsDispatcher.js.map +1 -1
  5. package/dist/commonjs/cloudEventsProtocols.d.ts +174 -1
  6. package/dist/commonjs/cloudEventsProtocols.d.ts.map +1 -1
  7. package/dist/commonjs/cloudEventsProtocols.js.map +1 -1
  8. package/dist/commonjs/enum/MqttErrorCodes/mqttDisconnectReasonCode.d.ts +180 -0
  9. package/dist/commonjs/enum/MqttErrorCodes/mqttDisconnectReasonCode.d.ts.map +1 -0
  10. package/dist/commonjs/enum/MqttErrorCodes/mqttDisconnectReasonCode.js +186 -0
  11. package/dist/commonjs/enum/MqttErrorCodes/mqttDisconnectReasonCode.js.map +1 -0
  12. package/dist/commonjs/enum/MqttErrorCodes/mqttV311ConnectReturnCode.d.ts +31 -0
  13. package/dist/commonjs/enum/MqttErrorCodes/mqttV311ConnectReturnCode.d.ts.map +1 -0
  14. package/dist/commonjs/enum/MqttErrorCodes/mqttV311ConnectReturnCode.js +37 -0
  15. package/dist/commonjs/enum/MqttErrorCodes/mqttV311ConnectReturnCode.js.map +1 -0
  16. package/dist/commonjs/enum/MqttErrorCodes/mqttV500ConnectReasonCode.d.ts +112 -0
  17. package/dist/commonjs/enum/MqttErrorCodes/mqttV500ConnectReasonCode.d.ts.map +1 -0
  18. package/dist/commonjs/enum/MqttErrorCodes/mqttV500ConnectReasonCode.js +118 -0
  19. package/dist/commonjs/enum/MqttErrorCodes/mqttV500ConnectReasonCode.js.map +1 -0
  20. package/dist/commonjs/index.d.ts +3 -0
  21. package/dist/commonjs/index.d.ts.map +1 -1
  22. package/dist/commonjs/index.js +473 -8
  23. package/dist/commonjs/index.js.map +1 -1
  24. package/dist/esm/cloudEventsDispatcher.d.ts.map +1 -1
  25. package/dist/esm/cloudEventsDispatcher.js +143 -8
  26. package/dist/esm/cloudEventsDispatcher.js.map +1 -1
  27. package/dist/esm/cloudEventsProtocols.d.ts +174 -1
  28. package/dist/esm/cloudEventsProtocols.d.ts.map +1 -1
  29. package/dist/esm/cloudEventsProtocols.js.map +1 -1
  30. package/dist/esm/enum/MqttErrorCodes/mqttDisconnectReasonCode.d.ts +180 -0
  31. package/dist/esm/enum/MqttErrorCodes/mqttDisconnectReasonCode.d.ts.map +1 -0
  32. package/dist/esm/enum/MqttErrorCodes/mqttDisconnectReasonCode.js +183 -0
  33. package/dist/esm/enum/MqttErrorCodes/mqttDisconnectReasonCode.js.map +1 -0
  34. package/dist/esm/enum/MqttErrorCodes/mqttV311ConnectReturnCode.d.ts +31 -0
  35. package/dist/esm/enum/MqttErrorCodes/mqttV311ConnectReturnCode.d.ts.map +1 -0
  36. package/dist/esm/enum/MqttErrorCodes/mqttV311ConnectReturnCode.js +34 -0
  37. package/dist/esm/enum/MqttErrorCodes/mqttV311ConnectReturnCode.js.map +1 -0
  38. package/dist/esm/enum/MqttErrorCodes/mqttV500ConnectReasonCode.d.ts +112 -0
  39. package/dist/esm/enum/MqttErrorCodes/mqttV500ConnectReasonCode.d.ts.map +1 -0
  40. package/dist/esm/enum/MqttErrorCodes/mqttV500ConnectReasonCode.js +115 -0
  41. package/dist/esm/enum/MqttErrorCodes/mqttV500ConnectReasonCode.js.map +1 -0
  42. package/dist/esm/index.d.ts +3 -0
  43. package/dist/esm/index.d.ts.map +1 -1
  44. package/dist/esm/index.js +3 -0
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/web-pubsub-express.d.ts +507 -1
  47. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ /**
2
+ * MQTT 3.1.1 Connect Return Codes.
3
+ */
4
+ export declare enum MqttV311ConnectReturnCode {
5
+ /**
6
+ * 0x01: Connection refused, unacceptable protocol version
7
+ * The Server does not support the level of the MQTT protocol requested by the Client.
8
+ */
9
+ UnacceptableProtocolVersion = 1,
10
+ /**
11
+ * 0x02: Connection refused, identifier rejected
12
+ * The Client identifier is correct UTF-8 but not allowed by the Server.
13
+ */
14
+ IdentifierRejected = 2,
15
+ /**
16
+ * 0x03: Connection refused, server unavailable
17
+ * The Network Connection has been made but the MQTT service is unavailable.
18
+ */
19
+ ServerUnavailable = 3,
20
+ /**
21
+ * 0x04: Connection refused, bad user name or password
22
+ * The data in the user name or password is malformed.
23
+ */
24
+ BadUsernameOrPassword = 4,
25
+ /**
26
+ * 0x05: Connection refused, not authorized
27
+ * The Client is not authorized to connect.
28
+ */
29
+ NotAuthorized = 5
30
+ }
31
+ //# sourceMappingURL=mqttV311ConnectReturnCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttV311ConnectReturnCode.d.ts","sourceRoot":"","sources":["../../../../src/enum/MqttErrorCodes/mqttV311ConnectReturnCode.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,yBAAyB;IACnC;;;OAGG;IACH,2BAA2B,IAAO;IAElC;;;OAGG;IACH,kBAAkB,IAAO;IAEzB;;;OAGG;IACH,iBAAiB,IAAO;IAExB;;;OAGG;IACH,qBAAqB,IAAO;IAE5B;;;OAGG;IACH,aAAa,IAAO;CACrB"}
@@ -0,0 +1,34 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ /**
4
+ * MQTT 3.1.1 Connect Return Codes.
5
+ */
6
+ export var MqttV311ConnectReturnCode;
7
+ (function (MqttV311ConnectReturnCode) {
8
+ /**
9
+ * 0x01: Connection refused, unacceptable protocol version
10
+ * The Server does not support the level of the MQTT protocol requested by the Client.
11
+ */
12
+ MqttV311ConnectReturnCode[MqttV311ConnectReturnCode["UnacceptableProtocolVersion"] = 1] = "UnacceptableProtocolVersion";
13
+ /**
14
+ * 0x02: Connection refused, identifier rejected
15
+ * The Client identifier is correct UTF-8 but not allowed by the Server.
16
+ */
17
+ MqttV311ConnectReturnCode[MqttV311ConnectReturnCode["IdentifierRejected"] = 2] = "IdentifierRejected";
18
+ /**
19
+ * 0x03: Connection refused, server unavailable
20
+ * The Network Connection has been made but the MQTT service is unavailable.
21
+ */
22
+ MqttV311ConnectReturnCode[MqttV311ConnectReturnCode["ServerUnavailable"] = 3] = "ServerUnavailable";
23
+ /**
24
+ * 0x04: Connection refused, bad user name or password
25
+ * The data in the user name or password is malformed.
26
+ */
27
+ MqttV311ConnectReturnCode[MqttV311ConnectReturnCode["BadUsernameOrPassword"] = 4] = "BadUsernameOrPassword";
28
+ /**
29
+ * 0x05: Connection refused, not authorized
30
+ * The Client is not authorized to connect.
31
+ */
32
+ MqttV311ConnectReturnCode[MqttV311ConnectReturnCode["NotAuthorized"] = 5] = "NotAuthorized";
33
+ })(MqttV311ConnectReturnCode || (MqttV311ConnectReturnCode = {}));
34
+ //# sourceMappingURL=mqttV311ConnectReturnCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttV311ConnectReturnCode.js","sourceRoot":"","sources":["../../../../src/enum/MqttErrorCodes/mqttV311ConnectReturnCode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAY,yBA8BX;AA9BD,WAAY,yBAAyB;IACnC;;;OAGG;IACH,uHAAkC,CAAA;IAElC;;;OAGG;IACH,qGAAyB,CAAA;IAEzB;;;OAGG;IACH,mGAAwB,CAAA;IAExB;;;OAGG;IACH,2GAA4B,CAAA;IAE5B;;;OAGG;IACH,2FAAoB,CAAA;AACtB,CAAC,EA9BW,yBAAyB,KAAzB,yBAAyB,QA8BpC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * MQTT 3.1.1 Connect Return Codes.\n */\nexport enum MqttV311ConnectReturnCode {\n /**\n * 0x01: Connection refused, unacceptable protocol version\n * The Server does not support the level of the MQTT protocol requested by the Client.\n */\n UnacceptableProtocolVersion = 0x01,\n\n /**\n * 0x02: Connection refused, identifier rejected\n * The Client identifier is correct UTF-8 but not allowed by the Server.\n */\n IdentifierRejected = 0x02,\n\n /**\n * 0x03: Connection refused, server unavailable\n * The Network Connection has been made but the MQTT service is unavailable.\n */\n ServerUnavailable = 0x03,\n\n /**\n * 0x04: Connection refused, bad user name or password\n * The data in the user name or password is malformed.\n */\n BadUsernameOrPassword = 0x04,\n\n /**\n * 0x05: Connection refused, not authorized\n * The Client is not authorized to connect.\n */\n NotAuthorized = 0x05,\n}\n"]}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * MQTT Connect Reason Codes
3
+ * These codes represent the reasons for the outcome of an MQTT CONNECT packet as per MQTT 5.0 specification.
4
+ */
5
+ export declare enum MqttV500ConnectReasonCode {
6
+ /**
7
+ * 0x80 - Unspecified error
8
+ * Description: The Server does not wish to reveal the reason for the failure, or none of the other Reason Codes apply.
9
+ */
10
+ UnspecifiedError = 128,
11
+ /**
12
+ * 0x81 - Malformed Packet
13
+ * Description: Data within the CONNECT packet could not be correctly parsed.
14
+ */
15
+ MalformedPacket = 129,
16
+ /**
17
+ * 0x82 - Protocol Error
18
+ * Description: Data in the CONNECT packet does not conform to this specification.
19
+ */
20
+ ProtocolError = 130,
21
+ /**
22
+ * 0x83 - Implementation specific error
23
+ * Description: The CONNECT is valid but is not accepted by this Server.
24
+ */
25
+ ImplementationSpecificError = 131,
26
+ /**
27
+ * 0x84 - Unsupported Protocol Version
28
+ * Description: The Server does not support the version of the MQTT protocol requested by the Client.
29
+ */
30
+ UnsupportedProtocolVersion = 132,
31
+ /**
32
+ * 0x85 - Client Identifier not valid
33
+ * Description: The Client Identifier is a valid string but is not allowed by the Server.
34
+ */
35
+ ClientIdentifierNotValid = 133,
36
+ /**
37
+ * 0x86 - Bad User Name or Password
38
+ * Description: The Server does not accept the User Name or Password specified by the Client.
39
+ */
40
+ BadUserNameOrPassword = 134,
41
+ /**
42
+ * 0x87 - Not authorized
43
+ * Description: The Client is not authorized to connect.
44
+ */
45
+ NotAuthorized = 135,
46
+ /**
47
+ * 0x88 - Server unavailable
48
+ * Description: The MQTT Server is not available.
49
+ */
50
+ ServerUnavailable = 136,
51
+ /**
52
+ * 0x89 - Server busy
53
+ * Description: The Server is busy. Try again later.
54
+ */
55
+ ServerBusy = 137,
56
+ /**
57
+ * 0x8A - Banned
58
+ * Description: This Client has been banned by administrative action. Contact the server administrator.
59
+ */
60
+ Banned = 138,
61
+ /**
62
+ * 0x8C - Bad authentication method
63
+ * Description: The authentication method is not supported or does not match the authentication method currently in use.
64
+ */
65
+ BadAuthenticationMethod = 140,
66
+ /**
67
+ * 0x90 - Topic Name invalid
68
+ * Description: The Will Topic Name is not malformed, but is not accepted by this Server.
69
+ */
70
+ TopicNameInvalid = 144,
71
+ /**
72
+ * 0x95 - Packet too large
73
+ * Description: The CONNECT packet exceeded the maximum permissible size.
74
+ */
75
+ PacketTooLarge = 149,
76
+ /**
77
+ * 0x97 - Quota exceeded
78
+ * Description: An implementation or administrative imposed limit has been exceeded.
79
+ */
80
+ QuotaExceeded = 151,
81
+ /**
82
+ * 0x99 - Payload format invalid
83
+ * Description: The Will Payload does not match the specified Payload Format Indicator.
84
+ */
85
+ PayloadFormatInvalid = 153,
86
+ /**
87
+ * 0x9A - Retain not supported
88
+ * Description: The Server does not support retained messages, and Will Retain was set to 1.
89
+ */
90
+ RetainNotSupported = 154,
91
+ /**
92
+ * 0x9B - QoS not supported
93
+ * Description: The Server does not support the QoS set in Will QoS.
94
+ */
95
+ QosNotSupported = 155,
96
+ /**
97
+ * 0x9C - Use another server
98
+ * Description: The Client should temporarily use another server.
99
+ */
100
+ UseAnotherServer = 156,
101
+ /**
102
+ * 0x9D - Server moved
103
+ * Description: The Client should permanently use another server.
104
+ */
105
+ ServerMoved = 157,
106
+ /**
107
+ * 0x9F - Connection rate exceeded
108
+ * Description: The connection rate limit has been exceeded.
109
+ */
110
+ ConnectionRateExceeded = 159
111
+ }
112
+ //# sourceMappingURL=mqttV500ConnectReasonCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttV500ConnectReasonCode.d.ts","sourceRoot":"","sources":["../../../../src/enum/MqttErrorCodes/mqttV500ConnectReasonCode.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oBAAY,yBAAyB;IACnC;;;OAGG;IACH,gBAAgB,MAAO;IAEvB;;;OAGG;IACH,eAAe,MAAO;IAEtB;;;OAGG;IACH,aAAa,MAAO;IAEpB;;;OAGG;IACH,2BAA2B,MAAO;IAElC;;;OAGG;IACH,0BAA0B,MAAO;IAEjC;;;OAGG;IACH,wBAAwB,MAAO;IAE/B;;;OAGG;IACH,qBAAqB,MAAO;IAE5B;;;OAGG;IACH,aAAa,MAAO;IAEpB;;;OAGG;IACH,iBAAiB,MAAO;IAExB;;;OAGG;IACH,UAAU,MAAO;IAEjB;;;OAGG;IACH,MAAM,MAAO;IAEb;;;OAGG;IACH,uBAAuB,MAAO;IAE9B;;;OAGG;IACH,gBAAgB,MAAO;IAEvB;;;OAGG;IACH,cAAc,MAAO;IAErB;;;OAGG;IACH,aAAa,MAAO;IAEpB;;;OAGG;IACH,oBAAoB,MAAO;IAE3B;;;OAGG;IACH,kBAAkB,MAAO;IAEzB;;;OAGG;IACH,eAAe,MAAO;IAEtB;;;OAGG;IACH,gBAAgB,MAAO;IAEvB;;;OAGG;IACH,WAAW,MAAO;IAElB;;;OAGG;IACH,sBAAsB,MAAO;CAC9B"}
@@ -0,0 +1,115 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ /**
4
+ * MQTT Connect Reason Codes
5
+ * These codes represent the reasons for the outcome of an MQTT CONNECT packet as per MQTT 5.0 specification.
6
+ */
7
+ export var MqttV500ConnectReasonCode;
8
+ (function (MqttV500ConnectReasonCode) {
9
+ /**
10
+ * 0x80 - Unspecified error
11
+ * Description: The Server does not wish to reveal the reason for the failure, or none of the other Reason Codes apply.
12
+ */
13
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["UnspecifiedError"] = 128] = "UnspecifiedError";
14
+ /**
15
+ * 0x81 - Malformed Packet
16
+ * Description: Data within the CONNECT packet could not be correctly parsed.
17
+ */
18
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["MalformedPacket"] = 129] = "MalformedPacket";
19
+ /**
20
+ * 0x82 - Protocol Error
21
+ * Description: Data in the CONNECT packet does not conform to this specification.
22
+ */
23
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ProtocolError"] = 130] = "ProtocolError";
24
+ /**
25
+ * 0x83 - Implementation specific error
26
+ * Description: The CONNECT is valid but is not accepted by this Server.
27
+ */
28
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ImplementationSpecificError"] = 131] = "ImplementationSpecificError";
29
+ /**
30
+ * 0x84 - Unsupported Protocol Version
31
+ * Description: The Server does not support the version of the MQTT protocol requested by the Client.
32
+ */
33
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["UnsupportedProtocolVersion"] = 132] = "UnsupportedProtocolVersion";
34
+ /**
35
+ * 0x85 - Client Identifier not valid
36
+ * Description: The Client Identifier is a valid string but is not allowed by the Server.
37
+ */
38
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ClientIdentifierNotValid"] = 133] = "ClientIdentifierNotValid";
39
+ /**
40
+ * 0x86 - Bad User Name or Password
41
+ * Description: The Server does not accept the User Name or Password specified by the Client.
42
+ */
43
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["BadUserNameOrPassword"] = 134] = "BadUserNameOrPassword";
44
+ /**
45
+ * 0x87 - Not authorized
46
+ * Description: The Client is not authorized to connect.
47
+ */
48
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["NotAuthorized"] = 135] = "NotAuthorized";
49
+ /**
50
+ * 0x88 - Server unavailable
51
+ * Description: The MQTT Server is not available.
52
+ */
53
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ServerUnavailable"] = 136] = "ServerUnavailable";
54
+ /**
55
+ * 0x89 - Server busy
56
+ * Description: The Server is busy. Try again later.
57
+ */
58
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ServerBusy"] = 137] = "ServerBusy";
59
+ /**
60
+ * 0x8A - Banned
61
+ * Description: This Client has been banned by administrative action. Contact the server administrator.
62
+ */
63
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["Banned"] = 138] = "Banned";
64
+ /**
65
+ * 0x8C - Bad authentication method
66
+ * Description: The authentication method is not supported or does not match the authentication method currently in use.
67
+ */
68
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["BadAuthenticationMethod"] = 140] = "BadAuthenticationMethod";
69
+ /**
70
+ * 0x90 - Topic Name invalid
71
+ * Description: The Will Topic Name is not malformed, but is not accepted by this Server.
72
+ */
73
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["TopicNameInvalid"] = 144] = "TopicNameInvalid";
74
+ /**
75
+ * 0x95 - Packet too large
76
+ * Description: The CONNECT packet exceeded the maximum permissible size.
77
+ */
78
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["PacketTooLarge"] = 149] = "PacketTooLarge";
79
+ /**
80
+ * 0x97 - Quota exceeded
81
+ * Description: An implementation or administrative imposed limit has been exceeded.
82
+ */
83
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["QuotaExceeded"] = 151] = "QuotaExceeded";
84
+ /**
85
+ * 0x99 - Payload format invalid
86
+ * Description: The Will Payload does not match the specified Payload Format Indicator.
87
+ */
88
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["PayloadFormatInvalid"] = 153] = "PayloadFormatInvalid";
89
+ /**
90
+ * 0x9A - Retain not supported
91
+ * Description: The Server does not support retained messages, and Will Retain was set to 1.
92
+ */
93
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["RetainNotSupported"] = 154] = "RetainNotSupported";
94
+ /**
95
+ * 0x9B - QoS not supported
96
+ * Description: The Server does not support the QoS set in Will QoS.
97
+ */
98
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["QosNotSupported"] = 155] = "QosNotSupported";
99
+ /**
100
+ * 0x9C - Use another server
101
+ * Description: The Client should temporarily use another server.
102
+ */
103
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["UseAnotherServer"] = 156] = "UseAnotherServer";
104
+ /**
105
+ * 0x9D - Server moved
106
+ * Description: The Client should permanently use another server.
107
+ */
108
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ServerMoved"] = 157] = "ServerMoved";
109
+ /**
110
+ * 0x9F - Connection rate exceeded
111
+ * Description: The connection rate limit has been exceeded.
112
+ */
113
+ MqttV500ConnectReasonCode[MqttV500ConnectReasonCode["ConnectionRateExceeded"] = 159] = "ConnectionRateExceeded";
114
+ })(MqttV500ConnectReasonCode || (MqttV500ConnectReasonCode = {}));
115
+ //# sourceMappingURL=mqttV500ConnectReasonCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttV500ConnectReasonCode.js","sourceRoot":"","sources":["../../../../src/enum/MqttErrorCodes/mqttV500ConnectReasonCode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,yBA8HX;AA9HD,WAAY,yBAAyB;IACnC;;;OAGG;IACH,mGAAuB,CAAA;IAEvB;;;OAGG;IACH,iGAAsB,CAAA;IAEtB;;;OAGG;IACH,6FAAoB,CAAA;IAEpB;;;OAGG;IACH,yHAAkC,CAAA;IAElC;;;OAGG;IACH,uHAAiC,CAAA;IAEjC;;;OAGG;IACH,mHAA+B,CAAA;IAE/B;;;OAGG;IACH,6GAA4B,CAAA;IAE5B;;;OAGG;IACH,6FAAoB,CAAA;IAEpB;;;OAGG;IACH,qGAAwB,CAAA;IAExB;;;OAGG;IACH,uFAAiB,CAAA;IAEjB;;;OAGG;IACH,+EAAa,CAAA;IAEb;;;OAGG;IACH,iHAA8B,CAAA;IAE9B;;;OAGG;IACH,mGAAuB,CAAA;IAEvB;;;OAGG;IACH,+FAAqB,CAAA;IAErB;;;OAGG;IACH,6FAAoB,CAAA;IAEpB;;;OAGG;IACH,2GAA2B,CAAA;IAE3B;;;OAGG;IACH,uGAAyB,CAAA;IAEzB;;;OAGG;IACH,iGAAsB,CAAA;IAEtB;;;OAGG;IACH,mGAAuB,CAAA;IAEvB;;;OAGG;IACH,yFAAkB,CAAA;IAElB;;;OAGG;IACH,+GAA6B,CAAA;AAC/B,CAAC,EA9HW,yBAAyB,KAAzB,yBAAyB,QA8HpC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * MQTT Connect Reason Codes\n * These codes represent the reasons for the outcome of an MQTT CONNECT packet as per MQTT 5.0 specification.\n */\nexport enum MqttV500ConnectReasonCode {\n /**\n * 0x80 - Unspecified error\n * Description: The Server does not wish to reveal the reason for the failure, or none of the other Reason Codes apply.\n */\n UnspecifiedError = 0x80,\n\n /**\n * 0x81 - Malformed Packet\n * Description: Data within the CONNECT packet could not be correctly parsed.\n */\n MalformedPacket = 0x81,\n\n /**\n * 0x82 - Protocol Error\n * Description: Data in the CONNECT packet does not conform to this specification.\n */\n ProtocolError = 0x82,\n\n /**\n * 0x83 - Implementation specific error\n * Description: The CONNECT is valid but is not accepted by this Server.\n */\n ImplementationSpecificError = 0x83,\n\n /**\n * 0x84 - Unsupported Protocol Version\n * Description: The Server does not support the version of the MQTT protocol requested by the Client.\n */\n UnsupportedProtocolVersion = 0x84,\n\n /**\n * 0x85 - Client Identifier not valid\n * Description: The Client Identifier is a valid string but is not allowed by the Server.\n */\n ClientIdentifierNotValid = 0x85,\n\n /**\n * 0x86 - Bad User Name or Password\n * Description: The Server does not accept the User Name or Password specified by the Client.\n */\n BadUserNameOrPassword = 0x86,\n\n /**\n * 0x87 - Not authorized\n * Description: The Client is not authorized to connect.\n */\n NotAuthorized = 0x87,\n\n /**\n * 0x88 - Server unavailable\n * Description: The MQTT Server is not available.\n */\n ServerUnavailable = 0x88,\n\n /**\n * 0x89 - Server busy\n * Description: The Server is busy. Try again later.\n */\n ServerBusy = 0x89,\n\n /**\n * 0x8A - Banned\n * Description: This Client has been banned by administrative action. Contact the server administrator.\n */\n Banned = 0x8a,\n\n /**\n * 0x8C - Bad authentication method\n * Description: The authentication method is not supported or does not match the authentication method currently in use.\n */\n BadAuthenticationMethod = 0x8c,\n\n /**\n * 0x90 - Topic Name invalid\n * Description: The Will Topic Name is not malformed, but is not accepted by this Server.\n */\n TopicNameInvalid = 0x90,\n\n /**\n * 0x95 - Packet too large\n * Description: The CONNECT packet exceeded the maximum permissible size.\n */\n PacketTooLarge = 0x95,\n\n /**\n * 0x97 - Quota exceeded\n * Description: An implementation or administrative imposed limit has been exceeded.\n */\n QuotaExceeded = 0x97,\n\n /**\n * 0x99 - Payload format invalid\n * Description: The Will Payload does not match the specified Payload Format Indicator.\n */\n PayloadFormatInvalid = 0x99,\n\n /**\n * 0x9A - Retain not supported\n * Description: The Server does not support retained messages, and Will Retain was set to 1.\n */\n RetainNotSupported = 0x9a,\n\n /**\n * 0x9B - QoS not supported\n * Description: The Server does not support the QoS set in Will QoS.\n */\n QosNotSupported = 0x9b,\n\n /**\n * 0x9C - Use another server\n * Description: The Client should temporarily use another server.\n */\n UseAnotherServer = 0x9c,\n\n /**\n * 0x9D - Server moved\n * Description: The Client should permanently use another server.\n */\n ServerMoved = 0x9d,\n\n /**\n * 0x9F - Connection rate exceeded\n * Description: The connection rate limit has been exceeded.\n */\n ConnectionRateExceeded = 0x9f,\n}\n"]}
@@ -1,3 +1,6 @@
1
1
  export { WebPubSubEventHandler } from "./webPubSubEventHandler.js";
2
2
  export * from "./cloudEventsProtocols.js";
3
+ export { MqttV311ConnectReturnCode } from "./enum/MqttErrorCodes/mqttV311ConnectReturnCode.js";
4
+ export { MqttV500ConnectReasonCode } from "./enum/MqttErrorCodes/mqttV500ConnectReasonCode.js";
5
+ export { MqttDisconnectReasonCode } from "./enum/MqttErrorCodes/mqttDisconnectReasonCode.js";
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC"}
package/dist/esm/index.js CHANGED
@@ -2,4 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  export { WebPubSubEventHandler } from "./webPubSubEventHandler.js";
4
4
  export * from "./cloudEventsProtocols.js";
5
+ export { MqttV311ConnectReturnCode } from "./enum/MqttErrorCodes/mqttV311ConnectReturnCode.js";
6
+ export { MqttV500ConnectReasonCode } from "./enum/MqttErrorCodes/mqttV500ConnectReasonCode.js";
7
+ export { MqttDisconnectReasonCode } from "./enum/MqttErrorCodes/mqttDisconnectReasonCode.js";
5
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,cAAc,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport { WebPubSubEventHandler } from \"./webPubSubEventHandler.js\";\n\nexport * from \"./cloudEventsProtocols.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport { WebPubSubEventHandler } from \"./webPubSubEventHandler.js\";\n\nexport * from \"./cloudEventsProtocols.js\";\n\nexport { MqttV311ConnectReturnCode } from \"./enum/MqttErrorCodes/mqttV311ConnectReturnCode.js\";\nexport { MqttV500ConnectReasonCode } from \"./enum/MqttErrorCodes/mqttV500ConnectReasonCode.js\";\nexport { MqttDisconnectReasonCode } from \"./enum/MqttErrorCodes/mqttDisconnectReasonCode.js\";\n"]}