[WEB-2358] chore: optimised the recent collaborators endpoint (#5470)

* chore: optimised the recent collaborators endpoint

* chore: recent collabators code refactor

* chore: sorted the user's based on active issues

* chore: recent collaborators sorting

* chore: code refactor

---------

Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
This commit is contained in:
Bavisetti Narayan 2024-09-05 15:38:10 +05:30 committed by GitHub
parent bf49ebb519
commit 3d7098855f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 49 additions and 320 deletions

View file

@ -145,17 +145,8 @@ export type TRecentActivityWidgetResponse = IIssueActivity;
export type TRecentProjectsWidgetResponse = string[];
export type TRecentCollaboratorsWidgetResponse = {
count: number;
extra_stats: Object | null;
next_cursor: string;
next_page_results: boolean;
prev_cursor: string;
prev_page_results: boolean;
results: {
active_issue_count: number;
user_id: string;
}[];
total_pages: number;
active_issue_count: number;
user_id: string;
};
export type TWidgetStatsResponse =
@ -166,7 +157,7 @@ export type TWidgetStatsResponse =
| TCreatedIssuesWidgetResponse
| TRecentActivityWidgetResponse[]
| TRecentProjectsWidgetResponse
| TRecentCollaboratorsWidgetResponse;
| TRecentCollaboratorsWidgetResponse[];
// dashboard
export type TDashboard = {