Show other-pages stats and store-specials AI matching.

Add the Statistics pages row for static_page views, wire specials AI match UI, and tidy Businesses page styles.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-16 17:33:44 +03:30
co-authored by Cursor
parent 9ce93b0b48
commit 652f4d07b6
11 changed files with 1195 additions and 22 deletions
@@ -64,3 +64,38 @@ export async function deleteStoreSpecial(specialId: string) {
auth: true,
})
}
export interface SpecialItemsAiMatchCandidate {
storeItemId: string
productId: string
productTitle: string
productNameFa: string
productImage: string | null
variantId: string
variantLabel: string
currentPrice: number | null
score: number
}
export interface SpecialItemsAiMatchRow {
lineIndex: number
raw: string
price: number | null
selected: boolean
updatePrice: boolean
confidence: number
reason: string | null
candidate: SpecialItemsAiMatchCandidate | null
}
export async function matchStoreSpecialListWithAi(text: string, signal?: AbortSignal) {
return apiRequest<{ message: string; matches: SpecialItemsAiMatchRow[] }>(
businessPath('/ai-match'),
{
method: 'POST',
auth: true,
body: { text },
signal,
},
)
}