2024-01-22 22:58:55 +01:00
|
|
|
import type { IValue } from '@upnd/upend/types';
|
2022-01-09 21:24:49 +01:00
|
|
|
|
2024-02-06 22:32:10 +01:00
|
|
|
export type WidgetOperation =
|
2024-01-22 22:58:55 +01:00
|
|
|
| AttributeCreate
|
2024-02-06 22:32:10 +01:00
|
|
|
| AttributeUpsert
|
2024-01-22 22:58:55 +01:00
|
|
|
| AttributeDelete
|
|
|
|
| EntryInAdd
|
|
|
|
| EntryInDelete;
|
2021-12-02 18:45:29 +01:00
|
|
|
|
2024-02-06 22:32:10 +01:00
|
|
|
export type WidgetChange = WidgetOperation | WidgetOperation[];
|
|
|
|
|
2021-12-02 18:45:29 +01:00
|
|
|
export interface AttributeCreate {
|
2024-01-22 22:58:55 +01:00
|
|
|
type: 'create';
|
|
|
|
attribute: string;
|
|
|
|
value: IValue;
|
2021-12-02 18:45:29 +01:00
|
|
|
}
|
|
|
|
|
2024-02-06 22:32:10 +01:00
|
|
|
export interface AttributeUpsert {
|
|
|
|
type: 'upsert';
|
2024-01-22 22:58:55 +01:00
|
|
|
attribute: string;
|
|
|
|
value: IValue;
|
2021-12-02 18:45:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AttributeDelete {
|
2024-01-22 22:58:55 +01:00
|
|
|
type: 'delete';
|
|
|
|
address: string;
|
2022-01-09 21:24:49 +01:00
|
|
|
}
|
2023-09-07 18:57:45 +02:00
|
|
|
|
|
|
|
export interface EntryInAdd {
|
2024-01-22 22:58:55 +01:00
|
|
|
type: 'entry-add';
|
|
|
|
address: string;
|
2023-09-07 18:57:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface EntryInDelete {
|
2024-01-22 22:58:55 +01:00
|
|
|
type: 'entry-delete';
|
|
|
|
address: string;
|
2023-09-07 18:57:45 +02:00
|
|
|
}
|