Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Aug 10, 2024
2 parents fe324a3 + 4f79eb8 commit 36ebc43
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 13 deletions.
52 changes: 52 additions & 0 deletions social/chat/group/v0.1.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://common.schemas.verida.io/social/chat/group/v0.1.0/schema.json",
"title": "Chat Group",
"titlePlural": "Chat Groups",
"description": "Chat group that contains chat messages",
"type": "object",
"appearance": {
"style": {
"color": "#FD4F64",
"icon": "./icon.svg"
}
},
"database": {
"name": "social_chat_group",
"indexes": {
"name": ["name"],
"insertedAt": ["insertedAt"],
"source": ["sourceApplication", "sourceId"]
}
},
"layouts": {
"create": [
"name"
],
"view": [
"name",
"description",
"sourceApplication",
"sourceId",
"insertedAt"
]
},
"allOf": [
{"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json"},
{
"properties": {
"type": {
"title": "Type",
"description": "Type of chat group",
"type": "string",
"enum": [""]
},
"uri": {
"title": "URI",
"type": "string"
},
},
"required": ["name"]
}
]
}
72 changes: 72 additions & 0 deletions social/chat/message/v0.1.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://common.schemas.verida.io/social/chat/message/v0.1.0/schema.json",
"title": "Chat Message",
"titlePlural": "Chat Message",
"description": "Single message within a chat group",
"type": "object",
"appearance": {
"style": {
"color": "#FD4F64",
"icon": "./icon.svg"
}
},
"database": {
"name": "social_chat_message",
"indexes": {
"chatGroupId": ["chatGroupId", "sentAt"]
}
},
"layouts": {
"create": [
"name"
],
"view": [
"name",
"type",
"senderId",
"sourceApplication",
"sourceId",
"sentAt"
]
},
"allOf": [
{"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json"},
{
"properties": {
"chatGroupId": {
"title": "Chat Group ID",
"type": "string"
},
"type": {
"title": "Type",
"description": "Type of message (send, receive)",
"type": "string",
"enum": ["send", "receive"]
},
"messageText": {
"title": "Message (Text)",
"type": "string"
},
"messageHTML": {
"title": "Message (HTML)",
"type": "string"
},
"senderId": {
"title": "Sender ID",
"type": "string"
},
"senderHandle": {
"title": "Sender Handle",
"type": "string"
},
"sentAt": {
"title": "Source data",
"type": "string",
"format": "date-time"
}
},
"required": ["name", "chatGroupId", "type", "messageText", "senderId", "sentAt"]
}
]
}
13 changes: 0 additions & 13 deletions social/email/v0.1.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,11 @@
"database": {
"name": "social_email",
"indexes": {
"name": [
"name"
],
"from": [
"fromEmail"
],
"message": [
"messageText"
],
"sentAt": [
"sentAt"
],
"source": [
"sourceApplication"
]
}
},
Expand Down Expand Up @@ -116,10 +107,6 @@
"title": "Source data",
"type": "string",
"format": "date-time"
},
"sourceData": {
"title": "Source data",
"type": "object"
}
},
"required": [
Expand Down

0 comments on commit 36ebc43

Please sign in to comment.