import type { Adapter } from "next-auth/adapters";
import type { NumberSchema, StringSchema, ObjectSchema } from "joi";
import type { Request } from "@hapi/hapi";

export type AdapterFactory = (request: Request) => Adapter;

export interface NextAuthPluginOptions {
  nextAuthAdapterFactory: Adapter;

  validators?: {
    profile: ObjectSchema;
    userId: StringSchema | NumberSchema;
    user: ObjectSchema;
    session: ObjectSchema;
  };
  sharedSecret?: string;
  basePath?: string;
  tags?: string[];
}
