Skip to content

Commit

Permalink
add new tools.ozone lexicons to entryway
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Mar 12, 2024
1 parent 7eb9eb4 commit 69fafa3
Show file tree
Hide file tree
Showing 60 changed files with 6,940 additions and 2 deletions.
43 changes: 43 additions & 0 deletions lexicons/tools/ozone/communication/createTemplate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "tools.ozone.communication.createTemplate",
"defs": {
"main": {
"type": "procedure",
"description": "Administrative action to create a new, re-usable communication (email for now) template.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["subject", "contentMarkdown", "name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the template."
},
"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."
},
"createdBy": {
"type": "string",
"format": "did",
"description": "DID of the user who is creating the template."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.communication.defs#templateView"
}
}
}
}
}
38 changes: 38 additions & 0 deletions lexicons/tools/ozone/communication/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"lexicon": 1,
"id": "tools.ozone.communication.defs",
"defs": {
"templateView": {
"type": "object",
"required": [
"id",
"name",
"contentMarkdown",
"disabled",
"lastUpdatedBy",
"createdAt",
"updatedAt"
],
"properties": {
"id": { "type": "string" },
"name": { "type": "string", "description": "Name of the template." },
"subject": {
"type": "string",
"description": "Content of the template, can contain markdown and variable placeholders."
},
"contentMarkdown": {
"type": "string",
"description": "Subject of the message, used in emails."
},
"disabled": { "type": "boolean" },
"lastUpdatedBy": {
"type": "string",
"format": "did",
"description": "DID of the user who last updated the template."
},
"createdAt": { "type": "string", "format": "datetime" },
"updatedAt": { "type": "string", "format": "datetime" }
}
}
}
}
20 changes: 20 additions & 0 deletions lexicons/tools/ozone/communication/deleteTemplate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "tools.ozone.communication.deleteTemplate",
"defs": {
"main": {
"type": "procedure",
"description": "Delete a communication template.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["id"],
"properties": {
"id": { "type": "string" }
}
}
}
}
}
}
26 changes: 26 additions & 0 deletions lexicons/tools/ozone/communication/listTemplates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"lexicon": 1,
"id": "tools.ozone.communication.listTemplates",
"defs": {
"main": {
"type": "query",
"description": "Get list of all communication templates.",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["communicationTemplates"],
"properties": {
"communicationTemplates": {
"type": "array",
"items": {
"type": "ref",
"ref": "tools.ozone.communication.defs#templateView"
}
}
}
}
}
}
}
}
50 changes: 50 additions & 0 deletions lexicons/tools/ozone/communication/updateTemplate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"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."
},
"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"
}
}
}
}
}
Loading

0 comments on commit 69fafa3

Please sign in to comment.