import * as zod_v4_core from 'zod/v4/core'; import * as zod from 'zod'; import { AdapterHealth as AdapterHealth$1, AuthAdapter as AuthAdapter$1, AuthContractError as AuthContractError$1, AuthError as AuthError$1, AuthErrorCode as AuthErrorCode$1, AuthIdentity as AuthIdentity$1, AuthProviderAdapter as AuthProviderAdapter$1, AuthSession as AuthSession$1, AuthSessionContract as AuthSessionContract$1, AuthUser as AuthUser$1, OAuthProvider as OAuthProvider$1 } from '@geenius/adapters'; /** * Health result returned by auth providers after checking identity/session * storage and provider reachability. * * @example * ```ts * const health: AdapterHealth = await authProvider.getHealth(); * ``` */ type AdapterHealth = AdapterHealth$1; /** * User-facing authentication operations for credential, OAuth, session, and * profile flows exposed by downstream auth providers. * * @example * ```ts * const session = await auth.signIn("user@example.com", "secret"); * ``` */ type AuthAdapter = AuthAdapter$1; /** * Stable machine-readable auth error codes emitted by `AuthError`. * * @example * ```ts * const code: AuthErrorCode = "INVALID_CREDENTIALS"; * ``` */ type AuthErrorCode = AuthErrorCode$1; /** * Provider-neutral identity record used by SDK-free auth provider adapters. * * @example * ```ts * const identity: AuthIdentity = { id: "u1", roles: [], metadata: {} }; * ``` */ type AuthIdentity = AuthIdentity$1; /** * Low-level provider contract for identity persistence, session lifecycle, and * auth provider health checks. * * @example * ```ts * const identity = await provider.getIdentity("u1"); * ``` */ type AuthProviderAdapter = AuthProviderAdapter$1; /** * Active user session returned by user-facing auth adapters. * * @example * ```ts * const session: AuthSession = { userId: "u1", user: { id: "u1" } }; * ``` */ type AuthSession = AuthSession$1; /** * Serializable provider session record used at the contract boundary. * * @example * ```ts * const session: AuthSessionContract = { id: "s1", identityId: "u1", token: "token", createdAt: new Date().toISOString() }; * ``` */ type AuthSessionContract = AuthSessionContract$1; /** * Profile fields associated with the active authenticated user. * * @example * ```ts * const user: AuthUser = { id: "u1", email: "user@example.com" }; * ``` */ type AuthUser = AuthUser$1; /** * OAuth provider identifier accepted by `AuthAdapter.signInWithOAuth()`. * * @example * ```ts * const provider: OAuthProvider = "github"; * ``` */ type OAuthProvider = OAuthProvider$1; /** * Runtime validator for the common auth adapter health response. * * @example * ```ts * const health = AdapterHealthSchema.parse({ ok: true, checkedAt: new Date().toISOString() }); * ``` */ declare const AdapterHealthSchema: zod.ZodObject<{ ok: zod.ZodBoolean; checkedAt: zod.ZodString; latencyMs: zod.ZodOptional; message: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Contract-layer error for invalid auth payloads or provider-boundary * violations before a concrete auth SDK receives the request. * * @example * ```ts * throw new AuthContractError("Invalid auth identity"); * ``` */ declare const AuthContractError: typeof AuthContractError$1; /** * Runtime auth error class that preserves the auth domain, adapter error code, * and HTTP-like status code for credential, OAuth, and session failures. * * @example * ```ts * throw new AuthError("Invalid credentials", "INVALID_CREDENTIALS"); * ``` */ declare const AuthError: typeof AuthError$1; /** * Runtime validator for provider-neutral auth identity records. * * @example * ```ts * const identity = AuthIdentitySchema.parse({ id: "u1" }); * ``` */ declare const AuthIdentitySchema: zod.ZodObject<{ id: zod.ZodString; email: zod.ZodOptional; name: zod.ZodOptional; roles: zod.ZodDefault>; metadata: zod.ZodDefault>; }, zod_v4_core.$strip>; /** * Runtime validator for provider-neutral auth session records. * * @example * ```ts * const session = AuthSessionContractSchema.parse({ id: "s1", identityId: "u1", token: "token", createdAt: new Date().toISOString() }); * ``` */ declare const AuthSessionContractSchema: zod.ZodObject<{ id: zod.ZodString; identityId: zod.ZodString; token: zod.ZodString; expiresAt: zod.ZodOptional; createdAt: zod.ZodString; }, zod_v4_core.$strip>; export { type AdapterHealth, AdapterHealthSchema, type AuthAdapter, AuthContractError, AuthError, type AuthErrorCode, type AuthIdentity, AuthIdentitySchema, type AuthProviderAdapter, type AuthSession, type AuthSessionContract, AuthSessionContractSchema, type AuthUser, type OAuthProvider };