Skip to content

Commit 4c6d89d

Browse files
committed
Add ability to delete messages on the web UI NdoleStudio#322
1 parent de5ca1b commit 4c6d89d

5 files changed

Lines changed: 282 additions & 14 deletions

File tree

api/docs/docs.go

Lines changed: 90 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/docs/swagger.json

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,68 @@
11211121
}
11221122
}
11231123
},
1124+
"/messages/{messageID}": {
1125+
"delete": {
1126+
"security": [
1127+
{
1128+
"ApiKeyAuth": []
1129+
}
1130+
],
1131+
"description": "Delete a message from the database and removes the message content from the list of threads.",
1132+
"consumes": ["application/json"],
1133+
"produces": ["application/json"],
1134+
"tags": ["Messages"],
1135+
"summary": "Delete a message from the database.",
1136+
"parameters": [
1137+
{
1138+
"type": "string",
1139+
"default": "32343a19-da5e-4b1b-a767-3298a73703ca",
1140+
"description": "ID of the message",
1141+
"name": "messageID",
1142+
"in": "path",
1143+
"required": true
1144+
}
1145+
],
1146+
"responses": {
1147+
"204": {
1148+
"description": "No Content",
1149+
"schema": {
1150+
"$ref": "#/definitions/responses.NoContent"
1151+
}
1152+
},
1153+
"400": {
1154+
"description": "Bad Request",
1155+
"schema": {
1156+
"$ref": "#/definitions/responses.BadRequest"
1157+
}
1158+
},
1159+
"401": {
1160+
"description": "Unauthorized",
1161+
"schema": {
1162+
"$ref": "#/definitions/responses.Unauthorized"
1163+
}
1164+
},
1165+
"404": {
1166+
"description": "Not Found",
1167+
"schema": {
1168+
"$ref": "#/definitions/responses.NotFound"
1169+
}
1170+
},
1171+
"422": {
1172+
"description": "Unprocessable Entity",
1173+
"schema": {
1174+
"$ref": "#/definitions/responses.UnprocessableEntity"
1175+
}
1176+
},
1177+
"500": {
1178+
"description": "Internal Server Error",
1179+
"schema": {
1180+
"$ref": "#/definitions/responses.InternalServerError"
1181+
}
1182+
}
1183+
}
1184+
}
1185+
},
11241186
"/messages/{messageID}/events": {
11251187
"post": {
11261188
"security": [
@@ -2024,6 +2086,7 @@
20242086
"request_id",
20252087
"request_received_at",
20262088
"scheduled_at",
2089+
"scheduled_send_time",
20272090
"send_attempt_count",
20282091
"send_time",
20292092
"sent_at",
@@ -2102,6 +2165,10 @@
21022165
"type": "string",
21032166
"example": "2022-06-05T14:26:09.527976+03:00"
21042167
},
2168+
"scheduled_send_time": {
2169+
"type": "string",
2170+
"example": "2022-06-05T14:26:09.527976+03:00"
2171+
},
21052172
"send_attempt_count": {
21062173
"type": "integer",
21072174
"example": 0
@@ -2281,7 +2348,9 @@
22812348
"ultra-yearly",
22822349
"pro-lifetime",
22832350
"20k-monthly",
2284-
"20k-yearly"
2351+
"100k-monthly",
2352+
"20k-yearly",
2353+
"100k-yearly"
22852354
],
22862355
"x-enum-varnames": [
22872356
"SubscriptionNameFree",
@@ -2291,7 +2360,9 @@
22912360
"SubscriptionNameUltraYearly",
22922361
"SubscriptionNameProLifetime",
22932362
"SubscriptionName20KMonthly",
2294-
"SubscriptionName20KYearly"
2363+
"SubscriptionName100KMonthly",
2364+
"SubscriptionName20KYearly",
2365+
"SubscriptionName100KYearly"
22952366
]
22962367
},
22972368
"entities.User": {
@@ -2570,6 +2641,11 @@
25702641
"type": "string",
25712642
"example": "153554b5-ae44-44a0-8f4f-7bbac5657ad4"
25722643
},
2644+
"send_at": {
2645+
"description": "SendAt is an optional parameter used to schedule a message to be sent at a later time",
2646+
"type": "string",
2647+
"example": "2022-06-05T14:26:09.527976+03:00"
2648+
},
25732649
"to": {
25742650
"type": "string",
25752651
"example": "+18005550100"

0 commit comments

Comments
 (0)