2023-05-11 12:08:46 +00:00
|
|
|
export interface IAnalyticsResponse {
|
|
|
|
total: number;
|
|
|
|
distribution: IAnalyticsData;
|
|
|
|
extras: {
|
|
|
|
colors: IAnalyticsExtra[];
|
2023-05-16 09:41:40 +00:00
|
|
|
assignee_details: {
|
2023-08-09 09:50:29 +00:00
|
|
|
assignees__id: string | null;
|
2023-08-08 07:31:43 +00:00
|
|
|
assignees__display_name: string | null;
|
2023-05-16 09:41:40 +00:00
|
|
|
assignees__avatar: string | null;
|
|
|
|
assignees__first_name: string;
|
|
|
|
assignees__last_name: string;
|
|
|
|
}[];
|
2023-05-11 12:08:46 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalyticsData {
|
|
|
|
[key: string]: {
|
|
|
|
dimension: string | null;
|
|
|
|
segment?: string;
|
|
|
|
count?: number;
|
2023-05-16 05:11:37 +00:00
|
|
|
estimate?: number | null;
|
2023-05-11 12:08:46 +00:00
|
|
|
}[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalyticsExtra {
|
|
|
|
name: string;
|
|
|
|
color: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type TXAxisValues =
|
|
|
|
| "state__name"
|
|
|
|
| "state__group"
|
|
|
|
| "labels__name"
|
2023-08-08 07:31:43 +00:00
|
|
|
| "assignees__id"
|
2023-05-11 12:08:46 +00:00
|
|
|
| "estimate_point"
|
|
|
|
| "issue_cycle__cycle__name"
|
|
|
|
| "issue_module__module__name"
|
|
|
|
| "priority"
|
|
|
|
| "start_date"
|
|
|
|
| "target_date"
|
|
|
|
| "created_at"
|
|
|
|
| "completed_at";
|
|
|
|
|
2023-05-16 05:11:37 +00:00
|
|
|
export type TYAxisValues = "issue_count" | "estimate";
|
2023-05-11 12:08:46 +00:00
|
|
|
|
|
|
|
export interface IAnalyticsParams {
|
|
|
|
x_axis: TXAxisValues;
|
|
|
|
y_axis: TYAxisValues;
|
|
|
|
segment?: TXAxisValues | null;
|
2023-05-16 05:11:37 +00:00
|
|
|
project?: string[] | null;
|
2023-05-11 12:08:46 +00:00
|
|
|
cycle?: string | null;
|
|
|
|
module?: string | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISaveAnalyticsFormData {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
query_dict: IExportAnalyticsFormData;
|
|
|
|
}
|
|
|
|
export interface IExportAnalyticsFormData {
|
|
|
|
x_axis: TXAxisValues;
|
|
|
|
y_axis: TYAxisValues;
|
|
|
|
segment?: TXAxisValues | null;
|
|
|
|
project?: string[];
|
|
|
|
}
|
|
|
|
|
2023-05-15 05:52:06 +00:00
|
|
|
export interface IDefaultAnalyticsUser {
|
|
|
|
assignees__avatar: string | null;
|
2023-05-16 05:11:37 +00:00
|
|
|
assignees__first_name: string;
|
|
|
|
assignees__last_name: string;
|
2023-08-08 07:31:43 +00:00
|
|
|
assignees__display_name: string;
|
2023-08-11 10:18:52 +00:00
|
|
|
assignees__id: string;
|
2023-05-15 05:52:06 +00:00
|
|
|
count: number;
|
|
|
|
}
|
|
|
|
|
2023-05-11 12:08:46 +00:00
|
|
|
export interface IDefaultAnalyticsResponse {
|
|
|
|
issue_completed_month_wise: { month: number; count: number }[];
|
2023-05-15 05:52:06 +00:00
|
|
|
most_issue_closed_user: IDefaultAnalyticsUser[];
|
2023-05-11 12:08:46 +00:00
|
|
|
most_issue_created_user: {
|
2023-05-15 05:52:06 +00:00
|
|
|
created_by__avatar: string | null;
|
2023-05-16 05:11:37 +00:00
|
|
|
created_by__first_name: string;
|
|
|
|
created_by__last_name: string;
|
2023-08-08 07:31:43 +00:00
|
|
|
created_by__display_name: string;
|
2023-08-11 10:18:52 +00:00
|
|
|
created_by__id: string;
|
2023-05-11 12:08:46 +00:00
|
|
|
count: number;
|
|
|
|
}[];
|
|
|
|
open_estimate_sum: number;
|
|
|
|
open_issues: number;
|
|
|
|
open_issues_classified: { state_group: string; state_count: number }[];
|
2023-05-15 05:52:06 +00:00
|
|
|
pending_issue_user: IDefaultAnalyticsUser[];
|
2023-05-11 12:08:46 +00:00
|
|
|
total_estimate_sum: number;
|
|
|
|
total_issues: number;
|
|
|
|
total_issues_classified: { state_group: string; state_count: number }[];
|
|
|
|
}
|