| 1 | {
|
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 | "type": "object",
|
| 4 | "properties": {
|
| 5 | "messageId": {
|
| 6 | "type": "string",
|
| 7 | "format": "uuid",
|
| 8 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 9 | },
|
| 10 | "threadId": {
|
| 11 | "type": "string",
|
| 12 | "format": "uuid",
|
| 13 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 14 | },
|
| 15 | "interactionId": {
|
| 16 | "type": "string",
|
| 17 | "format": "uuid",
|
| 18 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 19 | },
|
| 20 | "senderAgentId": {
|
| 21 | "type": "string",
|
| 22 | "minLength": 1
|
| 23 | },
|
| 24 | "recipientAgentId": {
|
| 25 | "type": "string",
|
| 26 | "minLength": 1
|
| 27 | },
|
| 28 | "contentType": {
|
| 29 | "type": "string",
|
| 30 | "const": "text/plain"
|
| 31 | },
|
| 32 | "content": {
|
| 33 | "type": "string",
|
| 34 | "minLength": 1,
|
| 35 | "maxLength": 20000
|
| 36 | },
|
| 37 | "contentHash": {
|
| 38 | "type": "string",
|
| 39 | "pattern": "^[a-zA-Z0-9_-]{43}$"
|
| 40 | },
|
| 41 | "delivery": {
|
| 42 | "type": "string",
|
| 43 | "enum": [
|
| 44 | "accepted",
|
| 45 | "delivered",
|
| 46 | "read"
|
| 47 | ]
|
| 48 | },
|
| 49 | "createdAt": {
|
| 50 | "type": "string",
|
| 51 | "format": "date-time",
|
| 52 | "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
| 53 | },
|
| 54 | "readAt": {
|
| 55 | "type": "string",
|
| 56 | "format": "date-time",
|
| 57 | "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
| 58 | }
|
| 59 | },
|
| 60 | "required": [
|
| 61 | "messageId",
|
| 62 | "threadId",
|
| 63 | "interactionId",
|
| 64 | "senderAgentId",
|
| 65 | "recipientAgentId",
|
| 66 | "contentType",
|
| 67 | "content",
|
| 68 | "contentHash",
|
| 69 | "delivery",
|
| 70 | "createdAt"
|
| 71 | ],
|
| 72 | "additionalProperties": false
|
| 73 | }
|