"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.Verify2faWithTokensResponseDto = exports.AuthWithTokensResponseDto = exports.UserResponseDto = exports.AuthTokensResponseDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const nest_auth_contracts_1 = require("@ackplus/nest-auth-contracts");
class AuthTokensResponseDto {
    accessToken;
    refreshToken;
}
exports.AuthTokensResponseDto = AuthTokensResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'JWT access token (short-lived)',
        example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJpYXQiOjE2OTk5OTk5OTksImV4cCI6MTY5OTk5OTk5OX0.xyz',
    }),
    __metadata("design:type", String)
], AuthTokensResponseDto.prototype, "accessToken", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'JWT refresh token (long-lived)',
        example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY5OTk5OTk5OX0.abc',
    }),
    __metadata("design:type", String)
], AuthTokensResponseDto.prototype, "refreshToken", void 0);
class UserResponseDto {
    id;
    email;
    phone;
    isVerified;
    isMfaEnabled;
    roles;
    permissions;
    metadata;
    tenantId;
}
exports.UserResponseDto = UserResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'User unique identifier',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], UserResponseDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'User email address',
        example: 'user@example.com',
    }),
    __metadata("design:type", String)
], UserResponseDto.prototype, "email", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'User phone number',
        example: '+1234567890',
    }),
    __metadata("design:type", String)
], UserResponseDto.prototype, "phone", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Email verification status',
        example: true,
    }),
    __metadata("design:type", Boolean)
], UserResponseDto.prototype, "isVerified", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Whether MFA is enabled for this user',
        example: false,
    }),
    __metadata("design:type", Boolean)
], UserResponseDto.prototype, "isMfaEnabled", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'User roles (role names)',
        example: ['admin', 'user'],
        type: [String],
    }),
    __metadata("design:type", Array)
], UserResponseDto.prototype, "roles", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'User permissions (flattened from roles)',
        example: ['read:users', 'write:users'],
        type: [String],
    }),
    __metadata("design:type", Array)
], UserResponseDto.prototype, "permissions", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Additional user metadata',
        example: { firstName: 'John', lastName: 'Doe' },
    }),
    __metadata("design:type", Object)
], UserResponseDto.prototype, "metadata", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Tenant ID for multi-tenant applications',
        example: 'tenant-123',
    }),
    __metadata("design:type", String)
], UserResponseDto.prototype, "tenantId", void 0);
class AuthWithTokensResponseDto extends AuthTokensResponseDto {
    message;
    isRequiresMfa;
    mfaMethods;
    defaultMfaMethod;
    user;
}
exports.AuthWithTokensResponseDto = AuthWithTokensResponseDto;
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Success message (added by controller based on configuration)',
        example: 'Login successful',
    }),
    __metadata("design:type", String)
], AuthWithTokensResponseDto.prototype, "message", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether multi-factor authentication is required',
        example: false,
    }),
    __metadata("design:type", Boolean)
], AuthWithTokensResponseDto.prototype, "isRequiresMfa", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Available MFA methods when isRequiresMfa is true',
        example: ['email', 'totp'],
        enum: nest_auth_contracts_1.NestAuthMFAMethodEnum,
        isArray: true,
    }),
    __metadata("design:type", Array)
], AuthWithTokensResponseDto.prototype, "mfaMethods", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Default/recommended MFA method',
        example: 'email',
        enum: nest_auth_contracts_1.NestAuthMFAMethodEnum,
    }),
    __metadata("design:type", String)
], AuthWithTokensResponseDto.prototype, "defaultMfaMethod", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'User information',
        type: UserResponseDto,
    }),
    __metadata("design:type", UserResponseDto)
], AuthWithTokensResponseDto.prototype, "user", void 0);
class Verify2faWithTokensResponseDto extends AuthTokensResponseDto {
    message;
}
exports.Verify2faWithTokensResponseDto = Verify2faWithTokensResponseDto;
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Verification success message (added by controller)',
        example: '2FA verification successful',
    }),
    __metadata("design:type", String)
], Verify2faWithTokensResponseDto.prototype, "message", void 0);
//# sourceMappingURL=auth.response.dto.js.map