-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbindings.ts
35 lines (26 loc) · 931 Bytes
/
bindings.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
// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually.
declare global {
interface Window {
__TAURI_INVOKE__<T>(cmd: string, args?: Record<string, unknown>): Promise<T>;
}
}
const invoke = window.__TAURI_INVOKE__;
export function errorPopup(msg: string) {
return invoke<null>("error_popup", { msg })
}
export function hide() {
return invoke<null>("hide")
}
export function newGroup(group: Group) {
return invoke<Group[]>("new_group", { group })
}
export function getGroups() {
return invoke<Group[]>("get_groups")
}
export function updateGroup(group: Group) {
return invoke<Group[]>("update_group", { group })
}
export function deleteGroup(index: number) {
return invoke<Group[]>("delete_group", { index })
}
export type Group = { title: string; description: string; enabled: boolean; id: string; cron: string }