Download src/interfaces/repository/IAnalyticsRepository.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 889 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IAnalyticsRepository.ts
- Command line
-
hf download hf://spaces/lynfera/api@c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IAnalyticsRepository.ts
-
curl -L -o IAnalyticsRepository.ts https://huggingface.co/spaces/lynfera/api/resolve/c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IAnalyticsRepository.ts
889 Bytes
| import { BufferAnalytics } from "@/models/Analytics.js"; | |
| export interface QueryOptions { | |
| range?: number; | |
| rangeUnit?: string; | |
| interval?: number; | |
| intervalUnit?: string; | |
| limit?: number; | |
| } | |
| export interface IAnalyticsRepository { | |
| insertBatch(data: BufferAnalytics[]): Promise<void>; | |
| insertSingle(data: BufferAnalytics): Promise<void>; | |
| clearProjectAnalytics(projectId: string): Promise<void>; | |
| getBandwidth(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| getOverview(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| getRealtime(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| getTopPages(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| getOsStats(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| getBrowserStats(projectId: string, queryOptions: QueryOptions): Promise<unknown[]>; | |
| } | |