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

38 lines
637 B
TypeScript
Raw Normal View History

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