Files
reply-end-controls/src/types.ts

40 lines
838 B
TypeScript

export type ReplyEndChoice = "continue" | "stop"
export type ReplyEndState = {
lastChoice: ReplyEndChoice
lastChoiceAt: string
sourceMessageId: string
sourceCallbackId: string
active: boolean
}
export type ReplyEndStateMap = Record<string, ReplyEndState>
export type NormalizedReplyEndEvent = {
choice: ReplyEndChoice
conversationId: string
sessionKey: string | null
sourceMessageId: string
sourceCallbackId: string
channel: "telegram"
timestamp: string
}
export type TelegramInlineButton = {
text: string
callback_data: string
}
export type TelegramInlineKeyboardMarkup = {
inline_keyboard: TelegramInlineButton[][]
}
export type ReplyEndPolicyInput = {
state: ReplyEndState | null
hasTypedUserFollowup: boolean
}
export type ReplyEndPolicyDecision = {
suppressProactiveContinuation: boolean
}