add admin API email endpoints (#22792)

add email endpoint to admin API to ensure API parity with admin
dashboard.
This commit is contained in:
techknowlogick
2023-03-14 03:54:40 -04:00
committed by GitHub
parent 03591f0f95
commit d56bb74201
5 changed files with 188 additions and 0 deletions

View File

@ -138,6 +138,80 @@
}
}
},
"/admin/emails": {
"get": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List all emails",
"operationId": "adminGetAllEmails",
"parameters": [
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/EmailList"
},
"403": {
"$ref": "#/responses/forbidden"
}
}
}
},
"/admin/emails/search": {
"get": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Search all emails",
"operationId": "adminSearchEmails",
"parameters": [
{
"type": "string",
"description": "keyword",
"name": "q",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/EmailList"
},
"403": {
"$ref": "#/responses/forbidden"
}
}
}
},
"/admin/hooks": {
"get": {
"produces": [
@ -16999,6 +17073,15 @@
"type": "boolean",
"x-go-name": "Primary"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
},
"username": {
"type": "string",
"x-go-name": "UserName"
},
"verified": {
"type": "boolean",
"x-go-name": "Verified"