2023-07-28 08:09:42 +00:00
|
|
|
import {
|
|
|
|
IIssue,
|
2023-08-01 11:37:11 +00:00
|
|
|
IIssueActivity,
|
2023-07-28 08:09:42 +00:00
|
|
|
IIssueLite,
|
|
|
|
IWorkspace,
|
|
|
|
IWorkspaceLite,
|
|
|
|
NestedKeyOf,
|
|
|
|
Properties,
|
|
|
|
TStateGroups,
|
2023-09-03 13:20:30 +00:00
|
|
|
} from ".";
|
2022-12-16 14:56:25 +00:00
|
|
|
|
2022-11-19 14:21:26 +00:00
|
|
|
export interface IUser {
|
|
|
|
avatar: string;
|
2023-08-11 10:26:26 +00:00
|
|
|
cover_image: string | null;
|
2022-11-19 14:21:26 +00:00
|
|
|
created_at: readonly Date;
|
|
|
|
created_location: readonly string;
|
2023-07-12 14:25:08 +00:00
|
|
|
date_joined: readonly Date;
|
|
|
|
email: string;
|
2023-08-08 07:31:43 +00:00
|
|
|
display_name: string;
|
2023-07-12 14:25:08 +00:00
|
|
|
first_name: string;
|
|
|
|
id: readonly string;
|
2022-11-19 14:21:26 +00:00
|
|
|
is_email_verified: boolean;
|
2023-04-11 06:55:21 +00:00
|
|
|
is_onboarded: boolean;
|
2023-07-12 14:25:08 +00:00
|
|
|
is_tour_completed: boolean;
|
|
|
|
last_location: readonly string;
|
|
|
|
last_login: readonly Date;
|
|
|
|
last_name: string;
|
|
|
|
mobile_number: string;
|
|
|
|
my_issues_prop: {
|
2022-12-16 14:56:25 +00:00
|
|
|
properties: Properties;
|
|
|
|
groupBy: NestedKeyOf<IIssue> | null;
|
2023-07-12 14:25:08 +00:00
|
|
|
} | null;
|
2023-07-31 11:53:49 +00:00
|
|
|
onboarding_step: TOnboardingSteps;
|
2023-07-12 14:25:08 +00:00
|
|
|
role: string;
|
|
|
|
token: string;
|
|
|
|
theme: ICustomTheme;
|
|
|
|
updated_at: readonly Date;
|
|
|
|
username: string;
|
2023-08-29 14:41:06 +00:00
|
|
|
user_timezone: string;
|
2022-12-16 14:56:25 +00:00
|
|
|
|
2022-11-19 14:21:26 +00:00
|
|
|
[...rest: string]: any;
|
|
|
|
}
|
2022-12-12 04:49:52 +00:00
|
|
|
|
2023-05-11 13:10:17 +00:00
|
|
|
export interface ICustomTheme {
|
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
|
|
|
}
|
|
|
|
|
2023-05-30 13:44:35 +00:00
|
|
|
export interface ICurrentUserResponse extends IUser {
|
2023-04-11 06:55:21 +00:00
|
|
|
assigned_issues: number;
|
2023-07-12 14:25:08 +00:00
|
|
|
last_workspace_id: string | null;
|
2023-04-11 06:55:21 +00:00
|
|
|
workspace_invites: number;
|
2023-07-12 14:25:08 +00:00
|
|
|
workspace: {
|
|
|
|
fallback_workspace_id: string | null;
|
|
|
|
fallback_workspace_slug: string | null;
|
|
|
|
invites: number;
|
|
|
|
last_workspace_id: string | null;
|
|
|
|
last_workspace_slug: string | null;
|
|
|
|
};
|
2023-04-11 06:55:21 +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-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 {
|
|
|
|
email: string;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
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;
|
|
|
|
}
|