-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
1104 lines (978 loc) · 23.8 KB
/
types.d.ts
File metadata and controls
1104 lines (978 loc) · 23.8 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare global {
type Color =
| 'primary'
| 'primaryLight'
| 'primaryLighter'
| 'primaryHighlight'
| 'primaryBackground'
| 'primaryDark'
| 'calm'
| 'successLight'
| 'success'
| 'successDark'
| 'dangerLight'
| 'danger'
| 'warning'
| 'warningLightest'
| 'warningHighlight'
| 'gray'
| 'grayLightest'
| 'grayLighter'
| 'grayLight'
| 'grayDark'
| 'grayDarker'
| 'grayDarkest'
| 'white'
| 'alwaysWhite'
| 'black'
| 'darken'
| 'hover'
| 'screen'
| 'shadow'
| 'rpi'
| 'guide'
| 'test'
| 'brandPrimary'
| 'brandSecondary'
type SocketAction =
//socket auth
| 'authentication'
| 'heartbeat'
// user/auth
| 'user/check-sign-in'
| 'user/sign-in'
| 'user/sign-out-complete'
| 'user/lock'
| 'user/sign-out'
| 'user/quit'
// binaries
| 'binaries/install'
// all connections update
| 'pool'
// single connection update
| 'connection'
| 'connections'
// individual actions
| 'service/connect'
| 'service/disconnect'
| 'service/stop'
| 'service/forget'
| 'service/restart'
| 'service/clear'
| 'service/clearRecent'
| 'service/clearErrors'
| 'launch/app'
// App/settings
| 'navigate'
| 'maximize'
| 'showFolder'
| 'filePrompt'
| 'cancelBluetooth'
// Backend
| 'init'
| 'refresh'
| 'targets'
| 'device'
| 'registration'
| 'restore'
| 'scan'
| 'oobCheck'
| 'interfaces'
| 'freePort'
| 'uninstall'
| 'preferences'
| 'osInfo'
| 'reachablePort'
| 'useCertificate'
| 'sshConfig'
| 'forceUnregister'
| 'update/check'
| 'update/install'
type SocketEvent =
// built-in events
| 'connect'
| 'disconnect'
| 'connect_error'
// user/auth
| 'signed-out'
| 'signed-in'
| 'sign-in/error'
// connection pool
| 'pool'
// connection update
| 'connection'
// binary
| 'binary/install/start'
| 'binary/install/progress'
| 'binary/install/error'
| 'binary/installed'
| 'binary/not-installed'
// backend
| 'targets'
| 'device'
| 'scan'
| 'interfaces'
| 'privateIP'
| 'preferences'
| 'reachablePort'
| 'canNavigate'
type IEnvironment = {
os?: Ios
portal: boolean
privateIP: string
}
type BinaryReason = {
binariesOutdated: boolean
agentStopped: boolean
agentMismatched: boolean
cliUpdated: boolean
desktopUpdated: boolean
}
type Ios = 'mac' | 'windows' | 'linux' | 'rpi' | 'android' | 'ios'
interface CommonAdaptorInterface {
getState: () => { environment: IEnvironment; preferences: IPreferences }
getCloudData: (typeId?: number) => IApplicationType
escapeRegex: (string: string) => string
}
interface InstallationInfo {
name: string
path: string
version: string
installedVersion?: string
}
interface UserCredentials {
username: string
authHash: string
guid: string
}
interface IRawUser {
guid: string
auth_token: string
authHash: string
token: string
service_authhash: string
}
interface ISearch {
accountId: string
nodeId: string
nodeName: string
nodeType: INodeType | string
serviceId: string
serviceName: string
ownerEmail: string
targetPlatform: number
combinedName: string
}
type INodeType = 'DEVICE' | 'NETWORK'
interface INetwork extends IInstance {
accountId: string
cloud: boolean // is not a local network
connectionNames: INameLookupByServiceId
serviceIds: string[]
sessions?: ISession[]
icon?: string
iconType?: IconType
}
type INameLookupByServiceId = ILookup<string>
interface IConnection {
accountId?: string // organization id
autoLaunch?: boolean
autoClose?: boolean // run close command on disconnect
autoStart?: boolean
commandLog?: string[]
commandTemplate?: string // DEPRECATED command line launch template
connected?: boolean
connecting?: boolean
connectLink?: boolean // is public persistent link
connectOnReady?: boolean // if the connection should be started when the service is ready
createdTime?: Timestamp // unix timestamp track for garbage cleanup
default?: boolean // if the connection is in a default state - gets removed on modification
description?: string
deviceID?: string
disableSecurity?: boolean //disable https security
disconnecting?: boolean
enabled: boolean // if the connection is active
endTime?: Timestamp // unix timestamp connection close time
error?: ISimpleError
failover?: boolean // allow proxy failover
host?: string // returned hostname from cli
id: string
identity?: ISSHIdentity
ip?: ipAddress // bind address
isP2P?: boolean // if the connection was made with peer to peer vs failover
launchTemplate?: string // DEPRECATED deep link launch url template
launchTemplates?: ILookup<string> // deep link launch templates
launchType?: 'URL' | 'SCRIPT' | 'COMMAND' | 'TERMINAL' | 'NONE' // scheme to use for launching
launched?: boolean // if the connection has been launched
log?: boolean // if cli should log the connectd stdout to file
name?: string
online?: boolean // online if service is online
owner?: IUserRef
password?: string | null // link password
path?: string // application path
port?: number
proxyOnly?: boolean // disabled p2p
public?: boolean // if the connection should be a public proxy link
publicId?: string // public proxy connection ID
publicRestriction?: ipAddress // public proxy restriction IP
ready?: boolean // if the connection is ready to connect
restriction?: ipAddress // Restriction IP address
sessionId?: string //the connection session id
starting?: boolean // if the connection listening is starting up
startTime?: Timestamp // unix timestamp connection start time
stopLock?: number // connection stopped by user do not re-added if missing from cli for 5 minutes
stopping?: boolean // service stopping the listener
surveyed?: string // the session ID of the survey that has been answered
targetHost?: ipAddress // default localhost
timeout?: number // timeout to disconnect in minutes
typeID?: number // service type ID
updating?: boolean // waiting for cloud update
username?: string // support for launching where username could be saved
rawEndpoint?: string // raw endpoint from cli
rawCommand?: string // raw connectd command from cli
checkpoint?: {
canBindToPortLocally: boolean
connectdCanAuth: boolean
connectdCanConnectToChatServers: boolean
connectdCanPortBind: boolean
connectdCanStart: boolean
connectdTunnelCreated: boolean
hostnameCanFetch: boolean
hostnameCanResolve: boolean
proxyCanCreate: boolean
targetServiceReachable: boolean
}
}
type ISSHIdentity = {
User?: string
Password?: string
IdentityFile?: string // ssh identity file path
}
type IConnectionState =
| 'offline'
| 'online'
| 'connected'
| 'connecting'
| 'disconnecting'
| 'starting'
| 'stopping'
| 'ready'
type IConnectionSource = 'UNKNOWN' | 'INTERNAL' | 'EXTERNAL' | 'WEBSOCKET'
type IConnectionKey = keyof IConnection
interface IosInfo {
os: IConnection
version: string
arch: any
}
interface ConnectionLookup {
[id: string]: IConnection
}
interface ConnectionMessage {
connection: IConnection
raw?: string
extra?: any
}
interface ConnectionErrorMessage extends ISimpleError {
connection: IConnection
}
type SocketEmit = (name: string, ...args: any[]) => any
type IStrategy = 'failover' | 'p2p' | 'proxy'
type CLIDeviceProps =
| {
hostname: string // proxy_dest_ip - service ip to forward
hardwareId?: string
uid: string // UID
name?: string
secret?: string // password
port: number // proxy_dest_port - service port
type: number // application_type - service type
disabled: boolean // service enabled / disabled
}
| undefined
type IServiceRegistration = {
name?: string
application: number
host?: string
port?: number
enabled?: boolean
}
interface IInstance {
id: string
name: string
shared: boolean
loaded?: boolean
owner: IUserRef
permissions: IPermission[]
access: IUserRef[]
tags: ITag[]
}
interface IDevice extends IInstance {
state: 'active' | 'inactive'
hardwareId?: string
lastReported: Date
externalAddress: ipAddress
internalAddress: ipAddress
targetPlatform: number
availability: number
instability: number
onlineSince: Timestamp
offlineSince: Timestamp
quality: 'GOOD' | 'MODERATE' | 'POOR' | 'UNKNOWN'
version?: number // daemon version
configurable: boolean // cloud shift device
scriptable: boolean
accountId: string // organization id
thisDevice?: boolean
license: ILicenseTypes
geo: IGeo & {
connectionType?: string
isp?: string
}
createdAt?: Date
contactedAt?: Date
shared: boolean
services: IService[]
hidden?: boolean
newDevice?: boolean
presenceAddress?: string
timeSeries?: ITimeSeries
supportedAppInstalls: number[]
attributes: ILookup<any> & {
name?: string
color?: number
label?: string
accessDisabled?: boolean
notificationEmail?: boolean | null
notificationSystem?: boolean | null
}
notificationSettings: {
emailNotifications?: boolean | null
desktopNotifications?: boolean | null
}
}
interface IService {
id: string
name: string
subdomain: string
lastReported: Date
contactedAt: Date
createdAt: Date
enabled?: boolean
loaded?: boolean
state: IDevice['state']
type: string
deviceID: string
link?: {
url: string
web: boolean
code: string
created: Date
enabled: boolean
password?: string
}
typeID: number
port?: number
host?: ipAddress
protocol?: string
access: IUserRef[]
license: ILicenseTypes
presenceAddress?: string
timeSeries?: ITimeSeries
attributes: ILookup<any> & {
route?: IRouteType
defaultPort?: number
launchTemplate?: string
commandTemplate?: string
targetHost?: string
description?: string
}
}
type ITimeSeries = {
type: ITimeSeriesType
resolution: ITimeSeriesResolution
start: Date
end: Date
time: Date[]
data: number[]
}
type ITimeSeriesOptions = {
type: ITimeSeriesType
resolution: ITimeSeriesResolution
length: number
timezone?: string
}
type ITimeSeriesResolution = 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR'
type ITimeSeriesType =
| 'AVAILABILITY' // Online Percentage
| 'ONLINE_DURATION' // Online Duration (in seconds)
| 'ONLINE' // Number of online events
| 'OFFLINE' // Number of offline events
| 'USAGE' // Connected Percentage
| 'CONNECT_DURATION' // Connected Duration (in seconds)
| 'CONNECT' // Number of connection events
| 'DISCONNECT' // Number of disconnect events
type ITimeSeriesScale = {
unit: '%' | 'time' | 'events'
scale: number
}
type ILinkData = {
url: string
created: Date
enabled: boolean
password?: string
serviceId: string
deviceId: string
subdomain: string
}
type ITag = {
name: string
color: ILabel['id']
created?: Date
}
type ITagOperator = 'ALL' | 'ANY'
type ITagFilter = {
operator: ITagOperator
values: string[]
}
interface ISortService {
name: string
sortService: (a: IService, b: IService) => number
icon: string
}
type ISortServiceType = 'ATOZ' | 'ZTOA' | 'NEWEST' | 'OLDEST'
interface IOptionServiceSort {
ATOZ: ISortService
ZTOA: ISortService
NEWEST: ISortService
OLDEST: ISortService
}
type IRoleAccess = 'NONE' | 'TAG' | 'ALL' | 'SELECTED' | 'CUSTOM'
type ILabel = {
id: number
name: string
color: string
hidden?: boolean
}
type ILicenseTypes = 'UNKNOWN' | 'EVALUATION' | 'LICENSED' | 'UNLICENSED' | 'NON_COMMERCIAL' | 'EXEMPT' | string
type IPermission = 'VIEW' | 'CONNECT' | 'SCRIPTING' | 'MANAGE' | 'ADMIN'
type IUser = {
id: string
email: string
authHash?: string
yoicsId?: string
created?: Date
timestamp?: Date
scripting?: boolean // @FIXME why do we have scripting on a user seems like a share setting
apiKey?: string
language?: string
admin?: boolean
}
type IGuest = {
id: string
email: string
deviceIds: string[]
networkIds: string[]
}
type INotificationSetting = {
emailNotifications?: boolean
desktopNotifications?: boolean
urlNotifications?: boolean
notificationEmail?: string
notificationUrl?: string
}
type IUserRef = {
id: string
email: string
created?: Date
scripting?: boolean
}
type IOrganizationMember = {
user: IUserRef
organizationId: string
license: ILicenseTypes
roleId: IOrganizationRoleIdType
created?: Date
}
type IMembership = {
roleId: IOrganizationRoleIdType
roleName: string
created: Date
license: ILicenseTypes
account: IUserRef
name?: string
}
type IOrganizationRoleIdType = 'OWNER' | 'ADMIN' | 'MEMBER' | 'CUSTOM' | 'REMOVE' | string
type IOrganizationRole = {
id: string
name: string
system?: boolean
disabled?: boolean
permissions: IPermission[]
access: IRoleAccess
tag?: ITagFilter
}
type ICreateRole = {
id?: string
name?: string
grant?: IPermission[]
revoke?: IPermission[]
access?: IRoleAccess
tag?: ITagFilter
accountId: string
}
type IGeo = {
countryName: string
stateName: string
city: string
}
type ISession = {
id?: string
isP2P?: boolean
timestamp: Date
platform: number
reverseProxy: boolean
source: IConnectionSource
user?: IUserRef
geo?: IGeo
manufacturer: 'KEY' | 'ANONYMOUS' | 'UNKNOWN'
target: {
id: string
accountId: string
deviceId: string
platform?: number
name: string // combined service + device names
}
}
type IFile = {
id: string
name: string
created: ISOTimestamp
updated: ISOTimestamp
shortDesc?: string
longDesc?: string
executable: boolean // if file is a script
versions: IFileVersion[]
}
type IFileVersion = {
id: string
arguments: IFileArgument[]
}
type IFileArgument = {
name: string
desc?: string
order: number
argumentType: IFileArgumentType
options: string[]
}
type IFileArgumentType = 'FileSelect' | 'StringSelect' | 'StringEntry'
// For defining arguments when creating/editing scripts (sent to upload API)
type IArgumentDefinition = {
name: string
type: IFileArgumentType
desc: string
options?: string[]
}
// For passing argument values when running scripts (sent to setJob mutation)
type IArgumentValue = {
name: string
value: string
}
type IFileForm = {
name: string
description: string
executable: boolean
deviceIds: string[]
access: IRoleAccess
script?: string
fileId: string
jobId?: string
tag?: ITagFilter
file?: File
argumentDefinitions?: IArgumentDefinition[] // For script creation/edit
argumentValues?: IArgumentValue[] // For running scripts
}
type IJob = {
id: string
status: IJobStatus
created: ISOTimestamp
updated: ISOTimestamp
owner: IUserRef
user: IUserRef
tag: ITagFilter
file?: {
id: string
name: string
}
jobDevices: IJobDevice[]
arguments: IJobArgument[]
}
type IJobArgument = {
id: string
name: string
desc: string
order: number
argumentType: 'File' | 'String'
value?: string
created: ISOTimestamp
}
type IJobDevice = {
id: string
status: IJobStatus
created: ISOTimestamp
updated: ISOTimestamp
attributes: IJobDeviceAttribute[]
device: {
id: string
name: string
}
}
type IJobDeviceAttribute = {
key: string
value: string
}
type IJobStatus = 'READY' | 'WAITING' | 'RUNNING' | 'FAILED' | 'SUCCESS' | 'CANCELLED'
type IScript = IFile & { job?: IJob }
type IApplicationType = {
id: number
name: string
port: number
proxy: boolean
scheme: string
protocol: 'TCP' | 'UDP'
description: string
}
type IApplicationTypeGroup = Omit<IApplicationType, 'id'> & {
ids: number[]
}
type ISmartApplication = 'URL' | undefined
interface ICloudEvent {
sessionId: string
source: IConnectionSource
type:
| 'JOB'
| 'DEVICE_JOB'
| 'DEVICE_STATE'
| 'DEVICE_CONNECT'
| 'DEVICE_SHARE'
| 'DEVICE_TRANSFER'
| 'DEVICE_REFRESH'
| 'DEVICE_DELETE'
| 'LICENSE_UPDATED'
state: IDevice['state'] | 'connected' | 'disconnected'
action: 'add' | 'update' | 'remove'
timestamp: Timestamp
isP2P: boolean
actor: IUserRef
users: IUserRef[]
platform: number
authUserId: string
geo?: IGeo
reverseProxy: boolean
manufacturer?: number
manufacturerType: ISession['manufacturer']
metadata?: INotificationSetting
job?: {
id: string
status: IJobStatus
owner: { id: string }
jobDevice?: {
id: string
status: IJobStatus
device: { id: string }
}
target?: IJob
}
target: {
id: string
name: string
owner: IUserRef
accountId: string
typeID: IService['typeID']
platform: IDevice['targetPlatform']
deviceId: string
deviceCreated: Date
device?: IDevice
service?: IService
connection?: IConnection
}[]
// For license events
plan?: {
name: string
product: {
name: string
}
}
quantity?: number
expiration?: Date
owner?: IUserRef
}
interface IRoute {
key: IRouteType
icon: string
name: string
description: string
}
interface IPasswordValue {
currentPassword: string
password: string
}
interface IAccessKey {
key: string
enabled: boolean
created: Date
lastUsed: Date
}
type IRouteType = 'failover' | 'p2p' | 'proxy' | 'public'
interface IEvent {
shared: any
scripting: boolean
id: string
state?: IDevice['state']
timestamp: Date
type: IEventType
actor?: IUser
target?: {
id: string
name: string
device: { id: string; name: string }
}[]
users?: IUser[]
action: string
devices?: { id: string; name: string }[]
job?: { file?: { name: string } }
txBytes?: number
rxBytes?: number
lifetime?: number
}
type IEventType =
| 'AUTH_LOGIN'
| 'AUTH_LOGIN_ATTEMPT'
| 'AUTH_PASSWORD_RESET'
| 'AUTH_PHONE_CHANGE'
| 'AUTH_MFA_ENABLED'
| 'AUTH_MFA_DISABLED'
| 'LICENSE_UPDATED'
| 'DEVICE_STATE'
| 'DEVICE_CONNECT'
| 'DEVICE_DELETE'
| 'DEVICE_SHARE'
| 'DEVICE_REFRESH'
| 'DEVICE_TRANSFER'
| 'DEVICE_JOB'
| 'JOB'
interface IEventList {
total: number
last: string
items: IEvent[]
hasMore: boolean
deviceId?: string
}
type gqlOptions = {
tag?: ITagFilter
size: number
from: number
accountId: string
columns: string[]
state?: string
owner?: boolean
sort?: string
name?: string
applicationTypes?: number[]
platform?: number[]
deviceTimeSeries?: ITimeSeriesOptions
serviceTimeSeries?: ITimeSeriesOptions
}
interface IAppValidation {
install: string
loading: boolean
path: string
application: string
}
interface ILan {
oobAvailable: boolean
oobActive: boolean
}
type IScan = [string, [number, string][]] // address, port, type string
type IScanData = {
[networkName: string]: {
timestamp: Timestamp
data: IScan[]
}
}
type IOverrides = {
apiURL?: string
betaApiURL?: string
}
type IScanDataRaw = {
host: string
name: string
port: number
protocol: string
}
type ICloudAddService = {
deviceId: string
name: string
application: number
host: string
port: number
enabled: boolean
}
type ICloudUpdateService = {
id: string
name?: string
application?: number
host?: string
port?: number
enabled?: boolean
presenceAddress?: string
}
type ISimpleError = { code?: number; message: string }
type ErrorCallback = (error: Error) => void
type ILog = { [id: string]: string[] }
type IInterface = { [key: string]: any }
type IInterfaceType = 'Wired' | 'Wireless' | 'FireWire' | 'Thunderbolt' | 'Bluetooth' | 'Other'
type ipAddress = string // namespace to indicate if expecting an ip address
type Timestamp = number
type ISOTimestamp = string
type ipClass = 'A' | 'B' | 'C'
type IEvents = { [event: string]: string }
type ILookup<T, U extends string | symbol | number = string> = {
[K in U]: T
}
type INumberLookup<T> = { [key: number]: T }
type ISelect = {
key: string | number
name: string | number | React.ReactNode
description?: string
disabled?: boolean
}
type IGuide = {
step: number
total: number
done?: boolean
title?: string
active?: boolean
weight: number
}
type IPreferences = {
version: string
cliVersion: string
cliConfigVersion?: number
autoUpdate?: boolean
openAtLogin?: boolean
remoteUIOverride?: boolean
disableLocalNetwork?: boolean
allowPrerelease?: boolean
useCertificate?: boolean
switchApi?: boolean
apiURL?: string
apiGraphqlURL?: string
webSocketURL?: string
windowState?: { x?: number; y?: number; width: number; height: number }
disableDeepLinks?: boolean
sshConfig?: boolean
}
type SegmentContext = {
category?: string
appName?: string
appVersion?: string
systemOS?: string
systemOSVersion?: string
systemArch?: string
manufacturerId?: string
productVersion?: string
productId?: string