diff --git a/server/apiv1/api.go b/server/apiv1/api.go index 15bce45..0dfbed7 100644 --- a/server/apiv1/api.go +++ b/server/apiv1/api.go @@ -147,7 +147,7 @@ func GetMessage(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: Message ID + // description: Database ID // required: true // type: string // @@ -188,7 +188,7 @@ func DownloadAttachment(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: Message ID + // description: Database ID // required: true // type: string // + name: PartID @@ -237,7 +237,7 @@ func GetHeaders(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: Message ID + // description: Database ID // required: true // type: string // @@ -284,7 +284,7 @@ func DownloadRaw(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: Message ID + // description: Database ID // required: true // type: string // @@ -330,7 +330,7 @@ func DeleteMessages(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ids // in: body - // description: Message IDs to delete + // description: Database IDs to delete // required: false // type: DeleteRequest // @@ -381,7 +381,7 @@ func SetReadStatus(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ids // in: body - // description: Message IDs to update + // description: Database IDs to update // required: false // type: SetReadStatusRequest // @@ -459,7 +459,7 @@ func SetTags(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ids // in: body - // description: Message IDs to update + // description: Database IDs to update // required: true // type: SetTagsRequest // @@ -502,7 +502,7 @@ func ReleaseMessage(w http.ResponseWriter, r *http.Request) { // // # Release message // - // Release a message via a preconfigured external SMTP server.. + // Release a message via a pre-configured external SMTP server.. // // Consumes: // - application/json @@ -515,7 +515,7 @@ func ReleaseMessage(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: Message ID + // description: Database ID // required: true // type: string // + name: to diff --git a/server/apiv1/thumbnails.go b/server/apiv1/thumbnails.go index 0ad9ccd..c90b3c7 100644 --- a/server/apiv1/thumbnails.go +++ b/server/apiv1/thumbnails.go @@ -39,12 +39,12 @@ func Thumbnail(w http.ResponseWriter, r *http.Request) { // Parameters: // + name: ID // in: path - // description: message id + // description: Database ID // required: true // type: string // + name: PartID // in: path - // description: attachment part id + // description: Attachment part ID // required: true // type: string // diff --git a/server/ui/api/v1/swagger.json b/server/ui/api/v1/swagger.json index 3336174..db1a885 100644 --- a/server/ui/api/v1/swagger.json +++ b/server/ui/api/v1/swagger.json @@ -66,7 +66,7 @@ "parameters": [ { "type": "string", - "description": "Message ID", + "description": "Database ID", "name": "ID", "in": "path", "required": true @@ -103,7 +103,7 @@ "parameters": [ { "type": "string", - "description": "Message ID", + "description": "Database ID", "name": "ID", "in": "path", "required": true @@ -142,7 +142,7 @@ "parameters": [ { "type": "string", - "description": "Message ID", + "description": "Database ID", "name": "ID", "in": "path", "required": true @@ -183,14 +183,14 @@ "parameters": [ { "type": "string", - "description": "message id", + "description": "Database ID", "name": "ID", "in": "path", "required": true }, { "type": "string", - "description": "attachment part id", + "description": "Attachment part ID", "name": "PartID", "in": "path", "required": true @@ -224,7 +224,7 @@ "parameters": [ { "type": "string", - "description": "Message ID", + "description": "Database ID", "name": "ID", "in": "path", "required": true @@ -242,7 +242,7 @@ }, "/api/v1/message/{ID}/release": { "post": { - "description": "Release a message via a preconfigured external SMTP server..", + "description": "Release a message via a pre-configured external SMTP server..", "consumes": [ "application/json" ], @@ -261,7 +261,7 @@ "parameters": [ { "type": "string", - "description": "Message ID", + "description": "Database ID", "name": "ID", "in": "path", "required": true @@ -347,11 +347,11 @@ "operationId": "SetReadStatus", "parameters": [ { - "description": "Message IDs to update", + "description": "Database IDs to update", "name": "ids", "in": "body", "schema": { - "description": "Message IDs to update", + "description": "Database IDs to update", "type": "object", "$ref": "#/definitions/SetReadStatusRequest" } @@ -385,11 +385,11 @@ "operationId": "Delete", "parameters": [ { - "description": "Message IDs to delete", + "description": "Database IDs to delete", "name": "ids", "in": "body", "schema": { - "description": "Message IDs to delete", + "description": "Database IDs to delete", "type": "object", "$ref": "#/definitions/DeleteRequest" } @@ -466,12 +466,12 @@ "operationId": "SetTags", "parameters": [ { - "description": "Message IDs to update", + "description": "Database IDs to update", "name": "ids", "in": "body", "required": true, "schema": { - "description": "Message IDs to update", + "description": "Database IDs to update", "type": "object", "$ref": "#/definitions/SetTagsRequest" } @@ -751,6 +751,10 @@ "description": "Database ID", "type": "string" }, + "MessageID": { + "description": "Message ID", + "type": "string" + }, "Read": { "description": "Read status", "type": "boolean" @@ -901,6 +905,10 @@ "description": "Whether message relaying (release) is enabled", "type": "boolean" }, + "RecipientAllowlist": { + "description": "Allowlist of accepted recipients", + "type": "string" + }, "ReturnPath": { "description": "Enforced Return-Path (if set) for relay bounces", "type": "string" diff --git a/storage/tags.go b/storage/tags.go index d9cdf2c..e304335 100644 --- a/storage/tags.go +++ b/storage/tags.go @@ -12,7 +12,7 @@ import ( "github.com/leporo/sqlf" ) -// SetTags will set the tags for a given message ID, used via API +// SetTags will set the tags for a given database ID, used via API func SetTags(id string, tags []string) error { applyTags := []string{} reg := regexp.MustCompile(`\s+`) @@ -61,7 +61,7 @@ func findTags(message *[]byte) []string { return tags } -// Get message tags from the database for a given message ID. +// Get message tags from the database for a given database ID // Used when parsing a raw email. func getMessageTags(id string) []string { tags := []string{}