from typing import Dict
from ...types import Parser_Base, sms
class Parser(Parser_Base):
def __init__(self, sms_input: Dict) -> None:
super().__init__()
msg = sms(sms_input["from"], sms_input["text"])
self.messages.append(msg)
SCHEMA = """
{
"type" : "object",
"properties" : {
"direction" : {
"type" : "string"
},
"from" : {
"type" : "string"
},
"state" : {
"type" : "string"
},
"messageUri" : {
"type" : "string"
},
"applicationId" : {
"type" : "string"
},
"text" : {
"type" : "string"
},
"time" : {
"type" : "string"
},
"messageId" : {
"type" : "string"
},
"to" : {
"type" : "string"
},
"eventType" : {
"type" : "string"
}
},
"required" : [
"applicationId",
"direction",
"eventType",
"from",
"messageId",
"messageUri",
"state",
"text",
"time",
"to"
],
"$schema" : "http://json-schema.org/schema#"
}
"""