Merge branch 'feat/nl-posts-stats' into feat/newsletter

This commit is contained in:
tgiachi 2026-11-10 13:02:41 +01:00
commit 34f461bb6b

View file

@ -304,6 +304,7 @@ paths:
- {name: id, in: path, required: true, schema: {type: integer}}
delete:
summary: Discard a queued delivery
description: A waiting delivery of a post counts as dropped in the post's counters; a failed one stays counted as failed.
responses:
'204': {description: Discarded}
'404': {$ref: '#/components/responses/Error'}
@ -336,3 +337,34 @@ paths:
errors: {type: array, items: {type: string}, description: The first 20 failures}
'400': {$ref: '#/components/responses/Error'}
'404': {$ref: '#/components/responses/Error'}
/lists/{id}/posts:
parameters:
- {name: id, in: path, required: true, schema: {type: integer}}
get:
summary: Posts queued to the list with their delivery counters, newest first
description: >
One entry per post queued to the list (delivered or approved), kept for 400 days. Confirmation mail is not a post.
Bodies are never read.
parameters:
- {name: limit, in: query, schema: {type: integer, default: 50, maximum: 200}, description: 0 means the default; more than 200 gives 200}
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
type: object
properties:
id: {type: integer}
message_id: {type: string, description: The Message-ID header, at most 200 characters; empty when there was none}
subject: {type: string, description: Decoded, at most 200 characters, control characters removed}
created_at: {type: string, format: date-time}
recipients: {type: integer, description: Deliveries queued (members at the time of the post)}
sent: {type: integer, description: Accepted by the relay}
failed: {type: integer, description: Given up for good (refused by the relay, or still failing after 3 days)}
dropped: {type: integer, description: The mailbox does not exist, or the delivery was discarded}
pending: {type: integer, description: "Still in the queue: recipients - sent - failed - dropped"}
'400': {$ref: '#/components/responses/Error'}
'404': {$ref: '#/components/responses/Error'}