Implement Store analytics and api integrations
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
StoreResponse,
|
||||
OutstandingBalanceResponse,
|
||||
StoreDashboardResponse,
|
||||
StoreAnalyticsResponse,
|
||||
StoreVisitHistoryItem,
|
||||
} from '@/types/api'
|
||||
|
||||
@@ -51,6 +52,8 @@ export const stores = {
|
||||
|
||||
dashboard: (id: string, period?: string) =>
|
||||
api.get<StoreDashboardResponse>(`/stores/${id}/dashboard`, { params: { period } }).then(r => r.data),
|
||||
analytics: (id: string, months = 12) =>
|
||||
api.get<StoreAnalyticsResponse>(`/stores/${id}/analytics`, { params: { months } }).then(r => r.data),
|
||||
visitHistory: (id: string) =>
|
||||
api.get<StoreVisitHistoryItem[]>(`/stores/${id}/visit-history`).then(r => r.data),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user