From 49772d4d6d007f3b313fdb7e5c283cb06535cd35 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 8 Aug 2024 10:53:41 +0930 Subject: [PATCH 1/3] [favourite] Add favourite schema --- favourite/v0.1.0/schema.json | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 favourite/v0.1.0/schema.json diff --git a/favourite/v0.1.0/schema.json b/favourite/v0.1.0/schema.json new file mode 100644 index 0000000..df170e1 --- /dev/null +++ b/favourite/v0.1.0/schema.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://common.schemas.verida.io/favourite/v0.1.0/schema.json", + "title": "Favourite", + "titlePlural": "Favourites", + "description": "Favourite links across all platforms", + "type": "object", + "appearance": { + "style": { + "color": "#FD4F64", + "icon": "./icon.svg" + } + }, + "database": { + "name": "favourite", + "indexes": { + "name": ["name", "contentType", "insertedAt"], + "insertedAt": ["insertedAt"], + "source": ["sourceApplication", "sourceId"] + } + }, + "layouts": { + "create": [ + "name", + "description", + "uri" + ], + "view": [ + "name", + "favouriteType", + "contentType", + "description", + "uri", + "sourceApplication", + "sourceId", + "insertedAt" + ] + }, + "allOf": [ + {"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json"}, + { + "properties": { + "favouriteType": { + "title": "Favourite Type", + "description": "Type of post", + "type": "string", + "enum": ["like", "favourite", "recommendation", "share"] + }, + "contentType": { + "title": "Content Type", + "description": "Type of post", + "type": "string", + "enum": ["video", "audio", "document", "webpage"] + }, + "uri": { + "title": "URI", + "type": "string" + } + }, + "required": ["name", "favouriteType", "contentType", "uri"] + } + ] + } From f8a3dd55e4ea7c65b01f3dcc67f691bd62fd0f0a Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 8 Aug 2024 10:53:54 +0930 Subject: [PATCH 2/3] [social/post] Add music type --- social/post/v0.1.0/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social/post/v0.1.0/schema.json b/social/post/v0.1.0/schema.json index 7d4356c..4d4b2a0 100644 --- a/social/post/v0.1.0/schema.json +++ b/social/post/v0.1.0/schema.json @@ -43,7 +43,7 @@ "title": "Type", "description": "Type of post", "type": "string", - "enum": ["link", "status", "photo", "video", "event", "offer", "question", "note", "album", "life_event"] + "enum": ["link", "status", "photo", "video", "music", "event", "offer", "question", "note", "album", "life_event"] }, "content": { "title": "Content", From 3c323802c237279f70112b2f4c2248acfb1cc2c9 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 8 Aug 2024 11:00:45 +0930 Subject: [PATCH 3/3] [document] Add first document schema --- document/v0.1.0/schema.json | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 document/v0.1.0/schema.json diff --git a/document/v0.1.0/schema.json b/document/v0.1.0/schema.json new file mode 100644 index 0000000..82c9cc3 --- /dev/null +++ b/document/v0.1.0/schema.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://common.schemas.verida.io/document/v0.1.0/schema.json", + "title": "Document", + "titlePlural": "Documents", + "description": "A document", + "type": "object", + "appearance": { + "style": { + "color": "#FD4F64", + "icon": "./icon.svg" + } + }, + "database": { + "name": "document", + "indexes": { + "name": ["name", "type", "insertedAt"], + "insertedAt": ["insertedAt"], + "source": ["sourceApplication", "sourceId"] + } + }, + "layouts": { + "create": [ + "name", + "description", + "uri" + ], + "view": [ + "name", + "description", + "type", + "size", + "insertedAt" + ] + }, + "allOf": [ + {"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json"}, + { + "properties": { + "type": { + "title": "Type", + "type": "string", + "enum": ["txt", "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "other"], + "description": "Type of the document" + }, + "size": { + "title": "Size", + "type": "integer", + "description": "Size of the document in bytes" + }, + "contentText": { + "title": "Content (Text)", + "type": "string", + "description": "Text content of the document" + }, + "contentRaw": { + "title": "Content", + "type": "string", + "description": "Base64 encoded content of the document (optional)" + }, + "uri": { + "title": "URI", + "type": "string", + "description": "External link to the document (optional)" + } + }, + "required": ["name", "contentText", "type"] + } + ] + } \ No newline at end of file