feat(cabana): code editor, colour and mail image fields, mail branding and the image library
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -403,6 +403,73 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.AdminMailImage": {
|
||||
"properties": {
|
||||
"fileName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"thumbUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"fileName",
|
||||
"id",
|
||||
"title",
|
||||
"url"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.AdminMailImagesMeta": {
|
||||
"properties": {
|
||||
"canUpload": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"page": {
|
||||
"type": "integer"
|
||||
},
|
||||
"perPage": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"canUpload",
|
||||
"page",
|
||||
"perPage",
|
||||
"total"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.AdminMailImagesResponse": {
|
||||
"properties": {
|
||||
"data": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/cabana.AdminMailImage"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/cabana.AdminMailImagesMeta"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"meta"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.AdminMarkdownPreviewRequest": {
|
||||
"properties": {
|
||||
"markdown": {
|
||||
@@ -981,6 +1048,21 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.Envelope-cabana_AdminMailImage": {
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/cabana.AdminMailImage"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/cabana.SuccessMeta"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"meta"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"cabana.Envelope-cabana_AdminMarkdownPreviewResult": {
|
||||
"properties": {
|
||||
"data": {
|
||||
@@ -1570,6 +1652,14 @@
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"language": {
|
||||
"description": "Language is the codeeditor language: html, css or text.",
|
||||
"type": "string"
|
||||
},
|
||||
"mailImages": {
|
||||
"description": "MailImages, when true, shows the mail image insert control on a\nmarkdown or codeeditor field.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"max": {
|
||||
"description": "Max is a money field's column ceiling as a decimal string; a value\nabove it in absolute magnitude is a 422 money.too_large.",
|
||||
"type": "string"
|
||||
@@ -1604,7 +1694,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"mode": {
|
||||
"description": "Mode is the fileupload mode (image or file, default file), the\ndatepicker mode (date, datetime or time, default datetime), the\npermissioneditor mode (radio or checkbox) or the taglist mode (string,\nthe default, or array).",
|
||||
"description": "Mode is the fileupload mode (image or file, default file), the\ndatepicker mode (date, datetime or time, default datetime), the\npermissioneditor mode (radio or checkbox), the taglist mode (string,\nthe default, or array), or the mailpreview mode (template, layout,\npartial or branding).",
|
||||
"type": "string"
|
||||
},
|
||||
"multiple": {
|
||||
@@ -2154,6 +2244,14 @@
|
||||
"recordCount": {
|
||||
"$ref": "#/components/schemas/cabana.MessageForms"
|
||||
},
|
||||
"rowStateCustomized": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/cabana.MessageForms"
|
||||
}
|
||||
],
|
||||
"description": "The customized and outdated row-state labels."
|
||||
},
|
||||
"rowStateDeleted": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -2168,6 +2266,9 @@
|
||||
"rowStateNegative": {
|
||||
"$ref": "#/components/schemas/cabana.MessageForms"
|
||||
},
|
||||
"rowStateOutdated": {
|
||||
"$ref": "#/components/schemas/cabana.MessageForms"
|
||||
},
|
||||
"searchPrompt": {
|
||||
"$ref": "#/components/schemas/cabana.MessageForms"
|
||||
},
|
||||
@@ -2184,9 +2285,11 @@
|
||||
"emptySearch",
|
||||
"emptySearchHint",
|
||||
"recordCount",
|
||||
"rowStateCustomized",
|
||||
"rowStateDeleted",
|
||||
"rowStateDisabled",
|
||||
"rowStateNegative",
|
||||
"rowStateOutdated",
|
||||
"searchPrompt",
|
||||
"selected"
|
||||
],
|
||||
@@ -2710,6 +2813,10 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"deletable": {
|
||||
"description": "Deletable tells the admin whether the record's form offers Delete. Only\nthe show response of a controller that decides it per record (the mail\nscreens: a custom layout can be deleted, a file-backed row cannot)\ncarries it; it is omitted otherwise, and Delete then shows as before.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"labels": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
@@ -4230,6 +4337,251 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/mail/images": {
|
||||
"get": {
|
||||
"description": "Lists public mail library images with absolute URLs. Holders of either mail permission may list; meta.canUpload is true only for system.manage_mail_layouts. Without storage.uploads.public_url or app.url the route answers 409 with mail.images.no_public_url.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Filename or title match",
|
||||
"in": "query",
|
||||
"name": "q",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Page (1-based)",
|
||||
"in": "query",
|
||||
"name": "page",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.AdminMailImagesResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Forbidden"
|
||||
},
|
||||
"409": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Conflict"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"BackendBearer": []
|
||||
}
|
||||
],
|
||||
"summary": "List mail library images",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"description": "Stores a multipart file part as a public library image and answers it with absolute URLs. Needs system.manage_mail_layouts. Without an absolute public URL base the route answers 409.",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"file": {
|
||||
"description": "Image file",
|
||||
"format": "binary",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"file"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.Envelope-cabana_AdminMailImage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Created"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Forbidden"
|
||||
},
|
||||
"409": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Conflict"
|
||||
},
|
||||
"413": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Request Entity Too Large"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unprocessable Entity"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"BackendBearer": []
|
||||
}
|
||||
],
|
||||
"summary": "Upload a mail library image",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/mail/images/{id}": {
|
||||
"get": {
|
||||
"description": "One library image by id with absolute URLs. An image outside the library is 404.",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Image id",
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.Envelope-cabana_AdminMailImage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Not Found"
|
||||
},
|
||||
"409": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/cabana.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Conflict"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"BackendBearer": []
|
||||
}
|
||||
],
|
||||
"summary": "Show one mail library image",
|
||||
"tags": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/markdown/preview": {
|
||||
"post": {
|
||||
"description": "Renders the markdown source through cabana.RenderMarkdown (goldmark without unsafe HTML) and answers the sanitized HTML. Output the renderer's gate refuses is a 422 on markdown. Any backend session may call it.",
|
||||
|
||||
Reference in New Issue
Block a user