Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions src/archastro/platform/channels/api_activity_feed_channel.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
# This file is auto-generated by @archastro/sdk-generator. Do not edit.
# Content hash: dd35ef8c137c
# Content hash: 12874ed2facb

from typing import TYPE_CHECKING
from collections.abc import Callable
from typing import TYPE_CHECKING, TypedDict

if TYPE_CHECKING:
from archastro.phx_channel.socket import Socket


# List activity feed entries with cursor-based pagination
class ListEntriesInput(TypedDict, total=False):
after_cursor: str
before_cursor: str
kind: str
level: str
limit: int


class NewEntryPayload(TypedDict, total=False):
entry: dict[str, object] | None


# 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.
Expand Down Expand Up @@ -50,8 +64,8 @@ async def leave(self):
await self._channel.leave()

# List activity feed entries with cursor-based pagination
async def list_entries(self, payload: dict) -> dict:
async def list_entries(self, payload: ListEntriesInput) -> dict[str, object]:
return await self._channel.push("list_entries", payload)

def on_new_entry(self, callback):
def on_new_entry(self, callback: Callable[[NewEntryPayload], None]) -> Callable[[], None]:
return self._channel.on("new_entry", callback)
Loading
Loading