Files
fabric_trade_server/dist/auth/dto/auth.dto.js
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

89 lines
3.2 KiB
JavaScript

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateProfileDto = exports.AdminLoginDto = exports.VerifyOtpDto = exports.RequestOtpDto = void 0;
const class_validator_1 = require("class-validator");
class RequestOtpDto {
phone;
firstName;
lastName;
isRegister;
}
exports.RequestOtpDto = RequestOtpDto;
__decorate([
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RequestOtpDto.prototype, "phone", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RequestOtpDto.prototype, "firstName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], RequestOtpDto.prototype, "lastName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], RequestOtpDto.prototype, "isRegister", void 0);
class VerifyOtpDto {
phone;
code;
}
exports.VerifyOtpDto = VerifyOtpDto;
__decorate([
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], VerifyOtpDto.prototype, "phone", void 0);
__decorate([
(0, class_validator_1.IsString)(),
(0, class_validator_1.Length)(4, 4),
__metadata("design:type", String)
], VerifyOtpDto.prototype, "code", void 0);
class AdminLoginDto {
phone;
password;
}
exports.AdminLoginDto = AdminLoginDto;
__decorate([
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], AdminLoginDto.prototype, "phone", void 0);
__decorate([
(0, class_validator_1.IsString)(),
(0, class_validator_1.MinLength)(4),
__metadata("design:type", String)
], AdminLoginDto.prototype, "password", void 0);
class UpdateProfileDto {
firstName;
lastName;
nationalId;
}
exports.UpdateProfileDto = UpdateProfileDto;
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateProfileDto.prototype, "firstName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateProfileDto.prototype, "lastName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateProfileDto.prototype, "nationalId", void 0);
//# sourceMappingURL=auth.dto.js.map