diff --git a/social/calendar/v0.1.0/schema.json b/social/calendar/v0.1.0/schema.json new file mode 100644 index 0000000..f6ffde9 --- /dev/null +++ b/social/calendar/v0.1.0/schema.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://common.schemas.example.com/social/calendar/v0.1.0/schema.json", + "title": "Calendar", + "titlePlural": "Calendars", + "description": "Calendar information", + "type": "object", + "appearance": { + "style": { + "color": "#42A5F5", + "icon": "./calendar-icon.svg" + } + }, + "database": { + "name": "calendar_data", + "indexes": { + "name": [ + "name" + ], + "insertedAt": [ + "insertedAt" + ], + "source": [ + "sourceApplication", + "sourceId" + ] + } + }, + "layouts": { + "create": [ + "name", + "timezone", + "location" + ], + "view": [ + "name", + "description", + "location", + "insertedAt" + ] + }, + "allOf": [ + { + "$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json" + }, + { + "properties": { + "description": { + "title": "Description", + "description": "Description of the calendar", + "type": "string" + }, + "timeZone": { + "type": "string", + "description": "UTC offset format", + "pattern": "^([+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$", + "example": "+02:30" + }, + "location": { + "title": "Location", + "description": "Geographic location of the calendar as free-form text.", + "type": "string" + } + }, + "required": [ + "name", + "timezone" + ] + } + ] +} \ No newline at end of file diff --git a/social/event/v0.1.0/schema.json b/social/event/v0.1.0/schema.json new file mode 100644 index 0000000..9eac457 --- /dev/null +++ b/social/event/v0.1.0/schema.json @@ -0,0 +1,167 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://common.schemas.verida.io/social/event/v0.1.0/schema.json", + "title": "Event", + "description": "Schema for a calendar event", + "type": "object", + "appearance": { + "style": { + "color": "#4285F4", + "icon": "./icon.svg" + } + }, + "database": { + "name": "social_event", + "indexes": { + "name": ["name"], + "startTime": ["start.date"], + "endTime": ["end.date"], + "source": ["sourceApplication", "sourceId"] + } + }, + "layouts": { + "create": ["name", "calendarId", "start.date", "end.date", "location"], + "view": ["name", "description", "calendarId", "start.date", "end.date", "location", "organizer", "attendees", "status"] + }, + "allOf": [ + { + "$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json" + }, + { + "properties": { + "status": { + "title": "Status", + "description": "Status of the event", + "type": "string", + "enum": ["confirmed", "tentative", "cancelled"] + }, + "description": { + "title": "Description", + "description": "Detailed description of the event", + "type": "string" + }, + "calendarId": { + "description": "Reference ID for the calendar object", + "type": "string" + }, + "location": { + "title": "Location", + "description": "Location of the event", + "type": "string" + }, + "creator": { + "title": "Creator", + "description": "Details of the event creator", + "$ref": "#/$defs/person" + }, + "organizer": { + "title": "Organizer", + "description": "Details of the event organizer", + "$ref": "#/$defs/person" + }, + "start": { + "title": "Start", + "description": "Start time of the event", + "type": "object", + "properties": { + "dateTime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "timeZone": { + "type": "string", + "description": "UTC offset format", + "pattern": "^([+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$", + "example": "+02:30" + } + } + }, + "end": { + "title": "End", + "description": "End time of the event", + "type": "object", + "properties": { + "dateTime": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date" + }, + "timeZone": { + "type": "string", + "description": "UTC offset format", + "pattern": "^([+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$", + "example": "+02:30" + } + } + }, + "attendees": { + "title": "Attendees", + "description": "List of attendees for the event", + "type": "array", + "items": { + "$ref": "#/$defs/person" + } + }, + "conferenceData": { + "title": "Conference Data", + "description": "Details about the conference associated with the event", + "type": "object" + }, + "attachments": { + "title": "Attachments", + "description": "Attachments for the event", + "type": "array", + "items": { + "type": "object", + "properties": { + "fileUrl": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "iconLink": { + "type": "string", + "format": "uri" + }, + "fileId": { + "type": "string" + } + } + } + } + }, + "required": ["name", "calendarId", "start.date", "end.date"] + } + ], + "$defs": { + "person": { + "type": "object", + "title": "Person", + "description": "Schema representing a person", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "Email address of the person" + }, + "displayName": { + "type": "string", + "description": "Display name of the person" + } + }, + "required": ["email"] + } + } +}