notifications
feishu.gateway.notifications
¶
EventMessageStore
¶
Bases: Protocol
Stores the Feishu message ID associated with an event ID.
源代码位于: feishu/gateway/notifications.py
get
¶
InMemoryEventMessageStore
¶
Process-local event_id -> message_id store.
源代码位于: feishu/gateway/notifications.py
JsonFileEventMessageStore
¶
Small JSON-file store for event_id -> message_id state.
源代码位于: feishu/gateway/notifications.py
InteractiveCardDelivery
dataclass
¶
Result of creating or updating an event-keyed interactive card.
源代码位于: feishu/gateway/notifications.py
deterministic_uuid
¶
Return a deterministic Feishu idempotency UUID for an event.
upsert_interactive_card
async
¶
Python
upsert_interactive_card(client: Any, event_id: str, card: dict[str, Any], receive_id: str, *, store: EventMessageStore, receive_id_type: str = 'chat_id', uuid_prefix: str = 'event-') -> InteractiveCardDelivery
Create an interactive card, or patch the prior card for the same event.
The store provides durable event_id -> message_id state. A repeat
event patches the previously delivered Feishu card rather than posting a
duplicate message.