-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add person, calendar, event schemas #28
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://common.schemas.example.com/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", | ||
"location" | ||
], | ||
"view": [ | ||
"name", | ||
"description", | ||
"location", | ||
"insertedAt" | ||
] | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json" | ||
}, | ||
{ | ||
"properties": { | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"description": { | ||
"title": "Description", | ||
"description": "Description of the calendar", | ||
"type": "string" | ||
}, | ||
"location": { | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"title": "Location", | ||
"description": "Location associated with the calendar", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"location" | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This person schema definition is specific to calendar events, so embed it in the calendar event schema instead of a separate file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Okay There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done |
||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://common.schemas.example.com/profile/person/v0.1.0/schema.json", | ||
"title": "Person", | ||
"description": "Schema representing a person", | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string", | ||
"format": "email", | ||
"description": "Email address of the person" | ||
}, | ||
"displayName": { | ||
"type": "string", | ||
"description": "Display name of the person" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{ | ||
"$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.dateTime", "start.date"], | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"endTime": ["end.dateTime", "end.date"], | ||
"source": ["sourceApplication", "sourceId"] | ||
} | ||
}, | ||
"layouts": { | ||
"create": ["name", "start", "end", "location"], | ||
"view": ["name", "description", "start", "end", "location", "organizer", "attendees", "status"] | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "https://core.schemas.verida.io/base/v0.1.0/schema.json" | ||
}, | ||
{ | ||
"properties": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add |
||
"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" | ||
}, | ||
"location": { | ||
"title": "Location", | ||
"description": "Location of the event", | ||
"type": "string" | ||
}, | ||
"creator": { | ||
"title": "Creator", | ||
"description": "Details of the event creator", | ||
"$ref": "https://common.schemas.example.com/profile/person/v0.1.0/schema.json" | ||
}, | ||
"organizer": { | ||
"title": "Organizer", | ||
"description": "Details of the event organizer", | ||
"$ref": "https://common.schemas.example.com/profile/person/v0.1.0/schema.json" | ||
}, | ||
"start": { | ||
"title": "Start", | ||
"description": "Start time of the event", | ||
"type": "object", | ||
"properties": { | ||
"dateTime": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"date": { | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"timeZone": { | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "string" | ||
} | ||
} | ||
}, | ||
"end": { | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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" | ||
} | ||
} | ||
}, | ||
"attendees": { | ||
"title": "Attendees", | ||
"description": "List of attendees for the event", | ||
"type": "array", | ||
"items": { | ||
"$ref": "https://common.schemas.example.com/person/v0.1.0/schema.json" | ||
} | ||
}, | ||
"conferenceData": { | ||
"title": "Conference Data", | ||
"description": "Details about the conference associated with the event", | ||
tahpot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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", "start", "end"] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this into
/social/calendar/...