Interface: StatusUpdateHandlerOptions
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:52
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:60
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:68
Function to get current sites array.
Returnsโ
Site[]
Remarksโ
Should return the current state of sites from the store.
onUpdate()?โ
optionalonUpdate: (update:StatusUpdate) =>void
Defined in: src/stores/sites/utils/statusUpdateHandler.ts:77
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:85
Function to set sites array in store.
Parametersโ
sitesโ
Site[]
Returnsโ
void
Remarksโ
Should update the store with the new sites array.