refactor: add workspace events (#1838)

This commit is contained in:
Himself65
2023-04-06 16:14:23 -05:00
committed by GitHub
parent b6bdf257e4
commit 5ac36b6f0a
13 changed files with 105 additions and 71 deletions

View File

@@ -128,3 +128,13 @@ export interface WorkspaceUISchema<Flavour extends keyof WorkspaceRegistry> {
SettingsDetail: FC<SettingProps<Flavour>>;
Provider: FC<PropsWithChildren>;
}
export interface AppEvents {
// event when app is first initialized
// usually used to initialize workspace plugin
'app:first-init': () => Promise<void>;
// request to gain access to workspace plugin
'workspace:access': () => Promise<void>;
// request to revoke access to workspace plugin
'workspace:revoke': () => Promise<void>;
}