games_app/backend/dist/repositories/reportsRepository.d.ts
2026-06-29 15:01:23 +02:00

36 lines
1.1 KiB
TypeScript

export type ReportQueryOptions = {
search?: string;
from?: string;
to?: string;
sortBy?: string;
sortDir?: 'asc' | 'desc';
limit: number;
offset?: number;
cursor?: string;
includeTotal?: boolean;
/** Extra filters from report preset (status, isAuto, etc.) */
preset?: Record<string, string | boolean | number>;
/** When set, return only rows whose primary key is in this list */
ids?: string[];
};
export type ReportSummary = {
totalCount?: number;
uniqueUsers?: number;
totalAmountRaw?: number;
};
export type ReportPageResult = {
items: Record<string, unknown>[];
total: number;
columns: {
field: string;
headerName: string;
type?: string;
}[];
nextCursor?: string | null;
hasMore?: boolean;
totalIsExact?: boolean;
summary?: ReportSummary;
};
export declare function runReport(reportKey: string, options: ReportQueryOptions): Promise<ReportPageResult>;
export declare function exportReportRows(reportKey: string, options: ReportQueryOptions): Promise<ReportPageResult>;
//# sourceMappingURL=reportsRepository.d.ts.map