feat: densify sms records and improve uplink matching

This commit is contained in:
hectorzhao
2026-08-27 10:15:08 +08:00
parent 898471423f
commit a280b4bb22
25 changed files with 859 additions and 154 deletions
@@ -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 },