plane/web/types/users.d.ts

198 lines
4.1 KiB
TypeScript
Raw Normal View History

import {
IIssue,
IIssueActivity,
IIssueLite,
IWorkspace,
IWorkspaceLite,
NestedKeyOf,
Properties,
TStateGroups,
} from ".";
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;
date_joined: readonly Date;
email: string;
display_name: string;
first_name: string;
id: readonly string;
2022-11-19 14:21:26 +00:00
is_email_verified: boolean;
is_onboarded: boolean;
is_tour_completed: boolean;
last_location: readonly string;
last_login: readonly Date;
last_name: string;
mobile_number: string;
my_issues_prop: {
properties: Properties;
groupBy: NestedKeyOf<IIssue> | null;
} | null;
onboarding_step: TOnboardingSteps;
role: string;
token: string;
theme: ICustomTheme;
updated_at: readonly Date;
username: string;
user_timezone: string;
2022-11-19 14:21:26 +00:00
[...rest: string]: any;
}
export interface ICustomTheme {
background: string;
text: string;
primary: string;
sidebarBackground: string;
sidebarText: string;
darkPalette: boolean;
palette: string;
theme: string;
}
export interface ICurrentUserResponse extends IUser {
assigned_issues: number;
last_workspace_id: string | null;
workspace_invites: number;
workspace: {
fallback_workspace_id: string | null;
fallback_workspace_slug: string | null;
invites: number;
last_workspace_id: string | null;
last_workspace_slug: string | null;
};
}
export interface IUserLite {
avatar: string;
Refactoring Phase 1 (#199) * style: added cta at the bottom of sidebar, added missing icons as well, showing dynamic workspace member count on workspace dropdown * refractor: running parallel request, made create/edit label function to async function * fix: sidebar dropdown content going below kanban items outside click detection in need help dropdown * refractor: making parallel api calls fix: create state input comes at bottom, create state input gets on focus automatically, form is getting submitted on enter click * refactoring file structure and signin page * style: changed text and added spinner for signing in loading * refractor: removed unused type * fix: my issue cta in profile page sending to 404 page * fix: added new s3 bucket url in next.config.js file increased image modal height * packaging UI components * eslint config * eslint fixes * refactoring changes * build fixes * minor fixes * adding todo comments for reference * refactor: cleared unused imports and re ordered imports * refactor: removed unused imports * fix: added workspace argument to useissues hook * refactor: removed api-routes file, unnecessary constants * refactor: created helpers folder, removed unnecessary constants * refactor: new context for issue view * refactoring issues page * build fixes * refactoring * refactor: create issue modal * refactor: module ui * fix: sub-issues mutation * fix: create more option in create issue modal * description form debounce issue * refactor: global component for assignees list * fix: link module interface * fix: priority icons and sub-issues count added * fix: cycle mutation in issue details page * fix: remove issue from cycle mutation * fix: create issue modal in home page * fix: removed unnecessary props * fix: updated create issue form status * fix: settings auth breaking * refactor: issue details page Co-authored-by: Dakshesh Jain <dakshesh.jain14@gmail.com> Co-authored-by: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Co-authored-by: venkatesh-soulpage <venkatesh.marreboyina@soulpageit.com> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia1001@gmail.com>
2023-01-26 18:12:20 +00:00
created_at: Date;
display_name: string;
first_name: string;
readonly id: string;
is_bot: boolean;
last_name: string;
}
2023-01-27 07:25:20 +00:00
export interface IUserMemberLite extends IUserLite {
email: string;
}
export interface IUserActivity {
created_date: string;
activity_count: number;
}
export interface IUserPriorityDistribution {
priority: string;
priority_count: number;
}
export interface IUserStateDistribution {
state_group: TStateGroups;
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[];
completed_issues: {
week_in_month: number;
completed_count: number;
}[];
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;
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;
};
export type TOnboardingSteps = {
profile_complete: boolean;
workspace_create: boolean;
workspace_invite: boolean;
workspace_join: boolean;
};
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;
display_name: string;
first_name: string;
last_name: string;
user_timezone: string;
};
}
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;
}