import type { Instant } from '@household/domain' export const TELEGRAM_PENDING_ACTION_TYPES = [ 'anonymous_feedback', 'assistant_payment_confirmation', 'household_group_invite', 'payment_topic_clarification', 'payment_topic_confirmation', 'reminder_utility_entry', 'setup_topic_binding' ] as const export type TelegramPendingActionType = (typeof TELEGRAM_PENDING_ACTION_TYPES)[number] export interface TelegramPendingActionRecord { telegramUserId: string telegramChatId: string action: TelegramPendingActionType payload: Record expiresAt: Instant | null } export interface TelegramPendingActionRepository { upsertPendingAction(input: TelegramPendingActionRecord): Promise getPendingAction( telegramChatId: string, telegramUserId: string ): Promise clearPendingAction(telegramChatId: string, telegramUserId: string): Promise clearPendingActionsForChat( telegramChatId: string, action?: TelegramPendingActionType ): Promise }