36 lines
1.4 KiB
TypeScript
36 lines
1.4 KiB
TypeScript
import { EmployeeRole } from '@rentaldrivego/database';
|
|
export interface InvitePayload {
|
|
firstName: string;
|
|
lastName: string;
|
|
email: string;
|
|
role: EmployeeRole;
|
|
}
|
|
export interface TeamMember {
|
|
id: string;
|
|
clerkUserId: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
email: string;
|
|
phone: string | null;
|
|
role: EmployeeRole;
|
|
isActive: boolean;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
lastActiveAt?: Date | null;
|
|
invitationStatus?: 'accepted' | 'pending' | 'revoked';
|
|
}
|
|
export declare function listEmployees(companyId: string): Promise<TeamMember[]>;
|
|
export declare function inviteEmployee(companyId: string, inviterId: string, payload: InvitePayload): Promise<{
|
|
employee: any;
|
|
invitationId: any;
|
|
invitedBy: string;
|
|
}>;
|
|
export declare function updateEmployeeRole(companyId: string, requesterId: string, requesterRole: EmployeeRole, employeeId: string, payload: {
|
|
role: EmployeeRole;
|
|
}): Promise<any>;
|
|
export declare function deactivateEmployee(companyId: string, requesterRole: EmployeeRole, employeeId: string): Promise<any>;
|
|
export declare function reactivateEmployee(companyId: string, requesterRole: EmployeeRole, employeeId: string): Promise<any>;
|
|
export declare function removeEmployee(companyId: string, requesterRole: EmployeeRole, employeeId: string): Promise<{
|
|
success: boolean;
|
|
}>;
|
|
//# sourceMappingURL=teamService.d.ts.map
|