chore: add all endpoint response types in react
This commit is contained in:
@@ -29,11 +29,34 @@ type UserAnalysisResponse = {
|
|||||||
users: User[];
|
users: User[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Time Analysis
|
||||||
|
type EventsPerDay = {
|
||||||
|
date: Date;
|
||||||
|
count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
type HeatmapCell = {
|
||||||
|
date: Date;
|
||||||
|
hour: number;
|
||||||
|
count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
type TimeAnalysisResponse = {
|
||||||
|
events_per_day: EventsPerDay[];
|
||||||
|
weekday_hour_heatmap: HeatmapCell[];
|
||||||
|
burstiness: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Content Analysis
|
||||||
type FrequencyWord = {
|
type FrequencyWord = {
|
||||||
word: string;
|
word: string;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ContentAnalysisResponse = {
|
||||||
|
word_frequencies: FrequencyWord[];
|
||||||
|
}
|
||||||
|
|
||||||
// Summary
|
// Summary
|
||||||
type SummaryResponse = {
|
type SummaryResponse = {
|
||||||
total_events: number;
|
total_events: number;
|
||||||
@@ -49,11 +72,20 @@ type SummaryResponse = {
|
|||||||
sources: string[];
|
sources: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Filtering Response
|
||||||
|
type FilterResponse = {
|
||||||
|
rows: number
|
||||||
|
data: any;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
TopUser,
|
TopUser,
|
||||||
Vocab,
|
Vocab,
|
||||||
User,
|
User,
|
||||||
UserAnalysisResponse,
|
UserAnalysisResponse,
|
||||||
FrequencyWord,
|
FrequencyWord,
|
||||||
SummaryResponse
|
SummaryResponse,
|
||||||
|
TimeAnalysisResponse,
|
||||||
|
ContentAnalysisResponse,
|
||||||
|
FilterResponse
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user