import { PrismaService } from '../../database/prisma.service';
import { JwtService } from '@nestjs/jwt';
import { ConfigService } from '@nestjs/config';
import { BootstrapSuperadminDto } from './dto/bootstrap-superadmin.dto';
import { PasswordLoginDto } from './dto/password-login.dto';
import { OtpRequestDto } from './dto/otp-request.dto';
import { OtpVerifyDto } from './dto/otp-verify.dto';
import { RegisterStoreDto } from './dto/register-store.dto';
import { RegisterStoreMeDto } from './dto/register-store-me.dto';
import { PasswordResetRequestDto } from './dto/password-reset-request.dto';
import { PasswordResetConfirmDto } from './dto/password-reset-confirm.dto';
import { PasswordResetVerifyDto } from './dto/password-reset-verify.dto';
import { UpdateMyProfileDto } from '../users/dto/update-my-profile.dto';
import { UpdateMyLocationDto } from '../users/dto/update-my-location.dto';
import { WalletService } from '../wallet/wallet.service';
import { MailService } from '../mail/mail.service';
type TokenResponse = {
    accessToken: string;
    tokenType: 'Bearer';
    expiresIn: string;
};
export declare class AuthService {
    private readonly prisma;
    private readonly jwt;
    private readonly config;
    private readonly wallet;
    private readonly mail;
    private readonly logger;
    constructor(prisma: PrismaService, jwt: JwtService, config: ConfigService, wallet: WalletService, mail: MailService);
    private queueStoreRegistrationEmail;
    private sendMetareachOtp;
    private allocateReferralCode;
    private isReferralUniqueViolation;
    private ensureReferralCode;
    finalizeMeResponse(user: Record<string, unknown>): Promise<Record<string, unknown>>;
    private reactivateUserIfNeeded;
    bootstrapSuperadmin(dto: BootstrapSuperadminDto): Promise<TokenResponse>;
    loginWithPassword(dto: PasswordLoginDto): Promise<TokenResponse>;
    registerStore(dto: RegisterStoreDto, portalPublicUrl?: string | null): Promise<{
        pendingApproval: boolean;
        admin: {
            id: string;
            email: string | null;
            phone: string | null;
            role: import("@prisma/client").$Enums.UserRole;
            tokenVersion: number;
        };
        shop: {
            id: string;
            name: string;
            isActive: boolean;
            city: string;
            state: string;
            pincode: string;
            status: import("@prisma/client").$Enums.ShopStatus;
            approvedAt: Date | null;
        };
        requestedPlanCode: string;
        checkoutUrl: string | null;
        accessToken: string;
        tokenType: "Bearer";
        expiresIn: string;
    }>;
    registerStoreForMe(userId: string, dto: RegisterStoreMeDto, portalPublicUrl?: string | null): Promise<{
        pendingApproval: boolean;
        accessToken: string;
        tokenType: "Bearer";
        expiresIn: string;
    } | {
        pendingApproval: boolean;
        admin: {
            id: string;
            email: string | null;
            phone: string | null;
            role: import("@prisma/client").$Enums.UserRole;
            tokenVersion: number;
            shopId: string | null;
        };
        shop: {
            id: string;
            name: string;
            isActive: boolean;
            city: string;
            state: string;
            pincode: string;
            status: import("@prisma/client").$Enums.ShopStatus;
            approvedAt: Date | null;
        };
        requestedPlanCode: string;
        checkoutUrl: string | null;
        accessToken: string;
        tokenType: "Bearer";
        expiresIn: string;
    }>;
    registerStoreAvailable(args: {
        email?: string;
        phone?: string;
    }): Promise<{
        emailAvailable: boolean;
        phoneAvailable: boolean;
    }>;
    requestOtp(dto: OtpRequestDto): Promise<{
        otpSent: boolean;
        devOtp?: undefined;
    } | {
        otpSent: boolean;
        devOtp: string;
    }>;
    verifyOtp(dto: OtpVerifyDto): Promise<TokenResponse>;
    logout(userId: string | undefined): Promise<{
        loggedOut: boolean;
    }>;
    updateMyCustomerProfile(userId: string, dto: UpdateMyProfileDto): Promise<{
        id: string;
        email: string | null;
        phone: string | null;
        referralCode: string | null;
        role: import("@prisma/client").$Enums.UserRole;
        name: string | null;
        referredByUserId: string | null;
    }>;
    updateMyCustomerLocation(userId: string, dto: UpdateMyLocationDto): Promise<{
        id: string;
        latitude: number | null;
        longitude: number | null;
        locationAddress: string | null;
    }>;
    requestPasswordReset(dto: PasswordResetRequestDto): Promise<{
        requested: boolean;
        expiresAt: Date;
        resetUrl: string;
    }>;
    verifyPasswordReset(dto: PasswordResetVerifyDto): Promise<{
        valid: boolean;
        expiresAt: Date;
    } | {
        valid: boolean;
        expiresAt?: undefined;
    }>;
    confirmPasswordReset(dto: PasswordResetConfirmDto): Promise<{
        updated: boolean;
    }>;
    private issueToken;
}
export {};
