- Build complete Next.js CRM for commercial real estate - Add authentication with JWT sessions and role-based access - Add GoHighLevel API integration for contacts, conversations, opportunities - Add AI-powered Control Center with tool calling - Add Setup page with onboarding checklist (/setup) - Add sidebar navigation with Setup menu item - Fix type errors in onboarding API, GHL services, and control center tools - Add Prisma schema with SQLite for local development - Add UI components with clay morphism design system Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
901 B
TypeScript
56 lines
901 B
TypeScript
/**
|
|
* Authentication and User Types
|
|
* CRESyncFlow - Commercial Real Estate CRM
|
|
*/
|
|
|
|
export enum Role {
|
|
SUPER_ADMIN = 'SUPER_ADMIN',
|
|
ADMIN = 'ADMIN',
|
|
USER = 'USER'
|
|
}
|
|
|
|
export interface User {
|
|
id: string;
|
|
email: string;
|
|
role: Role;
|
|
firstName?: string;
|
|
lastName?: string;
|
|
brokerage?: string;
|
|
ghlLocationId?: string;
|
|
createdAt: Date;
|
|
}
|
|
|
|
export interface Session {
|
|
user: User;
|
|
accessToken: string;
|
|
expiresAt: Date;
|
|
}
|
|
|
|
export interface LoginCredentials {
|
|
email: string;
|
|
password: string;
|
|
}
|
|
|
|
export interface SignupData {
|
|
email: string;
|
|
password: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
}
|
|
|
|
export interface AuthState {
|
|
user: User | null;
|
|
session: Session | null;
|
|
isLoading: boolean;
|
|
isAuthenticated: boolean;
|
|
}
|
|
|
|
export interface PasswordResetRequest {
|
|
email: string;
|
|
}
|
|
|
|
export interface PasswordResetConfirm {
|
|
token: string;
|
|
newPassword: string;
|
|
}
|