38 lines
637 B
TypeScript
38 lines
637 B
TypeScript
import type { IValue } from '@upnd/upend/types';
|
|
|
|
export type WidgetOperation =
|
|
| AttributeCreate
|
|
| AttributeUpsert
|
|
| AttributeDelete
|
|
| EntryInAdd
|
|
| EntryInDelete;
|
|
|
|
export type WidgetChange = WidgetOperation | WidgetOperation[];
|
|
|
|
export interface AttributeCreate {
|
|
type: 'create';
|
|
attribute: string;
|
|
value: IValue;
|
|
}
|
|
|
|
export interface AttributeUpsert {
|
|
type: 'upsert';
|
|
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;
|
|
}
|