返回 CodeWhale
report-active-installs.d.mts
根目录 / telemetry-ingest / scripts / report-active-installs.d.mts
1 export interface ActiveInstallsRow {
2 day: string;
3 active_installs: number;
4 sessions_started: number;
5 }
6
7 export interface ReportArgs {
8 days: number;
9 json: boolean;
10 }
11
12 export interface TrendSummary {
13 last7: number | null;
14 previous7: number | null;
15 changePct: number | null;
16 }
17
18 export interface FormatReportOptions {
19 days: number;
20 now?: Date;
21 newestEvent?: Date | null;
22 }
23
24 export const COVERAGE_CAVEATS: readonly string[];
25 export function parseArgs(argv: string[]): ReportArgs;
26 export function activeInstallsSql(days: number): string;
27 export function freshnessSql(): string;
28 export function rowsFromResponse(payload: unknown): ActiveInstallsRow[];
29 export function newestEventFromResponse(payload: unknown): Date | null;
30 export function formatAge(ms: number): string;
31 export function trendSummary(
32 rows: ActiveInstallsRow[],
33 days: number,
34 now?: Date,
35 ): TrendSummary;
36 export function formatReport(
37 rows: ActiveInstallsRow[],
38 options?: FormatReportOptions,
39 ): string;
40 export function main(argv?: string[], env?: NodeJS.ProcessEnv): Promise<void>;
41 export function runCli(label: string): void;
42
42 lines Plain Text