feat: densify sms records and improve uplink matching
This commit is contained in:
@@ -24,6 +24,18 @@
|
||||
"createdAt": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"UplinkEnvelope": {
|
||||
"type": "object",
|
||||
"required": ["schemaVersion", "messageType", "traceId", "channelId", "createdAt"],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "v1" },
|
||||
"messageType": { "const": "UplinkEvent" },
|
||||
"traceId": { "type": "string", "minLength": 8 },
|
||||
"messageId": { "type": "string", "minLength": 8 },
|
||||
"channelId": { "type": "string", "minLength": 1 },
|
||||
"createdAt": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"SubmitCommand": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/Envelope" },
|
||||
@@ -180,13 +192,14 @@
|
||||
},
|
||||
"UplinkEvent": {
|
||||
"allOf": [
|
||||
{ "$ref": "#/$defs/Envelope" },
|
||||
{ "$ref": "#/$defs/UplinkEnvelope" },
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["messageType", "sequenceId", "phoneNumber", "destId", "content", "receivedAt"],
|
||||
"required": ["messageType", "sequenceId", "gatewayMessageId", "phoneNumber", "destId", "content", "receivedAt"],
|
||||
"properties": {
|
||||
"messageType": { "const": "UplinkEvent" },
|
||||
"sequenceId": { "type": "integer", "minimum": 0 },
|
||||
"gatewayMessageId": { "type": "string", "minLength": 1 },
|
||||
"phoneNumber": { "type": "string", "pattern": "^1[3-9][0-9]{9}$" },
|
||||
"destId": { "type": "string", "minLength": 1 },
|
||||
"content": { "type": "string", "minLength": 1 },
|
||||
|
||||
Reference in New Issue
Block a user