Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/libs/workspace/context/workspace-context.interface.ts
Niels Lyngsø 5f884c2004 remove dublet
2023-04-12 11:17:43 +02:00

18 lines
691 B
TypeScript

import { Observable } from 'rxjs';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
export interface UmbWorkspaceContextInterface<DataType = unknown> {
host: UmbControllerHostElement;
repository: any; // TODO: add type
isNew: Observable<boolean | undefined>;
getIsNew(): boolean | undefined;
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(): DataType | undefined;
save(): Promise<void>;
destroy(): void;
// TODO: temp solution to bubble validation errors to the UI
setValidationErrors?(errorMap: any): void;
}