2017-11-03 16:35:22 +00:00
|
|
|
from app.schema_validation.definitions import uuid
|
|
|
|
|
|
|
|
|
|
|
2017-11-07 16:39:11 +00:00
|
|
|
get_inbound_sms_request = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "schema for query parameters allowed when getting list of received text messages",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"older_than": uuid,
|
|
|
|
|
},
|
|
|
|
|
"additionalProperties": False,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-11-03 16:35:22 +00:00
|
|
|
get_inbound_sms_single_response = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "GET inbound sms schema response",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"title": "GET response v2/inbound_sms",
|
|
|
|
|
"properties": {
|
|
|
|
|
"user_number": {"type": "string"},
|
|
|
|
|
"created_at": {
|
|
|
|
|
"format": "date-time",
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Date+time created at"
|
|
|
|
|
},
|
|
|
|
|
"service_id": uuid,
|
|
|
|
|
"id": uuid,
|
|
|
|
|
"notify_number": {"type": "string"},
|
|
|
|
|
"content": {"type": "string"},
|
|
|
|
|
},
|
|
|
|
|
"required": [
|
2017-11-09 15:22:53 +00:00
|
|
|
"id", "user_number", "created_at", "service_id",
|
2017-11-03 16:35:22 +00:00
|
|
|
"notify_number", "content"
|
|
|
|
|
],
|
2017-11-07 16:39:11 +00:00
|
|
|
"additionalProperties": False,
|
2017-11-03 16:35:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_inbound_sms_response = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "GET list of inbound sms response schema",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2017-11-07 12:19:44 +00:00
|
|
|
"received_text_messages": {
|
2017-11-03 16:35:22 +00:00
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/inbound_sms"
|
|
|
|
|
}
|
|
|
|
|
},
|
2017-11-06 18:22:18 +00:00
|
|
|
"links": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"current": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"next": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"additionalProperties": False,
|
|
|
|
|
"required": ["current"]
|
|
|
|
|
}
|
2017-11-03 16:35:22 +00:00
|
|
|
},
|
2017-11-07 12:19:44 +00:00
|
|
|
"required": ["received_text_messages", "links"],
|
2017-11-03 16:35:22 +00:00
|
|
|
"definitions": {
|
|
|
|
|
"inbound_sms": get_inbound_sms_single_response
|
2017-11-07 16:39:11 +00:00
|
|
|
},
|
|
|
|
|
"additionalProperties": False,
|
2017-11-03 16:35:22 +00:00
|
|
|
}
|