mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Backport #12164 This PR extends the notifications API to allow specific notification statuses to be searched for and to allow setting of notifications to statuses other than read. By default unread and pinned statuses will be returned when querying for notifications - however pinned statuses will not be marked as read. Close #12152 Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
@@ -459,6 +459,16 @@
|
||||
"name": "all",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi",
|
||||
"description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.",
|
||||
"name": "status-types",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
@@ -502,7 +512,7 @@
|
||||
"tags": [
|
||||
"notification"
|
||||
],
|
||||
"summary": "Mark notification threads as read",
|
||||
"summary": "Mark notification threads as read, pinned or unread",
|
||||
"operationId": "notifyReadList",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -511,6 +521,28 @@
|
||||
"description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
|
||||
"name": "last_read_at",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "If true, mark all notifications on this repo. Default value is false",
|
||||
"name": "all",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi",
|
||||
"description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
|
||||
"name": "status-types",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Status to mark notifications as, Defaults to read.",
|
||||
"name": "to-status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -587,6 +619,13 @@
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"default": "read",
|
||||
"description": "Status to mark notifications as",
|
||||
"name": "to-status",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -6290,6 +6329,16 @@
|
||||
"name": "all",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi",
|
||||
"description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
|
||||
"name": "status-types",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
@@ -6333,7 +6382,7 @@
|
||||
"tags": [
|
||||
"notification"
|
||||
],
|
||||
"summary": "Mark notification threads as read on a specific repo",
|
||||
"summary": "Mark notification threads as read, pinned or unread on a specific repo",
|
||||
"operationId": "notifyReadRepoList",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -6350,6 +6399,28 @@
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "If true, mark all notifications on this repo. Default value is false",
|
||||
"name": "all",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi",
|
||||
"description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
|
||||
"name": "status-types",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Status to mark notifications as. Defaults to read.",
|
||||
"name": "to-status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
|
Reference in New Issue
Block a user