move workspace context interface to workspace lib

This commit is contained in:
Mads Rasmussen
2023-03-24 13:23:46 +01:00
parent 50af17385c
commit fd05ff7637
6 changed files with 5 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
import { Observable } from 'rxjs';
import { UmbControllerHostInterface } from '@umbraco-cms/backoffice/controller';
export interface UmbWorkspaceContextInterface<T = unknown> {
host: UmbControllerHostInterface;
repository: any; // TODO: add type
isNew: Observable<boolean>;
getIsNew(): boolean;
setIsNew(value: boolean): void;
// TODO: should we consider another name than entity type. File system files are not entities but still have this type.
getEntityType(): string;
getData(): T;
destroy(): void;
// TODO: temp solution to bubble validation errors to the UI
setValidationErrors?(errorMap: any): void;
}