import { Organization } from 'better-auth/plugins';
import { AuthResult } from '../AuthFunction.mjs';
import { getSessionFromCtx } from 'better-auth/api';

type Session = ReturnType<typeof getSessionFromCtx>;
type AutumnOptions = {
    url?: string;
    secretKey?: string;
    customerScope?: "user" | "organization" | "user_and_organization";
    identify?: (options: {
        session: Session;
        organization?: (Organization & {
            ownerEmail: string | null;
        }) | null;
    }) => AuthResult;
    suppressLogs?: boolean;
};

export type { AutumnOptions, Session };
