import { CrmRole } from "./types.cjs"; //#region src/auth-adapter.d.ts export interface ClivlyUser { email: string; id: string; name?: string; } /** * Bridges any host auth system into Clivly. Ship adapters wrap a concrete SDK * (`@clivly/auth-clerk`, `@clivly/auth-workos`), and `authCustom` wraps an * arbitrary `(req) => user` resolver. * * This answers "who is this person?" only. Authorization ("what can they do in * this org?") is the separate `crm_members` layer — see `MembershipResolver`. */ export interface ClivlyAuthAdapter { getUser(req: Request): Promise; } export declare function authCustom(resolver: (req: Request) => Promise | ClivlyUser | null): ClivlyAuthAdapter; export interface CrmMembership { orgId: string; role: CrmRole; userId: string; } export interface MembershipResolver { getMembership(userId: string, orgId: string): Promise; } //#endregion