diff --git a/frontend/src/types/widgets.ts b/frontend/src/types/widgets.ts new file mode 100644 index 0000000..e654af6 --- /dev/null +++ b/frontend/src/types/widgets.ts @@ -0,0 +1,41 @@ +export type WidgetKind = + | 'clock' + | 'date' + | 'weather' + | 'music' + | 'wallet' + | 'transactions' + | 'contacts' + +export type WidgetSize = 'small' | 'medium' | 'large' + +export type WidgetSettings = { + balanceSource?: 'bank' | 'cash' + contactIds?: string[] + showDate?: boolean +} + +export type WidgetInstance = { + column: number + id: string + kind: WidgetKind + page: number + row: number + settings: WidgetSettings + size: WidgetSize +} + +export type WidgetLayout = { + instances: WidgetInstance[] + version: 1 +} + +export type WidgetDefinition = { + categoryKey: string + configurable: boolean + defaultSize: WidgetSize + descriptionKey: string + kind: WidgetKind + labelKey: string + supportedSizes: WidgetSize[] +}