mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-16 14:06:49 +01:00
21 lines
461 B
TypeScript
21 lines
461 B
TypeScript
import { invoke } from '@tauri-apps/api';
|
|
|
|
export function trackEvent(
|
|
resource:
|
|
| 'App'
|
|
| 'Workspace'
|
|
| 'Environment'
|
|
| 'Folder'
|
|
| 'HttpRequest'
|
|
| 'HttpResponse'
|
|
| 'KeyValue',
|
|
action: 'Launch' | 'Create' | 'Update' | 'Delete' | 'DeleteMany' | 'Send' | 'Duplicate',
|
|
attributes: Record<string, string | number> = {},
|
|
) {
|
|
invoke('track_event', {
|
|
resource: resource,
|
|
action,
|
|
attributes,
|
|
}).catch(console.error);
|
|
}
|