- 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>
15 lines
504 B
TypeScript
15 lines
504 B
TypeScript
import { getGHLClientForUser } from '@/lib/ghl/helpers';
|
|
import { GHL } from '@/lib/ghl';
|
|
|
|
/**
|
|
* Creates a GHL client instance for an authenticated user.
|
|
* First checks for user-specific GHL credentials, then falls back
|
|
* to global system settings.
|
|
*
|
|
* @param userId - The ID of the authenticated user
|
|
* @returns A configured GHL client instance, or null if GHL is not configured
|
|
*/
|
|
export async function getGHLClient(userId: string): Promise<GHL | null> {
|
|
return getGHLClientForUser(userId);
|
|
}
|