Function to fetch the current state
Optional transformOptional transform function to normalize API response to event format
Optional shouldOptional function to determine if we should use the fetched state
Optional timeoutTimeout for waiting for events (ms)
Options for state-aware event subscriptions