Skip to content

Commit

Permalink
feat(templates): Removed MJML support
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Aug 20, 2024
1 parent 823fdd7 commit b976e53
Show file tree
Hide file tree
Showing 9 changed files with 249 additions and 1,725 deletions.
26 changes: 5 additions & 21 deletions lib/api-routes/template-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ async function init(args) {
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
content: Joi.object({
subject: templateSchemas.subject,
text: templateSchemas.text,
Expand Down Expand Up @@ -179,11 +176,7 @@ async function init(args) {
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.empty('')
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().empty('').valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
content: Joi.object({
subject: templateSchemas.subject,
text: templateSchemas.text,
Expand Down Expand Up @@ -284,10 +277,7 @@ async function init(args) {
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
created: Joi.date().iso().example('2021-02-17T13:43:18.860Z').description('The time this template was created'),
updated: Joi.date().iso().example('2021-02-17T13:43:18.860Z').description('The time this template was last updated')
}).label('AccountTemplate')
Expand Down Expand Up @@ -355,21 +345,15 @@ async function init(args) {
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
created: Joi.date().iso().example('2021-02-17T13:43:18.860Z').description('The time this template was created'),
updated: Joi.date().iso().example('2021-02-17T13:43:18.860Z').description('The time this template was last updated'),
content: Joi.object({
subject: templateSchemas.subject,
text: templateSchemas.text,
html: templateSchemas.html,
previewText: templateSchemas.previewText,
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")')
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")')
}).label('RequestTemplateContent')
}).label('AccountTemplateResponse'),
failAction: 'log'
Expand Down
14 changes: 2 additions & 12 deletions lib/routes-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ const CODE_FORMATS = [
format: 'html',
name: 'HTML'
},
{
format: 'mjml',
name: 'MJML'
},
{
format: 'markdown',
name: 'Markdown'
Expand Down Expand Up @@ -3951,10 +3947,7 @@ return payload;`)
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
subject: templateSchemas.subject,
contentText: templateSchemas.text,
contentHtml: templateSchemas.html,
Expand Down Expand Up @@ -4157,10 +4150,7 @@ return payload;`)
.example('Something about the template')
.description('Optional description of the template')
.label('TemplateDescription'),
format: Joi.string()
.valid('html', 'mjml', 'markdown')
.default('html')
.description('Markup language for HTML ("html", "markdown" or "mjml")'),
format: Joi.string().valid('html', 'markdown').default('html').description('Markup language for HTML ("html" or "markdown")'),
subject: templateSchemas.subject,
contentText: templateSchemas.text,
contentHtml: templateSchemas.html,
Expand Down
Loading

0 comments on commit b976e53

Please sign in to comment.