import { defineModule, defineRoute } from "../../shared/define-module"
import type {
  AuthSessionResponse,
} from "./types"

/**
 * Authentication module definition with Better Auth integration
 *
 * This module provides client SDK interfaces for all Better Auth endpoints.
 * The endpoints follow Better Auth's standard path conventions under /better-auth prefix.
 */
export const authModule = defineModule({
  name: "auth",
  prefix: "/better-auth",
  routes: {
    // Session management
    getSession: defineRoute<void, AuthSessionResponse>("GET", "/get-session"),
  },
})

// Export the API type
export type AuthAPI = typeof authModule.api

// Re-export types for external consumption
export type * from "./types"
