"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.RegisterCAResponseDto = exports.RegisterCADto = void 0;
const swagger_1 = require("@nestjs/swagger");
const class_validator_1 = require("class-validator");
class RegisterCADto {
}
exports.RegisterCADto = RegisterCADto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'SSH CA public key in OpenSSH format (ssh-ed25519 or ssh-rsa)',
        example: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbCdEfGhIjKlMnOpQrStUvWxYz...',
    }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], RegisterCADto.prototype, "publicKey", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Optional name for the CA (defaults to flui-ca-{date})',
        example: 'flui-ca-2025-12-31',
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], RegisterCADto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'If true, replaces existing active CA by setting it to inactive',
        default: false,
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsBoolean)(),
    __metadata("design:type", Boolean)
], RegisterCADto.prototype, "replace", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Optional metadata to store with the CA',
        example: { source: 'cli', version: '1.0.0' },
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsObject)(),
    __metadata("design:type", Object)
], RegisterCADto.prototype, "metadata", void 0);
class RegisterCAResponseDto {
}
exports.RegisterCAResponseDto = RegisterCAResponseDto;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'CA keypair ID',
        example: '123e4567-e89b-12d3-a456-426614174000',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "id", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'CA name',
        example: 'flui-ca-2025-12-31',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'CA public key in OpenSSH format',
        example: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbCdEfGhIjKlMnOpQrStUvWxYz...',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "publicKey", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'SHA256 fingerprint of the public key',
        example: 'SHA256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "fingerprint", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Key type (ed25519 or rsa)',
        example: 'ed25519',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "type", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Creation timestamp',
        example: '2025-12-31T10:00:00.000Z',
    }),
    __metadata("design:type", Date)
], RegisterCAResponseDto.prototype, "createdAt", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Optional expiration date',
        example: '2026-03-31T10:00:00.000Z',
    }),
    __metadata("design:type", Date)
], RegisterCAResponseDto.prototype, "expiresAt", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Status message',
        example: 'CA registered successfully',
    }),
    __metadata("design:type", String)
], RegisterCAResponseDto.prototype, "message", void 0);
