Interface: StatusUpdateHandlerOptions
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:47
Configuration options for status update handler operations.
Remarksโ
Defines the required dependencies and callbacks for managing status update subscriptions. All functions should be stable references to avoid unnecessary re-subscriptions.
Propertiesโ
fullResyncSitesโ
fullResyncSites: () => Promise<void>;
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:55
Function to trigger full sync from backend.
Returnsโ
Promise<void>
Remarksโ
Called when incremental updates fail or when a complete refresh is needed.
getSitesโ
getSites: () => Site[];
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:63
Function to get current sites array.
Returnsโ
Site[]
Remarksโ
Should return the current state of sites from the store.
onUpdate?โ
optional onUpdate?: (update: StatusUpdate) => void;
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:72
Optional callback for additional processing of updates.
Parametersโ
updateโ
Returnsโ
void
Remarksโ
Called before applying the update to the store. Can be used for logging or side effects.
setSitesโ
setSites: (sites: Site[]) => void;
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:80
Function to set sites array in store.
Parametersโ
sitesโ
Site[]
Returnsโ
void
Remarksโ
Should update the store with the new sites array.