feat: implement collaborator reactivation logic, add access denied handling, and improve metric filtering
This commit is contained in:
@@ -68,6 +68,13 @@ export type DeleteEmployeeParams = {
|
||||
employeeId: string;
|
||||
};
|
||||
|
||||
export type RemoveCollaboratorParams = {
|
||||
employeeId: string;
|
||||
companyId: string;
|
||||
replacementEmployeeId?: string;
|
||||
sessionUser: string;
|
||||
};
|
||||
|
||||
export interface IEmployee {
|
||||
id?: string;
|
||||
companyId: string;
|
||||
@@ -77,6 +84,15 @@ export interface IEmployee {
|
||||
limit?: number;
|
||||
guestOk?: boolean;
|
||||
hostOk?: boolean;
|
||||
removed?: boolean;
|
||||
removedAt?: Date;
|
||||
removedBy?: string;
|
||||
profileSnapshot?: {
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
avatar?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CompanyEmployeesView {
|
||||
@@ -93,6 +109,14 @@ export interface CompanyEmployeesView {
|
||||
hostOk: boolean;
|
||||
fullOk: boolean;
|
||||
calendarColor: string;
|
||||
removed?: boolean;
|
||||
removedAt?: Date;
|
||||
profileSnapshot?: {
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
avatar?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IncompleteCollaboratorView {
|
||||
@@ -125,4 +149,5 @@ export interface IEmployeesManager {
|
||||
deleteEmployee(data: DeleteEmployeeParams): Promise<void>;
|
||||
rejectGuest(data: ValidateEmployeeParams): Promise<void>;
|
||||
getIncompleteSetup(sessionUser: string): Promise<IncompleteCollaboratorView[]>;
|
||||
removeCollaboratorFromCompany(data: RemoveCollaboratorParams): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user