export type SessionUser = { id: string; email: string; firstName: string | null; lastName: string | null; profilePictureUrl: string | null; }; export type BillingSession = { user: SessionUser | null; /** WorkOS organization id — null when the session isn't org-scoped. */ orgId: string | null; /** Role slug within that organization, e.g. "admin" / "member". */ role: string | null; /** `role === "admin"`. False whenever the role is unknown. */ isAdmin: boolean; /** Plan key from organization metadata, e.g. "hobby" / "pro". */ plan: string | null; /** * The session is still being resolved, so `user` being null means "not known * yet" rather than "signed out". * * Only ever true under the client-seeded provider, which waits for AuthKit to * resolve in the browser. A server-seeded session is resolved by definition. */ loading: boolean; }; export declare const ANONYMOUS_SESSION: BillingSession; /** * Anything that can report an organization's plan — structurally the * `WorkOSOrgAdapter`, but stated as a shape so a host with its own adapter, * or a test, can supply one. */ export type PlanSource = { getSubscription(orgId: string): Promise<{ plan?: string | null; } | null>; }; /** * Resolve the current session on the server, to seed ``. * * Next.js + AuthKit only: it reads the sealed session cookie through * `@workos-inc/authkit-nextjs`, which stays an OPTIONAL peer — imported * dynamically so a CLI or non-Next consumer never loads it. * * Pass `adapter` to include the plan; without one the plan is null and no * WorkOS organization is fetched, which keeps this to zero network calls. */ export declare function resolveSession(opts?: { adapter?: PlanSource; }): Promise; //# sourceMappingURL=session.d.ts.map