feat(purchase): add per-purchase participant splits

This commit is contained in:
2026-03-11 14:34:27 +04:00
parent 98988159eb
commit 8401688032
26 changed files with 5050 additions and 114 deletions

View File

@@ -397,7 +397,15 @@ function createPurchaseRepository(): PurchaseMessageIngestionRepository {
parsedCurrency: 'GEL' as const,
parsedItemDescription: 'door handle',
parserConfidence: 92,
parserMode: 'llm' as const
parserMode: 'llm' as const,
participants: [
{
id: 'participant-1',
memberId: 'member-1',
displayName: 'Mia',
included: true
}
]
}
}
@@ -433,7 +441,15 @@ function createPurchaseRepository(): PurchaseMessageIngestionRepository {
parsedCurrency: 'GEL' as const,
parsedItemDescription: 'sausages',
parserConfidence: 88,
parserMode: 'llm' as const
parserMode: 'llm' as const,
participants: [
{
id: 'participant-1',
memberId: 'member-1',
displayName: 'Mia',
included: true
}
]
}
}
@@ -535,6 +551,9 @@ function createPurchaseRepository(): PurchaseMessageIngestionRepository {
parserConfidence: 92,
parserMode: 'llm' as const
}
},
async toggleParticipant() {
throw new Error('not used')
}
}
}
@@ -768,7 +787,8 @@ describe('registerDmAssistant', () => {
method: 'sendMessage',
payload: {
chat_id: 123456,
text: 'I think this shared purchase was: door handle - 30.00 GEL. Confirm or cancel below.',
text: `I think this shared purchase was: door handle - 30.00 GEL.
Confirm or cancel below.`,
reply_markup: {
inline_keyboard: [
[
@@ -830,7 +850,8 @@ describe('registerDmAssistant', () => {
method: 'sendMessage',
payload: {
chat_id: 123456,
text: 'I think this shared purchase was: sausages - 45.00 GEL. Confirm or cancel below.',
text: `I think this shared purchase was: sausages - 45.00 GEL.
Confirm or cancel below.`,
reply_markup: {
inline_keyboard: [
[