ArchAstro. Channels. ApiActivityFeed
(archastro v0.2.0)
Copy Markdown
Phoenix channel for real-time activity feed updates.
Clients join a topic scoped to an agent or org and receive
new_entry events as feed entries are created.
Topics
"api:activity_feed:agent:{agent_user_id}"— entries for a specific agent"api:activity_feed:org:{org_id}"— entries for an entire org/tenant
Summary
Functions
@spec join_agent(GenServer.server(), String.t()) :: {:ok, ArchAstro.Channel.t()} | {:error, ArchAstro.Error.reason()}
@spec join_org(GenServer.server(), String.t()) :: {:ok, ArchAstro.Channel.t()} | {:error, ArchAstro.Error.reason()}
@spec leave(ArchAstro.Channel.t()) :: :ok | {:error, ArchAstro.Error.reason()}
list_entries(channel, payload \\ %ArchAstro.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Input{}, timeout \\ 5000)
@spec list_entries( ArchAstro.Channel.t(), ArchAstro.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Input.t(), timeout() ) :: {:ok, ArchAstro.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Response.t()} | {:error, ArchAstro.Error.reason()}
@spec subscribe_new_entry(ArchAstro.Channel.t(), pid()) :: :ok