1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.HAPMimeTypes = exports.PairingStates = exports.PairMethods = exports.TLVValues = void 0;
|
4 | exports.consideredTrue = consideredTrue;
|
5 |
|
6 |
|
7 |
|
8 | function consideredTrue(input) {
|
9 | if (!input) {
|
10 | return false;
|
11 | }
|
12 | return input === "true" || input === "1";
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 | var TLVValues;
|
18 | (function (TLVValues) {
|
19 |
|
20 | TLVValues[TLVValues["REQUEST_TYPE"] = 0] = "REQUEST_TYPE";
|
21 |
|
22 | TLVValues[TLVValues["METHOD"] = 0] = "METHOD";
|
23 | TLVValues[TLVValues["USERNAME"] = 1] = "USERNAME";
|
24 |
|
25 | TLVValues[TLVValues["IDENTIFIER"] = 1] = "IDENTIFIER";
|
26 | TLVValues[TLVValues["SALT"] = 2] = "SALT";
|
27 | TLVValues[TLVValues["PUBLIC_KEY"] = 3] = "PUBLIC_KEY";
|
28 | TLVValues[TLVValues["PASSWORD_PROOF"] = 4] = "PASSWORD_PROOF";
|
29 | TLVValues[TLVValues["ENCRYPTED_DATA"] = 5] = "ENCRYPTED_DATA";
|
30 | TLVValues[TLVValues["SEQUENCE_NUM"] = 6] = "SEQUENCE_NUM";
|
31 |
|
32 | TLVValues[TLVValues["STATE"] = 6] = "STATE";
|
33 | TLVValues[TLVValues["ERROR_CODE"] = 7] = "ERROR_CODE";
|
34 | TLVValues[TLVValues["RETRY_DELAY"] = 8] = "RETRY_DELAY";
|
35 | TLVValues[TLVValues["CERTIFICATE"] = 9] = "CERTIFICATE";
|
36 | TLVValues[TLVValues["PROOF"] = 10] = "PROOF";
|
37 |
|
38 | TLVValues[TLVValues["SIGNATURE"] = 10] = "SIGNATURE";
|
39 | TLVValues[TLVValues["PERMISSIONS"] = 11] = "PERMISSIONS";
|
40 | TLVValues[TLVValues["FRAGMENT_DATA"] = 12] = "FRAGMENT_DATA";
|
41 | TLVValues[TLVValues["FRAGMENT_LAST"] = 13] = "FRAGMENT_LAST";
|
42 | TLVValues[TLVValues["SEPARATOR"] = 255] = "SEPARATOR";
|
43 | })(TLVValues || (exports.TLVValues = TLVValues = {}));
|
44 |
|
45 |
|
46 |
|
47 | var PairMethods;
|
48 | (function (PairMethods) {
|
49 |
|
50 | PairMethods[PairMethods["PAIR_SETUP"] = 0] = "PAIR_SETUP";
|
51 | PairMethods[PairMethods["PAIR_SETUP_WITH_AUTH"] = 1] = "PAIR_SETUP_WITH_AUTH";
|
52 | PairMethods[PairMethods["PAIR_VERIFY"] = 2] = "PAIR_VERIFY";
|
53 | PairMethods[PairMethods["ADD_PAIRING"] = 3] = "ADD_PAIRING";
|
54 | PairMethods[PairMethods["REMOVE_PAIRING"] = 4] = "REMOVE_PAIRING";
|
55 | PairMethods[PairMethods["LIST_PAIRINGS"] = 5] = "LIST_PAIRINGS";
|
56 | })(PairMethods || (exports.PairMethods = PairMethods = {}));
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | var PairingStates;
|
63 | (function (PairingStates) {
|
64 | PairingStates[PairingStates["M1"] = 1] = "M1";
|
65 | PairingStates[PairingStates["M2"] = 2] = "M2";
|
66 | PairingStates[PairingStates["M3"] = 3] = "M3";
|
67 | PairingStates[PairingStates["M4"] = 4] = "M4";
|
68 | PairingStates[PairingStates["M5"] = 5] = "M5";
|
69 | PairingStates[PairingStates["M6"] = 6] = "M6";
|
70 | })(PairingStates || (exports.PairingStates = PairingStates = {}));
|
71 |
|
72 |
|
73 |
|
74 | var HAPMimeTypes;
|
75 | (function (HAPMimeTypes) {
|
76 | HAPMimeTypes["PAIRING_TLV8"] = "application/pairing+tlv8";
|
77 | HAPMimeTypes["HAP_JSON"] = "application/hap+json";
|
78 | HAPMimeTypes["IMAGE_JPEG"] = "image/jpeg";
|
79 | })(HAPMimeTypes || (exports.HAPMimeTypes = HAPMimeTypes = {}));
|
80 |
|
\ | No newline at end of file |