feat(api): list policies, held queue and member bounce state
- Add post_policy and join_policy to lists, patchable per field - Add held message listing, approve and discard endpoints - Expose disabled and bounce_count on members - Reject '+' in list names, it is the command separator - Wire the router release into the daemon - Update OpenAPI description and README
This commit is contained in:
parent
966b3e0234
commit
ad58789630
1 changed files with 317 additions and 24 deletions
|
|
@ -20,11 +20,23 @@ components:
|
|||
domain: {type: string}
|
||||
title: {type: string}
|
||||
address: {type: string}
|
||||
post_policy: {type: string, enum: [members, moderated]}
|
||||
join_policy: {type: string, enum: [open, closed]}
|
||||
Member:
|
||||
type: object
|
||||
properties:
|
||||
address: {type: string}
|
||||
display_name: {type: string}
|
||||
disabled: {type: boolean, description: Disabled after 3 hard bounces; re-adding the member re-enables it}
|
||||
bounce_count: {type: integer}
|
||||
Held:
|
||||
type: object
|
||||
properties:
|
||||
id: {type: integer}
|
||||
sender: {type: string}
|
||||
subject: {type: string}
|
||||
size: {type: integer}
|
||||
created_at: {type: string, format: date-time}
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -85,16 +97,17 @@ paths:
|
|||
schema: {$ref: '#/components/schemas/List'}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
patch:
|
||||
summary: Update the list title
|
||||
summary: Update title and policies (send only the fields to change)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [title]
|
||||
properties:
|
||||
title: {type: string}
|
||||
post_policy: {type: string, enum: [members, moderated]}
|
||||
join_policy: {type: string, enum: [open, closed]}
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
|
@ -149,3 +162,32 @@ paths:
|
|||
responses:
|
||||
'204': {description: Removed}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
/lists/{id}/held:
|
||||
parameters:
|
||||
- {name: id, in: path, required: true, schema: {type: integer}}
|
||||
get:
|
||||
summary: Messages waiting for moderation
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema: {type: array, items: {$ref: '#/components/schemas/Held'}}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
/held/{id}/approve:
|
||||
parameters:
|
||||
- {name: id, in: path, required: true, schema: {type: integer}}
|
||||
post:
|
||||
summary: Approve and deliver a held message
|
||||
responses:
|
||||
'204': {description: Delivered}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
'501': {$ref: '#/components/responses/Error'}
|
||||
/held/{id}:
|
||||
parameters:
|
||||
- {name: id, in: path, required: true, schema: {type: integer}}
|
||||
delete:
|
||||
summary: Discard a held message
|
||||
responses:
|
||||
'204': {description: Discarded}
|
||||
'404': {$ref: '#/components/responses/Error'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue