mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 06:04:02 +00:00
fix(bot): harden webhook processing and purchase defaults
This commit is contained in:
21
packages/ports/src/processed-bot-messages.ts
Normal file
21
packages/ports/src/processed-bot-messages.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export interface ClaimProcessedBotMessageInput {
|
||||
householdId: string
|
||||
source: string
|
||||
sourceMessageKey: string
|
||||
payloadHash?: string | null
|
||||
}
|
||||
|
||||
export interface ClaimProcessedBotMessageResult {
|
||||
claimed: boolean
|
||||
}
|
||||
|
||||
export interface ReleaseProcessedBotMessageInput {
|
||||
householdId: string
|
||||
source: string
|
||||
sourceMessageKey: string
|
||||
}
|
||||
|
||||
export interface ProcessedBotMessageRepository {
|
||||
claimMessage(input: ClaimProcessedBotMessageInput): Promise<ClaimProcessedBotMessageResult>
|
||||
releaseMessage(input: ReleaseProcessedBotMessageInput): Promise<void>
|
||||
}
|
||||
Reference in New Issue
Block a user