feat: reimplement integrations
This commit is contained in:
parent
f982217dd0
commit
25e6410c65
13 changed files with 400 additions and 238 deletions
14
app/utils/integration/abstract.ts
Normal file
14
app/utils/integration/abstract.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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(): Promise<void> | void;
|
||||
abstract get name(): string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue