"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.CreateDTO = void 0;
const api_locale_1 = require("@hed-hog/api-locale");
const class_transformer_1 = require("class-transformer");
const class_validator_1 = require("class-validator");
const providerOptions = ['SMTP', 'GMAIL', 'SES'];
class CreateDTO {
}
exports.CreateDTO = CreateDTO;
__decorate([
    (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
    (0, class_validator_1.MaxLength)(127),
    (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "slug", void 0);
__decorate([
    (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
    (0, class_validator_1.MaxLength)(127),
    (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "name", void 0);
__decorate([
    (0, class_validator_1.IsIn)(providerOptions),
    (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim().toUpperCase()),
    __metadata("design:type", Object)
], CreateDTO.prototype, "provider", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(127),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "from_name", void 0);
__decorate([
    (0, class_validator_1.IsEmail)({}, { message: 'Invalid email address.' }),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "from_email", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(127),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "reply_to_name", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsEmail)({}, { message: 'Invalid email address.' }),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "reply_to_email", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "smtp_host", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : Number(value)),
    (0, class_validator_1.IsInt)(),
    (0, class_validator_1.Min)(1),
    __metadata("design:type", Number)
], CreateDTO.prototype, "smtp_port", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_transformer_1.Transform)(({ value }) => value === true || value === 'true' || value === 1 || value === '1'),
    (0, class_validator_1.IsBoolean)(),
    __metadata("design:type", Boolean)
], CreateDTO.prototype, "smtp_secure", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "smtp_username", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value)),
    __metadata("design:type", String)
], CreateDTO.prototype, "smtp_password", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "gmail_client_id", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value)),
    __metadata("design:type", String)
], CreateDTO.prototype, "gmail_client_secret", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value)),
    __metadata("design:type", String)
], CreateDTO.prototype, "gmail_refresh_token", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "ses_access_key_id", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(255),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value)),
    __metadata("design:type", String)
], CreateDTO.prototype, "ses_secret_access_key", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(127),
    (0, class_transformer_1.Transform)(({ value }) => value === undefined || value === null || value === '' ? undefined : String(value).trim()),
    __metadata("design:type", String)
], CreateDTO.prototype, "ses_region", void 0);
//# sourceMappingURL=create.dto.js.map