-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathconstants.ts
45 lines (43 loc) · 1.23 KB
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export enum MqttChanName {
fromApi = "from_api",
fromClients = "from_clients",
fromDevice = "from_device",
logs = "logs",
status = "status",
sync = "sync",
/** THIS ONE IS SPECIAL. */
publicBroadcast = "public_broadcast",
pong = "pong"
}
/** Not to be confused with MqttChanNames or
* MQTT.js event names */
export enum FbjsEventName {
/** State tree update. */
status = "status",
/** When a log is received */
logs = "logs",
/** When an unexpected message is received */
malformed = "malformed",
/** Unreliable. */
offline = "offline",
/** Fired on connect. */
online = "online",
/** Fires when the API sends an MQTT message to users. */
publicBroadcast = "public_broadcast",
/** Fires after any message is sent from current client. */
sent = "sent",
/** Used by resource auto-sync. */
sync = "sync",
/** When a key is removed from the device state tree. */
remove = "remove",
}
export enum Misc {
/** Channel delimiter for MQTT channels. */
MQTT_DELIM = "/",
/** Namespace delimiter used by `sync_v7` */
PATH_DELIM = ".",
/** A null value when dealing with empty `pair` nodes in CeleryScript. */
NULL = "null",
/** Reconnect internval for MQTT.js */
RECONNECT_THROTTLE_MS = 1000,
}