mirror of
https://github.com/tale/headplane.git
synced 2026-08-08 13:23:13 +00:00
17 lines
455 B
TypeScript
17 lines
455 B
TypeScript
import type { RuntimeApiClient } from "~/server/headscale/api/endpoints";
|
|
|
|
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: RuntimeApiClient): Promise<void> | void;
|
|
abstract get name(): string;
|
|
}
|