Skip to content

Commit 4cb1c02

Browse files
committed
Add ability to bulk delete messages and threads. closes NdoleStudio#434
1 parent 2037370 commit 4cb1c02

21 files changed

Lines changed: 1375 additions & 37 deletions

api/docs/docs.go

Lines changed: 147 additions & 2 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: 135 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"schemes": ["http", "https"],
2+
"schemes": ["https"],
33
"swagger": "2.0",
44
"info": {
55
"description": "API to send SMS messages using android [SmsManager](https://developer.android.com/reference/android/telephony/SmsManager) via HTTP",
@@ -1187,6 +1187,83 @@
11871187
}
11881188
}
11891189
},
1190+
"/messages/search": {
1191+
"get": {
1192+
"security": [
1193+
{
1194+
"ApiKeyAuth": []
1195+
}
1196+
],
1197+
"description": "This returns the list of all messages based on the filter criteria including missed calls",
1198+
"consumes": ["application/json"],
1199+
"produces": ["application/json"],
1200+
"tags": ["Messages"],
1201+
"summary": "Search all messages of a user",
1202+
"parameters": [
1203+
{
1204+
"type": "string",
1205+
"default": "+18005550199,+18005550100",
1206+
"description": "the owner's phone numbers",
1207+
"name": "owners",
1208+
"in": "query",
1209+
"required": true
1210+
},
1211+
{
1212+
"minimum": 0,
1213+
"type": "integer",
1214+
"description": "number of messages to skip",
1215+
"name": "skip",
1216+
"in": "query"
1217+
},
1218+
{
1219+
"type": "string",
1220+
"description": "filter messages containing query",
1221+
"name": "query",
1222+
"in": "query"
1223+
},
1224+
{
1225+
"maximum": 200,
1226+
"minimum": 1,
1227+
"type": "integer",
1228+
"description": "number of messages to return",
1229+
"name": "limit",
1230+
"in": "query"
1231+
}
1232+
],
1233+
"responses": {
1234+
"200": {
1235+
"description": "OK",
1236+
"schema": {
1237+
"$ref": "#/definitions/responses.MessagesResponse"
1238+
}
1239+
},
1240+
"400": {
1241+
"description": "Bad Request",
1242+
"schema": {
1243+
"$ref": "#/definitions/responses.BadRequest"
1244+
}
1245+
},
1246+
"401": {
1247+
"description": "Unauthorized",
1248+
"schema": {
1249+
"$ref": "#/definitions/responses.Unauthorized"
1250+
}
1251+
},
1252+
"422": {
1253+
"description": "Unprocessable Entity",
1254+
"schema": {
1255+
"$ref": "#/definitions/responses.UnprocessableEntity"
1256+
}
1257+
},
1258+
"500": {
1259+
"description": "Internal Server Error",
1260+
"schema": {
1261+
"$ref": "#/definitions/responses.InternalServerError"
1262+
}
1263+
}
1264+
}
1265+
}
1266+
},
11901267
"/messages/send": {
11911268
"post": {
11921269
"security": [
@@ -1748,6 +1825,62 @@
17481825
}
17491826
}
17501827
},
1828+
"/users/{userID}/api-keys": {
1829+
"delete": {
1830+
"security": [
1831+
{
1832+
"ApiKeyAuth": []
1833+
}
1834+
],
1835+
"description": "Rotate the user's API key in case the current API Key is compromised",
1836+
"consumes": ["application/json"],
1837+
"produces": ["application/json"],
1838+
"tags": ["Users"],
1839+
"summary": "Rotate the user's API Key",
1840+
"parameters": [
1841+
{
1842+
"type": "string",
1843+
"default": "32343a19-da5e-4b1b-a767-3298a73703ca",
1844+
"description": "ID of the user to update",
1845+
"name": "userID",
1846+
"in": "path",
1847+
"required": true
1848+
}
1849+
],
1850+
"responses": {
1851+
"200": {
1852+
"description": "OK",
1853+
"schema": {
1854+
"$ref": "#/definitions/responses.UserResponse"
1855+
}
1856+
},
1857+
"400": {
1858+
"description": "Bad Request",
1859+
"schema": {
1860+
"$ref": "#/definitions/responses.BadRequest"
1861+
}
1862+
},
1863+
"401": {
1864+
"description": "Unauthorized",
1865+
"schema": {
1866+
"$ref": "#/definitions/responses.Unauthorized"
1867+
}
1868+
},
1869+
"422": {
1870+
"description": "Unprocessable Entity",
1871+
"schema": {
1872+
"$ref": "#/definitions/responses.UnprocessableEntity"
1873+
}
1874+
},
1875+
"500": {
1876+
"description": "Internal Server Error",
1877+
"schema": {
1878+
"$ref": "#/definitions/responses.InternalServerError"
1879+
}
1880+
}
1881+
}
1882+
}
1883+
},
17511884
"/users/{userID}/notifications": {
17521885
"put": {
17531886
"security": [
@@ -2868,7 +3001,7 @@
28683001
},
28693002
"missed_call_auto_reply": {
28703003
"type": "string",
2871-
"example": "e.g This phone cannot receive calls. Please send an SMS instead."
3004+
"example": "e.g. This phone cannot receive calls. Please send an SMS instead."
28723005
},
28733006
"phone_number": {
28743007
"type": "string",

0 commit comments

Comments
 (0)