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:
2026-11-13 12:53:09 +01:00
parent b996a8fc83
commit 4fd2ed07eb
34 changed files with 1691 additions and 41 deletions

View File

@@ -573,6 +573,56 @@ func AdminSettingsPut() {}
// @Router /markdown/preview [post]
func AdminMarkdownPreview() {}
// AdminMailImagesList documents GET /mail/images.
//
// @Summary List mail library images
// @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.
// @Tags admin
// @Produce json
// @Security BackendBearer
// @Param q query string false "Filename or title match"
// @Param page query int false "Page (1-based)"
// @Success 200 {object} AdminMailImagesResponse
// @Failure 401 {object} ErrorEnvelope
// @Failure 403 {object} ErrorEnvelope
// @Failure 409 {object} ErrorEnvelope
// @Router /mail/images [get]
func AdminMailImagesList() {}
// AdminMailImagesShow documents GET /mail/images/{id}.
//
// @Summary Show one mail library image
// @Description One library image by id with absolute URLs. An image outside the library is 404.
// @Tags admin
// @Produce json
// @Security BackendBearer
// @Param id path int true "Image id"
// @Success 200 {object} Envelope[AdminMailImage]
// @Failure 401 {object} ErrorEnvelope
// @Failure 403 {object} ErrorEnvelope
// @Failure 404 {object} ErrorEnvelope
// @Failure 409 {object} ErrorEnvelope
// @Router /mail/images/{id} [get]
func AdminMailImagesShow() {}
// AdminMailImagesUpload documents POST /mail/images.
//
// @Summary Upload a mail library image
// @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.
// @Tags admin
// @Accept multipart/form-data
// @Produce json
// @Security BackendBearer
// @Param file formData file true "Image file"
// @Success 201 {object} Envelope[AdminMailImage]
// @Failure 401 {object} ErrorEnvelope
// @Failure 403 {object} ErrorEnvelope
// @Failure 409 {object} ErrorEnvelope
// @Failure 413 {object} ErrorEnvelope
// @Failure 422 {object} ErrorEnvelope
// @Router /mail/images [post]
func AdminMailImagesUpload() {}
// AdminListSchema documents the list schema route.
//
// @Summary Admin list schema