UNPKG

1.85 kBTypeScriptView Raw
1import { CharacteristicValue, Nullable } from "./types";
2/**
3 * @group HAP Accessory Server
4 */
5export interface EventNotification {
6 characteristics: CharacteristicEventNotification[];
7}
8/**
9 * @group HAP Accessory Server
10 */
11export interface CharacteristicEventNotification {
12 aid: number;
13 iid: number;
14 value: Nullable<CharacteristicValue>;
15}
16/**
17 * @group Utils
18 */
19export declare function consideredTrue(input: string | null): boolean;
20/**
21 * @group HAP Accessory Server
22 */
23export declare const enum TLVValues {
24 REQUEST_TYPE = 0,
25 METHOD = 0,// (match the terminology of the spec sheet but keep backwards compatibility with entry above)
26 USERNAME = 1,
27 IDENTIFIER = 1,
28 SALT = 2,
29 PUBLIC_KEY = 3,
30 PASSWORD_PROOF = 4,
31 ENCRYPTED_DATA = 5,
32 SEQUENCE_NUM = 6,
33 STATE = 6,
34 ERROR_CODE = 7,
35 RETRY_DELAY = 8,
36 CERTIFICATE = 9,// x.509 certificate
37 PROOF = 10,
38 SIGNATURE = 10,// apple authentication coprocessor
39 PERMISSIONS = 11,// None (0x00): regular user, 0x01: Admin (able to add/remove/list pairings)
40 FRAGMENT_DATA = 12,
41 FRAGMENT_LAST = 13,
42 SEPARATOR = 255
43}
44/**
45 * @group HAP Accessory Server
46 */
47export declare const enum PairMethods {
48 PAIR_SETUP = 0,
49 PAIR_SETUP_WITH_AUTH = 1,
50 PAIR_VERIFY = 2,
51 ADD_PAIRING = 3,
52 REMOVE_PAIRING = 4,
53 LIST_PAIRINGS = 5
54}
55/**
56 * Pairing states (pair-setup or pair-verify). Encoded in {@link TLVValues.SEQUENCE_NUM}.
57 *
58 * @group HAP Accessory Server
59 */
60export declare const enum PairingStates {
61 M1 = 1,
62 M2 = 2,
63 M3 = 3,
64 M4 = 4,
65 M5 = 5,
66 M6 = 6
67}
68/**
69 * @group HAP Accessory Server
70 */
71export declare const enum HAPMimeTypes {
72 PAIRING_TLV8 = "application/pairing+tlv8",
73 HAP_JSON = "application/hap+json",
74 IMAGE_JPEG = "image/jpeg"
75}
76//# sourceMappingURL=internal-types.d.ts.map
\No newline at end of file