feat(bot): add guided private prompts

This commit is contained in:
2026-03-09 05:15:29 +04:00
parent fac2dc0e9d
commit 4e200b506a
11 changed files with 785 additions and 66 deletions

View File

@@ -0,0 +1,20 @@
export const TELEGRAM_PENDING_ACTION_TYPES = ['anonymous_feedback'] as const
export type TelegramPendingActionType = (typeof TELEGRAM_PENDING_ACTION_TYPES)[number]
export interface TelegramPendingActionRecord {
telegramUserId: string
telegramChatId: string
action: TelegramPendingActionType
payload: Record<string, unknown>
expiresAt: Date | null
}
export interface TelegramPendingActionRepository {
upsertPendingAction(input: TelegramPendingActionRecord): Promise<TelegramPendingActionRecord>
getPendingAction(
telegramChatId: string,
telegramUserId: string
): Promise<TelegramPendingActionRecord | null>
clearPendingAction(telegramChatId: string, telegramUserId: string): Promise<void>
}