fix: fix integrations not loading

This commit is contained in:
Aarnav Tale
2025-04-02 21:29:00 -04:00
parent d5fb8a2966
commit 1fb084451d
12 changed files with 184 additions and 202 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { ApiClient } from '~/server/headscale/api-client';
export abstract class Integration<T> {
protected context: NonNullable<T>;
constructor(context: T) {
if (!context) {
throw new Error('Missing integration context');
}
this.context = context;
}
abstract isAvailable(): Promise<boolean> | boolean;
abstract onConfigChange(client: ApiClient): Promise<void> | void;
abstract get name(): string;
}