e4d41d66fa
* ✨ Throw specific error for duplicate template name * 🧹 Cleanup console * ✨ Throw duplicate template name error from update too * ✨ Add language to templates * 📝 Add changeset * ✨ Add missing event type * ✨ Add language format in lexicon and error checker in util * 🚨 fix linter issues
57 lines
1.7 KiB
JSON
57 lines
1.7 KiB
JSON
{
|
|
"lexicon": 1,
|
|
"id": "tools.ozone.communication.updateTemplate",
|
|
"defs": {
|
|
"main": {
|
|
"type": "procedure",
|
|
"description": "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",
|
|
"input": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["id"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "ID of the template to be updated."
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the template."
|
|
},
|
|
"lang": {
|
|
"type": "string",
|
|
"format": "language",
|
|
"description": "Message language."
|
|
},
|
|
"contentMarkdown": {
|
|
"type": "string",
|
|
"description": "Content of the template, markdown supported, can contain variable placeholders."
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Subject of the message, used in emails."
|
|
},
|
|
"updatedBy": {
|
|
"type": "string",
|
|
"format": "did",
|
|
"description": "DID of the user who is updating the template."
|
|
},
|
|
"disabled": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"encoding": "application/json",
|
|
"schema": {
|
|
"type": "ref",
|
|
"ref": "tools.ozone.communication.defs#templateView"
|
|
}
|
|
},
|
|
"errors": [{ "name": "DuplicateTemplateName" }]
|
|
}
|
|
}
|
|
}
|