upend/webui/src/lib/types/base.ts

36 lines
569 B
TypeScript

import type { IValue } from '@upnd/upend/types';
export type WidgetChange =
| AttributeCreate
| AttributeUpdate
| AttributeDelete
| EntryInAdd
| EntryInDelete;
export interface AttributeCreate {
type: 'create';
attribute: string;
value: IValue;
}
export interface AttributeUpdate {
type: 'update';
attribute: string;
value: IValue;
}
export interface AttributeDelete {
type: 'delete';
address: string;
}
export interface EntryInAdd {
type: 'entry-add';
address: string;
}
export interface EntryInDelete {
type: 'entry-delete';
address: string;
}