forked from ospfranco/sol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.d.ts
109 lines (98 loc) · 2.33 KB
/
globals.d.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
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
/// <reference types="nativewind/types" />
interface INativeEvent {
id: string
title?: string
url?: string
date: string
endDate: string
isAllDay: boolean
notes: string
color: string
location: string
eventStatus: number // 0 none, 1 confirmed, 2 tentative, 3 cancelled
status: number // 0 none, 1 confirmed, 2 tentative, 3 cancelled
declined: boolean
eventLink?: string | null // Computed
}
declare module '*.png' {
const value: import('react-native').ImageSourcePropType
export default value
}
declare module '*.jpeg' {
const value: import('react-native').ImageSourcePropType
export default value
}
type CalendarAuthorizationStatus =
| 'notDetermined'
| 'restricted'
| 'denied'
| 'authorized'
declare var global: {
__SolProxy: {
setHeight: (height: number) => void
resetWindowSize: () => void
hideWindow: () => void
// searchFiles: (query: string) => void
requestCalendarAccess: () => Promise<void>
getCalendarAuthorizationStatus: () => CalendarAuthorizationStatus
getEvents: () => INativeEvent[]
ls: (path: string) => string[]
exists: (path: string) => boolean
readFile: (path: string) => string
userName: () => string
ps: () => string
killProcess: (pid: string) => void
getWifiPassword: () => string | null
getWifiInfo: () => {ip: string | undefined}
}
}
interface Notification {
title: string | undefined
text: string | undefined
app: string | undefined
url: string | undefined
date: number
iden: string | undefined
subt: string | undefined
}
interface IPeriod {
id: number
start: number
end?: number
}
interface FileDescription {
filename: string
path: string
kind: string
location: string
}
interface ITrackingProject {
id: string
name: string
periods: IPeriod[]
}
interface Item {
icon?: string
iconImage?: ImageURISource | number | ImageURISource[]
IconComponent?: FC<any>
color?: string
url?: string
preventClose?: boolean
type: ItemType
name: string
alias?: string
subName?: string
callback?: () => void
metaCallback?: () => void
isApplescript?: boolean
text?: string
shortcut?: string
isFavorite?: boolean // injected in UI array
isRunning?: boolean // only apps have this
}
type OnboardingStep =
| 'v1_start'
| 'v1_shortcut'
| 'v1_quick_actions'
| 'v1_skipped'
| 'v1_completed'