import { Platform as pushwoosh_statistics_types_Platform } from './pushwoosh_statistics_types'; import { DateRange as pushwoosh_statistics_types_DateRange } from './pushwoosh_statistics_types'; /** * Metrics carries the numbers shown on the in-app statistics screen in the * Control Panel. Uniques are HyperLogLog estimates: platform rows never sum up * to the in-app total, because a device counts once per platform it uses. */ export type Metrics = { impressions: number; uniqueImpressions: number; interactions: number; uniqueInteractions: number; skips: number; audience: number; }; export type PlatformMetrics = { platform: pushwoosh_statistics_types_Platform; metrics: Metrics; }; /** * FrequencyCapping reports in-apps suppressed by capping rules. Suppression data * starts at data_available_from; earlier days are not covered and the block comes * back empty for a period that ends before that date. */ export type FrequencyCapping = { suppressions: number; affectedUsers: number; dataAvailableFrom: string; }; export type InappInfo = { code: string; name: string; status: string; richMediaCode: string; }; /** * ImpressionDuration is one bucket of the impression duration histogram, * to_seconds = 0 means "and longer". */ export type ImpressionDuration = { fromSeconds: number; toSeconds: number; count: number; }; export type GetTotalsRequest = { application: string; dateRange: pushwoosh_statistics_types_DateRange; inappCodes: string[]; platforms: pushwoosh_statistics_types_Platform[]; withPlatforms: boolean; page: number; perPage: number; }; export type InappTotals = { inapp: InappInfo; metrics: Metrics; platforms: PlatformMetrics[]; frequencyCapping: FrequencyCapping; }; export type GetTotalsResponse = { total: number; page: number; perPage: number; items: InappTotals[]; }; export type GetTimelineRequest = { application: string; inappCode: string; dateRange: pushwoosh_statistics_types_DateRange; platforms: pushwoosh_statistics_types_Platform[]; withPlatforms: boolean; }; export type TimelineRow = { /** Bucket start in UTC, RFC3339. */ timestamp: string; metrics: Metrics; platforms: PlatformMetrics[]; }; export type GetTimelineResponse = { inapp: InappInfo; totals: Metrics; platforms: PlatformMetrics[]; frequencyCapping: FrequencyCapping; rows: TimelineRow[]; impressionDuration: ImpressionDuration[]; };