tsk-59: Get MessageEventResponse endpoint (#61)
Closes #59 Reviewed-on: phoenix/textsender-api#61 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
+200
-29
@@ -484,6 +484,106 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/schedule/message/event/response": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Fetches a MessageEventResponse given a user id (requires JWT)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"message"
|
||||
],
|
||||
"summary": "Fetcht MessageEventResponse",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User Id",
|
||||
"name": "user_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.GetMessageEventResponseFetchedResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.GetMessageEventResponseFetchedResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.GetMessageEventResponseFetchedResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/schedule/message/event/response/record": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Saves the result of sending a text message (requires JWT)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"message"
|
||||
],
|
||||
"summary": "Record MessageEventResponse",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Data to add MessageEventResponse",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RecordEventRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RecordEventResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RecordEventResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handler.RecordEventResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/schedule/message/event/{id}": {
|
||||
"delete": {
|
||||
"security": [
|
||||
@@ -636,9 +736,18 @@
|
||||
"contact.Contact": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone_number": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -647,6 +756,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"event.MessageEventResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contact_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"response": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"scheduled_message_event_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sent": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.AddContactResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -745,6 +884,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.GetMessageEventResponseFetchedResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/event.MessageEventResponse"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.GetMessageResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -787,6 +940,47 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.RecordEventRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contact_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"response": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"scheduled_message_event_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sent": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.RecordEventResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/event.MessageEventResponse"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"handler.RequestAddContact": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -826,10 +1020,10 @@
|
||||
"handler.RequestAddScheduledMessageEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message_id": {
|
||||
"contact_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"recipient_id": {
|
||||
"message_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"scheduled_message_id": {
|
||||
@@ -896,7 +1090,7 @@
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/message.MessageEventResponse"
|
||||
"$ref": "#/definitions/event.MessageEventResponse"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
@@ -918,29 +1112,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"message.MessageEventResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"response": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"scheduled_message_event_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sent": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scheduling.ScheduledMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -964,6 +1135,9 @@
|
||||
"scheduling.ScheduledMessageEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contact_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -973,9 +1147,6 @@
|
||||
"message_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"recipient_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"scheduled_message_id": {
|
||||
"type": "string"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user