Merge a schedule-block transition payload into
lastScheduleTransitions[campaignID], overwriting any prior entry.
Called from _updateTickData when the tick carries a
scheduleTransition field.
Internal connect trigger — set by connect() / disconnect().
Merge an incoming campaign row into the store.
By default, amount_raised / total_amount_raised are guarded by a
monotonic-increase rule: an incoming value lower than the currently
stored one is silently discarded (defends against out-of-order
Tiltify webhooks blipping the top total down).
Pass { allowDecrease: true } to bypass that guard — required for
operator-initiated rewinds (e.g. the GreenRoom
POST /_admin/tiltify/campaigns/:id/reset-donations endpoint,
which broadcasts fact_updated with sourceType: "reset" and
relies on the client actually applying the lower value).
Replace leaderboardExclusions[campaignID] with a fresh list.
Used by the updateLeaderboardExclusions realtime push. The server
sends the full current list on every mutation so the client can
treat this as a wholesale replace — no diff, no per-row merge.
Pass an empty array to clear all exclusions for the campaign.
Replace leaderboardEntries[campaignID] with a fresh top-N list.
Used by the updateLeaderboard realtime push. The store keeps
one flat entry per campaign because each connection subscribes to
a single leaderboardTimeType at a time — the server sends the
right slice per connection.
Id-merge poll into polls[campaignID] and, when provided, record
deltas under lastPollDeltas[poll.id]. Used by the updatePoll
realtime push. Creates the campaign's polls array if absent.
Replace schedules[campaignID] with a fresh full schedule. Used
by the updateSchedule realtime push. The server sends the full
ordered array on every mutation so the client treats this as a
wholesale replace — no diff, no per-block merge. Pass an empty
array to clear the campaign's schedule.
Fresh read of the latest schedule-block transition for a campaign,
or null if none has been observed since the store was created /
reset. Convenience wrapper over
store.getState().lastScheduleTransitions[campaignID].
Fresh read of the current exclusion list for a campaign. Returns an empty array when the server has not published one yet.
Fresh read of the last server-pushed schedule for a campaign. Returns an empty array when the server has not pushed one yet (fresh connection pre-identify, or campaign genuinely has no schedule). Same convention as getLeaderboardExclusions.
Wired by createPipelineConnection. No-op before then.
Last admin-only webhook firehose message received.
Latest server-computed deltas per poll, keyed by poll.id.
Written by _updatePollForCampaign on every realtime updatePoll
push. Absent for polls that have only ever arrived via tick
(no prior snapshot to diff against on first push).
Latest schedule-block transition per campaign, keyed by
campaignID. Written by _updateTickData (and its callee
_processScheduleTransition) whenever a tick payload carries a
scheduleTransition field. Steady-state ticks never mutate this
map — the pipeline-side emitter only sends transitions on boundary
crossings.
Consumers subscribe via usePipelineLastScheduleTransition /
useOnScheduleTransition from @playlive/react-pipeline.
Latest server-published exclusion list per campaign, keyed by
campaignID. Replaced wholesale on each updateLeaderboardExclusions
push (see _updateLeaderboardExclusionsForCampaign). Overlays
that render off the WS leaderboardEntries slice should subtract
this list client-side so a freshly-added exclusion takes effect
without waiting for the next REST refetch cycle.
Consumers subscribe via usePipelineLeaderboardExclusions /
useOnLeaderboardExclusionsChange from @playlive/react-pipeline.
Wired by createPipelineConnection. Admin-only.
Latest server-published full schedule per campaign, keyed by
campaignID. Replaced wholesale on each updateSchedule push
(see _updateScheduleForCampaign). Empty array means the
campaign has no schedule; absent key means the server has not
pushed one yet.
Introduced in Phase 35. The Phase 34 lastScheduleTransitions
slice still tracks boundary crossings (current + next only) and
is unaffected; consumers that want a full array should prefer
this slice via usePipelineSchedule from
@playlive/react-pipeline. useLiveSchedule (fusion) reads this
slice first and only falls back to the transition-derived synthesis
or REST when it's absent — the wholesale replace preserves that
fallback order without leaking stale state on re-identify (see
reset).
Public store surface. Every field is read directly from
store.getState(); every action is invoked viastore.getState().setX(...).Action surface is split into three tiers:
connect,disconnect,identify,refresh,setCurrentURL,setAutoConnect,setAdminApiKey,setCurrentType.addCampaign(ID),addFundraisingEvent(ID),updateTiltifySettings,setOverlayInfo,setTwitchUsername, feature-flag toggles,reset._) — wired by thecreatePipelineConnectionfactory only; consumers should never call these directly.