@ackplus/nest-dynamic-templates
Version:
Dynamic template management for NestJS applications
68 lines • 2.56 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.RenderTemplateLayoutOutput = exports.RenderTemplateLayoutDto = void 0;
const tslib_1 = require("tslib");
const class_validator_1 = require("class-validator");
const swagger_1 = require("@nestjs/swagger");
class RenderTemplateLayoutDto {
constructor() {
this.locale = 'en';
this.scopeId = null;
}
}
exports.RenderTemplateLayoutDto = RenderTemplateLayoutDto;
tslib_1.__decorate([
(0, swagger_1.ApiPropertyOptional)({
type: String,
default: 'en',
description: 'The locale code, i.e en, fr, es, etc.'
}),
(0, class_validator_1.IsString)(),
(0, class_validator_1.IsOptional)(),
tslib_1.__metadata("design:type", String)
], RenderTemplateLayoutDto.prototype, "locale", void 0);
tslib_1.__decorate([
(0, swagger_1.ApiProperty)({ type: String }),
(0, class_validator_1.IsString)(),
(0, class_validator_1.IsNotEmpty)(),
tslib_1.__metadata("design:type", String)
], RenderTemplateLayoutDto.prototype, "name", void 0);
tslib_1.__decorate([
(0, swagger_1.ApiProperty)({
type: String,
default: 'system',
description: 'The scope of the template, i.e user, organization, etc.'
}),
(0, class_validator_1.IsString)(),
tslib_1.__metadata("design:type", String)
], RenderTemplateLayoutDto.prototype, "scope", void 0);
tslib_1.__decorate([
(0, swagger_1.ApiPropertyOptional)({
type: String,
default: null,
description: 'The scope id of the template, i.e user id, organization id, etc.'
}),
(0, class_validator_1.IsString)(),
(0, class_validator_1.IsOptional)(),
tslib_1.__metadata("design:type", String)
], RenderTemplateLayoutDto.prototype, "scopeId", void 0);
tslib_1.__decorate([
(0, swagger_1.ApiPropertyOptional)({
type: String,
nullable: true,
description: 'The context of the template'
}),
(0, class_validator_1.IsObject)(),
(0, class_validator_1.IsOptional)(),
tslib_1.__metadata("design:type", Object)
], RenderTemplateLayoutDto.prototype, "context", void 0);
class RenderTemplateLayoutOutput {
}
exports.RenderTemplateLayoutOutput = RenderTemplateLayoutOutput;
tslib_1.__decorate([
(0, swagger_1.ApiProperty)({ type: String }),
(0, class_validator_1.IsString)(),
(0, class_validator_1.IsNotEmpty)(),
tslib_1.__metadata("design:type", String)
], RenderTemplateLayoutOutput.prototype, "content", void 0);
//# sourceMappingURL=render-template-layout.dto.js.map
;