import { AuxilaryActions, ItemActions, ItemReactions } from '../enum'; export interface ItemPayload { id: string; [id: string]: any; } export interface AddPayload { items: ItemPayload[]; } export interface UpdatePayload { updates: ItemPayload[]; } export interface DeletePayload { ids: string[]; } export type ActionPayload = AddPayload | UpdatePayload | DeletePayload; export interface ClientMessage { msg: ItemActions | AuxilaryActions; client_id: string; bucket: string; payload: T; } export interface ServerMessage { msg: ItemReactions; bucket: string; payload: T; }