plane/web/types/analytics.d.ts
sriram veeraghanta 1e152c666c
New Directory Setup (#2065)
* chore: moved app & space from apps to root

* chore: modified workspace configuration

* chore: modified dockerfiles for space and web

* chore: modified icons for space

* feat: updated files for new svg icons supported by next-images

* chore: added /spaces base path for next

* chore: added compose config for space

* chore: updated husky configuration

* chore: updated workflows for new configuration

* chore: changed app name to web

* fix: resolved build errors with web

* chore: reset file tracing root for both projects

* chore: added nginx config for deploy

* fix: eslint and tsconfig settings for space app

* husky setup fixes based on new dir

* eslint fixes

* prettier formatting

---------

Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
2023-09-03 18:50:30 +05:30

95 lines
2.3 KiB
TypeScript

export interface IAnalyticsResponse {
total: number;
distribution: IAnalyticsData;
extras: {
colors: IAnalyticsExtra[];
assignee_details: {
assignees__id: string | null;
assignees__display_name: string | null;
assignees__avatar: string | null;
assignees__first_name: string;
assignees__last_name: string;
}[];
};
}
export interface IAnalyticsData {
[key: string]: {
dimension: string | null;
segment?: string;
count?: number;
estimate?: number | null;
}[];
}
export interface IAnalyticsExtra {
name: string;
color: string;
}
export type TXAxisValues =
| "state__name"
| "state__group"
| "labels__name"
| "assignees__id"
| "estimate_point"
| "issue_cycle__cycle__name"
| "issue_module__module__name"
| "priority"
| "start_date"
| "target_date"
| "created_at"
| "completed_at";
export type TYAxisValues = "issue_count" | "estimate";
export interface IAnalyticsParams {
x_axis: TXAxisValues;
y_axis: TYAxisValues;
segment?: TXAxisValues | null;
project?: string[] | null;
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[];
}
export interface IDefaultAnalyticsUser {
assignees__avatar: string | null;
assignees__first_name: string;
assignees__last_name: string;
assignees__display_name: string;
assignees__id: string;
count: number;
}
export interface IDefaultAnalyticsResponse {
issue_completed_month_wise: { month: number; count: number }[];
most_issue_closed_user: IDefaultAnalyticsUser[];
most_issue_created_user: {
created_by__avatar: string | null;
created_by__first_name: string;
created_by__last_name: string;
created_by__display_name: string;
created_by__id: string;
count: number;
}[];
open_estimate_sum: number;
open_issues: number;
open_issues_classified: { state_group: string; state_count: number }[];
pending_issue_user: IDefaultAnalyticsUser[];
total_estimate_sum: number;
total_issues: number;
total_issues_classified: { state_group: string; state_count: number }[];
}