feat(TALE-7): reimplement integration system
This commit is contained in:
parent
3cc726320a
commit
0aa0406ea6
6 changed files with 356 additions and 375 deletions
14
app/integration/integration.ts
Normal file
14
app/integration/integration.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export interface IntegrationFactory<T = any> {
|
||||
name: string
|
||||
context: T
|
||||
isAvailable: (context: T) => Promise<boolean> | boolean
|
||||
onAclChange?: (context: T) => Promise<void> | void
|
||||
onConfigChange?: (context: T) => Promise<void> | void
|
||||
}
|
||||
|
||||
export function createIntegration<T>(
|
||||
options: IntegrationFactory<T>,
|
||||
) {
|
||||
return options
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue