"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.MfaStatusResponseDto = exports.MfaDeviceDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const nest_auth_contracts_1 = require("@ackplus/nest-auth-contracts");
class MfaDeviceDto {
    id;
    deviceName;
    method;
    lastUsedAt;
    verified;
    createdAt;
}
exports.MfaDeviceDto = MfaDeviceDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Unique identifier of the MFA device',
        example: '4b3c9c9c-9a9d-4d1e-8d9f-123456789abc',
    }),
    __metadata("design:type", String)
], MfaDeviceDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Friendly name of the registered device',
        example: 'Work laptop',
    }),
    __metadata("design:type", String)
], MfaDeviceDto.prototype, "deviceName", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'MFA method this device supports',
        enum: nest_auth_contracts_1.NestAuthMFAMethodEnum,
        example: nest_auth_contracts_1.NestAuthMFAMethodEnum.TOTP,
    }),
    __metadata("design:type", String)
], MfaDeviceDto.prototype, "method", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Timestamp of when the device was last used',
        example: '2024-05-20T12:34:56.000Z',
    }),
    __metadata("design:type", Date)
], MfaDeviceDto.prototype, "lastUsedAt", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether the device setup has been verified',
        example: true,
    }),
    __metadata("design:type", Boolean)
], MfaDeviceDto.prototype, "verified", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Timestamp of when the device was registered',
        example: '2024-05-18T10:15:00.000Z',
    }),
    __metadata("design:type", Date)
], MfaDeviceDto.prototype, "createdAt", void 0);
class MfaStatusResponseDto {
    isEnabled;
    verifiedMethods;
    configuredMethods;
    allowUserToggle;
    allowMethodSelection;
    totpDevices;
    hasRecoveryCode;
}
exports.MfaStatusResponseDto = MfaStatusResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether MFA is currently enabled for the user',
        example: true,
    }),
    __metadata("design:type", Boolean)
], MfaStatusResponseDto.prototype, "isEnabled", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'MFA methods the user has verified and can currently use (includes EMAIL/SMS if configured, and TOTP if user has verified device)',
        enum: nest_auth_contracts_1.NestAuthMFAMethodEnum,
        isArray: true,
        example: [nest_auth_contracts_1.NestAuthMFAMethodEnum.EMAIL, nest_auth_contracts_1.NestAuthMFAMethodEnum.TOTP],
    }),
    __metadata("design:type", Array)
], MfaStatusResponseDto.prototype, "verifiedMethods", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'All MFA methods configured and available in the application (methods user can potentially set up)',
        enum: nest_auth_contracts_1.NestAuthMFAMethodEnum,
        isArray: true,
        example: [nest_auth_contracts_1.NestAuthMFAMethodEnum.EMAIL, nest_auth_contracts_1.NestAuthMFAMethodEnum.TOTP, nest_auth_contracts_1.NestAuthMFAMethodEnum.SMS],
    }),
    __metadata("design:type", Array)
], MfaStatusResponseDto.prototype, "configuredMethods", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Indicates if MFA toggling is allowed for the user',
        example: true,
    }),
    __metadata("design:type", Boolean)
], MfaStatusResponseDto.prototype, "allowUserToggle", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Indicates if users can choose their preferred MFA method',
        example: true,
    }),
    __metadata("design:type", Boolean)
], MfaStatusResponseDto.prototype, "allowMethodSelection", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Registered TOTP devices for the user',
        type: [MfaDeviceDto],
    }),
    __metadata("design:type", Array)
], MfaStatusResponseDto.prototype, "totpDevices", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether a recovery code has been generated for the user',
        example: false,
    }),
    __metadata("design:type", Boolean)
], MfaStatusResponseDto.prototype, "hasRecoveryCode", void 0);
//# sourceMappingURL=mfa-status.response.dto.js.map