2023-12-04 06:41:36 +00:00
|
|
|
import { IIssueActivity, IIssueLite, TStateGroups } from ".";
|
2022-12-16 14:56:25 +00:00
|
|
|
|
2022-11-19 14:21:26 +00:00
|
|
|
export interface IUser {
|
2023-12-04 06:41:36 +00:00
|
|
|
id: string;
|
2022-11-19 14:21:26 +00:00
|
|
|
avatar: string;
|
2023-08-11 10:26:26 +00:00
|
|
|
cover_image: string | null;
|
2023-12-04 06:41:36 +00:00
|
|
|
date_joined: string;
|
2023-08-08 07:31:43 +00:00
|
|
|
display_name: string;
|
2023-12-04 06:41:36 +00:00
|
|
|
email: string;
|
2023-07-12 14:25:08 +00:00
|
|
|
first_name: string;
|
2023-12-04 06:41:36 +00:00
|
|
|
last_name: string;
|
|
|
|
is_active: boolean;
|
|
|
|
is_bot: boolean;
|
2022-11-19 14:21:26 +00:00
|
|
|
is_email_verified: boolean;
|
2023-12-04 06:41:36 +00:00
|
|
|
is_managed: boolean;
|
2023-04-11 06:55:21 +00:00
|
|
|
is_onboarded: boolean;
|
2023-12-04 06:41:36 +00:00
|
|
|
is_password_autoset: boolean;
|
2023-07-12 14:25:08 +00:00
|
|
|
is_tour_completed: boolean;
|
2023-12-04 06:41:36 +00:00
|
|
|
is_password_autoset: boolean;
|
|
|
|
mobile_number: string | null;
|
|
|
|
role: string | null;
|
|
|
|
onboarding_step: {
|
|
|
|
workspace_join?: boolean;
|
|
|
|
profile_complete?: boolean;
|
|
|
|
workspace_create?: boolean;
|
|
|
|
workspace_invite?: boolean;
|
|
|
|
};
|
|
|
|
last_workspace_id: string;
|
2023-08-29 14:41:06 +00:00
|
|
|
user_timezone: string;
|
2023-12-04 06:41:36 +00:00
|
|
|
username: string;
|
|
|
|
theme: IUserTheme;
|
|
|
|
use_case?: string;
|
|
|
|
}
|
2022-12-16 14:56:25 +00:00
|
|
|
|
2023-12-04 06:41:36 +00:00
|
|
|
export interface IInstanceAdminStatus {
|
|
|
|
is_instance_admin: boolean;
|
2022-11-19 14:21:26 +00:00
|
|
|
}
|
2022-12-12 04:49:52 +00:00
|
|
|
|
2023-12-04 06:41:36 +00:00
|
|
|
export interface IUserSettings {
|
|
|
|
id: string;
|
|
|
|
email: string;
|
|
|
|
workspace: {
|
|
|
|
last_workspace_id: string;
|
|
|
|
last_workspace_slug: string;
|
|
|
|
fallback_workspace_id: string;
|
|
|
|
fallback_workspace_slug: string;
|
|
|
|
invites: number;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUserTheme {
|
2023-07-10 06:55:32 +00:00
|
|
|
background: string;
|
|
|
|
text: string;
|
|
|
|
primary: string;
|
|
|
|
sidebarBackground: string;
|
|
|
|
sidebarText: string;
|
2023-05-11 13:10:17 +00:00
|
|
|
darkPalette: boolean;
|
|
|
|
palette: string;
|
2023-08-03 09:58:22 +00:00
|
|
|
theme: string;
|
2023-05-11 13:10:17 +00:00
|
|
|
}
|
|
|
|
|
2022-12-12 04:49:52 +00:00
|
|
|
export interface IUserLite {
|
|
|
|
avatar: string;
|
2023-01-26 18:12:20 +00:00
|
|
|
created_at: Date;
|
2023-08-08 07:31:43 +00:00
|
|
|
display_name: string;
|
2023-12-04 06:41:36 +00:00
|
|
|
email?: string;
|
2023-07-23 09:08:07 +00:00
|
|
|
first_name: string;
|
|
|
|
readonly id: string;
|
2023-03-17 05:08:01 +00:00
|
|
|
is_bot: boolean;
|
2023-07-23 09:08:07 +00:00
|
|
|
last_name: string;
|
2022-12-12 04:49:52 +00:00
|
|
|
}
|
2023-01-27 07:25:20 +00:00
|
|
|
|
2023-08-08 07:31:43 +00:00
|
|
|
export interface IUserMemberLite extends IUserLite {
|
2023-12-04 06:41:36 +00:00
|
|
|
email?: string;
|
2023-08-08 07:31:43 +00:00
|
|
|
}
|
|
|
|
|
2023-03-15 20:06:21 +00:00
|
|
|
export interface IUserActivity {
|
|
|
|
created_date: string;
|
|
|
|
activity_count: number;
|
|
|
|
}
|
|
|
|
|
2023-07-28 08:09:42 +00:00
|
|
|
export interface IUserPriorityDistribution {
|
|
|
|
priority: string;
|
|
|
|
priority_count: number;
|
|
|
|
}
|
|
|
|
|
2023-03-23 10:24:59 +00:00
|
|
|
export interface IUserStateDistribution {
|
2023-07-28 08:09:42 +00:00
|
|
|
state_group: TStateGroups;
|
2023-03-23 10:24:59 +00:00
|
|
|
state_count: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUserWorkspaceDashboard {
|
|
|
|
assigned_issues_count: number;
|
|
|
|
completed_issues_count: number;
|
|
|
|
issue_activities: IUserActivity[];
|
|
|
|
issues_due_week_count: number;
|
|
|
|
overdue_issues: IIssueLite[];
|
2023-03-24 05:36:52 +00:00
|
|
|
completed_issues: {
|
|
|
|
week_in_month: number;
|
|
|
|
completed_count: number;
|
|
|
|
}[];
|
2023-03-23 10:24:59 +00:00
|
|
|
pending_issues_count: number;
|
|
|
|
state_distribution: IUserStateDistribution[];
|
|
|
|
upcoming_issues: IIssueLite[];
|
|
|
|
}
|
|
|
|
|
2023-03-30 11:34:41 +00:00
|
|
|
export interface IUserActivityResponse {
|
|
|
|
count: number;
|
|
|
|
extra_stats: null;
|
|
|
|
next_cursor: string;
|
|
|
|
next_page_results: boolean;
|
|
|
|
prev_cursor: string;
|
|
|
|
prev_page_results: boolean;
|
2023-08-01 11:37:11 +00:00
|
|
|
results: IIssueActivity[];
|
2023-03-30 11:34:41 +00:00
|
|
|
total_pages: number;
|
|
|
|
}
|
|
|
|
|
2023-01-27 07:25:20 +00:00
|
|
|
export type UserAuth = {
|
|
|
|
isMember: boolean;
|
|
|
|
isOwner: boolean;
|
|
|
|
isViewer: boolean;
|
|
|
|
isGuest: boolean;
|
|
|
|
};
|
2023-07-12 14:25:08 +00:00
|
|
|
|
2023-07-31 11:53:49 +00:00
|
|
|
export type TOnboardingSteps = {
|
2023-07-12 14:25:08 +00:00
|
|
|
profile_complete: boolean;
|
|
|
|
workspace_create: boolean;
|
|
|
|
workspace_invite: boolean;
|
|
|
|
workspace_join: boolean;
|
|
|
|
};
|
2023-07-28 08:09:42 +00:00
|
|
|
|
|
|
|
export interface IUserProfileData {
|
|
|
|
assigned_issues: number;
|
|
|
|
completed_issues: number;
|
|
|
|
created_issues: number;
|
|
|
|
pending_issues: number;
|
|
|
|
priority_distribution: IUserPriorityDistribution[];
|
|
|
|
state_distribution: IUserStateDistribution[];
|
|
|
|
subscribed_issues: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUserProfileProjectSegregation {
|
|
|
|
project_data: {
|
|
|
|
assigned_issues: number;
|
|
|
|
completed_issues: number;
|
|
|
|
created_issues: number;
|
|
|
|
emoji: string | null;
|
|
|
|
icon_prop: null;
|
|
|
|
id: string;
|
|
|
|
identifier: string;
|
|
|
|
name: string;
|
|
|
|
pending_issues: number;
|
|
|
|
}[];
|
|
|
|
user_data: {
|
|
|
|
avatar: string;
|
|
|
|
cover_image: string | null;
|
|
|
|
date_joined: Date;
|
2023-08-08 07:31:43 +00:00
|
|
|
display_name: string;
|
2023-07-28 08:09:42 +00:00
|
|
|
first_name: string;
|
|
|
|
last_name: string;
|
|
|
|
user_timezone: string;
|
|
|
|
};
|
|
|
|
}
|
2023-08-08 07:20:27 +00:00
|
|
|
|
2023-12-04 06:41:36 +00:00
|
|
|
// export interface ICurrentUser {
|
|
|
|
// id: readonly string;
|
|
|
|
// avatar: string;
|
|
|
|
// first_name: string;
|
|
|
|
// last_name: string;
|
|
|
|
// username: string;
|
|
|
|
// email: string;
|
|
|
|
// mobile_number: string;
|
|
|
|
// is_email_verified: boolean;
|
|
|
|
// is_tour_completed: boolean;
|
|
|
|
// onboarding_step: TOnboardingSteps;
|
|
|
|
// is_onboarded: boolean;
|
|
|
|
// role: string;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// export interface ICustomTheme {
|
|
|
|
// background: string;
|
|
|
|
// text: string;
|
|
|
|
// primary: string;
|
|
|
|
// sidebarBackground: string;
|
|
|
|
// sidebarText: string;
|
|
|
|
// darkPalette: boolean;
|
|
|
|
// palette: string;
|
|
|
|
// theme: string;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// export interface ICurrentUserSettings {
|
|
|
|
// theme: ICustomTheme;
|
|
|
|
// }
|