11export class Device {
2- public id : string = '' ;
3- public name : string = '' ;
4- public givenName : string = '' ;
5- public lastSeen : string = '' ;
6- public ipAddresses : string [ ] = [ ]
7- public forcedTags : string [ ] = [ ]
8- public validTags : string [ ] = [ ]
9- public invalidTags : string [ ] = [ ]
10- public user : { name : string } = { name : '' }
2+ public id : string = '' ;
3+ public name : string = '' ;
4+ public givenName : string = '' ;
5+ public lastSeen : string = '' ;
6+ public ipAddresses : string [ ] = [ ] ;
7+ public forcedTags : string [ ] = [ ] ;
8+ public validTags : string [ ] = [ ] ;
9+ public invalidTags : string [ ] = [ ] ;
10+ public user : { name : string } = { name : '' } ;
11+ public online ?: boolean ;
1112
12- public constructor ( init ?: Partial < Device > ) {
13- Object . assign ( this , init ) ;
14- }
13+ public constructor ( init ?: Partial < Device > ) {
14+ Object . assign ( this , init ) ;
15+ }
1516}
1617
1718export class ACL {
18- public groups : { [ key : string ] : [ string ] } = { }
19+ public groups : { [ key : string ] : [ string ] } = { } ;
1920
20- public constructor ( init ?: Partial < Route > ) {
21- Object . assign ( this , init ) ;
22- }
21+ public constructor ( init ?: Partial < Route > ) {
22+ Object . assign ( this , init ) ;
23+ }
2324}
2425
2526export class Route {
26- // current (hs 18+) method of handling a route
27- advertised : boolean = true ;
28- prefix : string = "" ;
29- enabled : boolean = false ;
30- id : number = 0 ;
27+ // current (hs 18+) method of handling a route
28+ advertised : boolean = true ;
29+ prefix : string = '' ;
30+ enabled : boolean = false ;
31+ id : number = 0 ;
3132
32- public constructor ( init ?: Partial < Route > ) {
33- Object . assign ( this , init ) ;
34- }
33+ public constructor ( init ?: Partial < Route > ) {
34+ Object . assign ( this , init ) ;
35+ }
3536}
3637
3738export class APIKey {
38- id : string = '' ;
39- prefix : string = '' ;
40- expiration : string = '' ;
41- createdAt : string = '' ;
42- lastSeen : string = '' ;
39+ id : string = '' ;
40+ prefix : string = '' ;
41+ expiration : string = '' ;
42+ createdAt : string = '' ;
43+ lastSeen : string = '' ;
4344
44- public constructor ( init ?: Partial < Route > ) {
45- Object . assign ( this , init ) ;
46- }
45+ public constructor ( init ?: Partial < Route > ) {
46+ Object . assign ( this , init ) ;
47+ }
4748}
4849
4950export class PreAuthKey {
50- public user : string = '' ;
51- public id : string = '' ;
52- public key : string = '' ;
53- public createdAt : string = '' ;
54- public expiration : string = '' ;
55- public reusable : boolean = false ;
56- public ephemeral : boolean = false ;
57- public used : boolean = false ;
51+ public user : string = '' ;
52+ public id : string = '' ;
53+ public key : string = '' ;
54+ public createdAt : string = '' ;
55+ public expiration : string = '' ;
56+ public reusable : boolean = false ;
57+ public ephemeral : boolean = false ;
58+ public used : boolean = false ;
5859
59- public constructor ( init ?: Partial < PreAuthKey > ) {
60- Object . assign ( this , init ) ;
61- }
60+ public constructor ( init ?: Partial < PreAuthKey > ) {
61+ Object . assign ( this , init ) ;
62+ }
6263}
6364
6465export class User {
65- public id : string = '' ;
66- public name : string = '' ;
67- public createdAt : string = '' ;
68- public constructor ( init ?: Partial < User > ) {
69- Object . assign ( this , init ) ;
70- }
71- }
66+ public id : string = '' ;
67+ public name : string = '' ;
68+ public createdAt : string = '' ;
69+ public constructor ( init ?: Partial < User > ) {
70+ Object . assign ( this , init ) ;
71+ }
72+ }
0 commit comments