ArchAstro. SDK. Channels. ApiActivityFeed
(archastro v0.3.2)
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.SDK.Channel.t()} | {:error, ArchAstro.SDK.Error.reason()}
@spec join_org(GenServer.server(), String.t()) :: {:ok, ArchAstro.SDK.Channel.t()} | {:error, ArchAstro.SDK.Error.reason()}
@spec leave(ArchAstro.SDK.Channel.t()) :: :ok | {:error, ArchAstro.SDK.Error.reason()}
list_entries(channel, payload \\ %ArchAstro.SDK.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Input{}, timeout \\ 5000)
@spec list_entries( ArchAstro.SDK.Channel.t(), ArchAstro.SDK.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Input.t(), timeout() ) :: {:ok, ArchAstro.SDK.Types.ChannelPayloads.ApiActivityFeedChannel.ListEntries.Response.t()} | {:error, ArchAstro.SDK.Error.reason()}
@spec subscribe_new_entry(ArchAstro.SDK.Channel.t(), pid()) :: :ok