| 1 |
import type { SnippetScope, SnippetType } from './Snippet' |
| 2 |
|
| 3 |
export type InsightsChartKey = 'total' | InsightsConfigurableChartKey |
| 4 |
|
| 5 |
export type InsightsConfigurableChartKey = 'type' | 'activation' | 'conditions' | 'location' | 'tags' |
| 6 |
|
| 7 |
export type InsightsChartView = 'pie' | 'bar' | 'cloud' |
| 8 |
|
| 9 |
export type InsightsChartViews = Readonly<{ |
| 10 |
type: 'pie' | 'bar' |
| 11 |
activation: 'pie' | 'bar' |
| 12 |
conditions: 'pie' | 'bar' |
| 13 |
location: 'pie' | 'bar' |
| 14 |
tags: 'bar' | 'cloud' |
| 15 |
}> |
| 16 |
|
| 17 |
export interface InsightsChartEntry { |
| 18 |
readonly label: string |
| 19 |
readonly count: number | string |
| 20 |
readonly url?: string |
| 21 |
} |
| 22 |
|
| 23 |
export interface InsightsSummary { |
| 24 |
readonly active: number | string |
| 25 |
readonly inactive: number | string |
| 26 |
readonly typeCounts: Readonly<Record<SnippetType, InsightsChartEntry>> |
| 27 |
readonly conditionCounts: Readonly<Record<string, InsightsChartEntry>> |
| 28 |
readonly locationCounts: Readonly<Record<SnippetScope, number>> |
| 29 |
readonly tagCounts: Readonly<Record<string, InsightsChartEntry>> |
| 30 |
} |
| 31 |
|
| 32 |
export interface InsightChartPreferencesSchema { |
| 33 |
views: InsightsChartViews |
| 34 |
} |
| 35 |
|