Files
fabric_trade_server/dist/auth/auth.controller.d.ts
T
mohmdsdgandCursor 345a4a4708 Add SMS OTP, harden auth, and fix order/checkout server bugs.
Ship 4-digit OTP with rate-limit attempts, Tehran-safe expiry/rass math, larger JSON body limit for check images, and safer order pricing/status guards. Include rebuilt dist for prebuilt deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:55:26 +03:30

61 lines
1.7 KiB
TypeScript

import { AuthService } from './auth.service';
import { AdminLoginDto, RequestOtpDto, UpdateProfileDto, VerifyOtpDto } from './dto/auth.dto';
import type { AuthPrincipal } from '../common/decorators/current-user.decorator';
export declare class AuthController {
private readonly authService;
constructor(authService: AuthService);
health(): {
ok: boolean;
service: string;
};
requestOtp(dto: RequestOtpDto): Promise<{
debugCode?: string | undefined;
success: boolean;
message: string;
expiresAt: Date;
}>;
verifyOtp(dto: VerifyOtpDto): Promise<{
accessToken: string;
user: {
id: string;
firstName: string;
lastName: string;
phone: string;
nationalId: string | undefined;
createdAt: string;
};
}>;
adminLogin(dto: AdminLoginDto): Promise<{
accessToken: string;
user: {
id: string;
fullName: string;
phone: string;
email: string;
role: import("@prisma/client").$Enums.AdminRole;
};
}>;
me(user: AuthPrincipal): Promise<{
id: string;
firstName: string;
lastName: string;
phone: string;
nationalId: string | undefined;
createdAt: string;
} | {
id: string;
fullName: string;
phone: string;
email: string;
role: import("@prisma/client").$Enums.AdminRole;
}>;
updateProfile(user: AuthPrincipal, dto: UpdateProfileDto): Promise<{
id: string;
firstName: string;
lastName: string;
phone: string;
nationalId: string | undefined;
createdAt: string;
}>;
}