{ "format_version": 1, "id": "event", "name": "Event", "plural": "Calendar", "builtin": true, "visibility": "owner", "date": "starts_at", "title": "title", "columns": [ { "key": "collection_id", "name": "Calendar", "type": "text", "readonly": true }, { "key": "title", "name": "Title", "type": "text", "required": true }, { "key": "notes", "name": "Notes", "type": "longtext" }, { "key": "starts_at", "name": "Starts", "type": "date", "required": true, "untimed": "all day" }, { "key": "ends_at", "name": "Ends", "type": "date" }, { "key": "all_day", "name": "All day", "type": "bool" }, { "key": "rrule", "name": "Repeats", "type": "text", "labels": { "none": "Once", "daily": "Daily", "weekdays": "Every weekday", "weekly": "Weekly", "biweekly": "Every two weeks", "monthly": "Monthly", "yearly": "Yearly", "custom": "Custom repeat" }, "format": "repeat-rule" }, { "key": "location", "name": "Where", "type": "place", "place": { "id": "event_place", "country": "country", "zone": "timezone" } }, { "key": "source_inbox_id", "type": "text", "readonly": true }, { "key": "gcal_id", "type": "text", "readonly": true }, { "key": "gcal_etag", "type": "text", "readonly": true }, { "key": "sync_state", "name": "Sync", "type": "text", "format": "words", "readonly": true }, { "key": "organizer_is_self", "type": "bool", "readonly": true }, { "key": "my_response", "name": "Your reply", "type": "choice", "choices": [ "needs_action", "accepted", "tentative", "declined" ], "labels": { "needs_action": "Reply needed", "accepted": "Accepted", "tentative": "Tentative", "declined": "Declined" }, "shown_when": { "column": "invited", "values": [ "invited" ] } }, { "key": "series_id", "type": "text", "readonly": true }, { "key": "original_starts_at", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "exdates", "type": "longtext", "readonly": true }, { "key": "trashed_at", "name": "Removed", "type": "date" }, { "key": "erase_requested_at", "type": "date", "format": "calendar-datetime", "readonly": true }, { "key": "ical_uid", "type": "text", "readonly": true }, { "key": "account", "type": "text", "readonly": true }, { "key": "on_google", "name": "On Google", "type": "bool" }, { "key": "event_place", "name": "Place", "type": "text", "readonly": true }, { "key": "country", "name": "Country", "type": "text", "readonly": true }, { "key": "timezone", "name": "Time zone", "type": "text", "readonly": true }, { "key": "project", "name": "Project", "type": "link", "link_to": "project" }, { "key": "people", "name": "Who", "type": "link", "link_to": "person", "readonly": true, "multiple": true, "edges": true }, { "key": "guest_responses", "name": "Replies", "type": "longtext", "readonly": true }, { "key": "calendar_name", "name": "Calendar", "type": "text", "readonly": true }, { "key": "source", "name": "Source", "type": "text", "readonly": true, "format": "words" }, { "key": "created_at", "name": "Added", "type": "date", "readonly": true }, { "key": "day", "name": "Day", "type": "date", "readonly": true }, { "key": "start_time", "name": "Starts", "type": "time", "readonly": true }, { "key": "invited", "name": "Invited", "type": "choice", "choices": [ "invited" ], "readonly": true, "labels": { "invited": "Invited" } }, { "key": "email_thread_id", "name": "From mail", "type": "link", "link_to": "email_thread", "readonly": true }, { "key": "kind", "name": "Kind", "type": "choice", "choices": [ "call", "meeting", "meal", "breakfast", "lunch", "dinner", "coffee", "birthday", "celebration", "wedding", "travel", "flight", "train", "commute", "drive", "doctor", "workout", "walk", "run", "gym", "yoga", "swim", "class", "deadline", "delivery", "payment", "show", "appointment", "errand", "reminder" ], "labels": { "call": "Call", "meeting": "Meeting", "meal": "Meal", "breakfast": "Breakfast", "lunch": "Lunch", "dinner": "Dinner", "coffee": "Coffee", "birthday": "Birthday", "celebration": "Celebration", "wedding": "Wedding", "travel": "Travel", "flight": "Flight", "train": "Train", "commute": "Commute", "drive": "Drive", "doctor": "Doctor", "workout": "Workout", "walk": "Walk", "run": "Run", "gym": "Gym", "yoga": "Yoga", "swim": "Swim", "class": "Class", "deadline": "Deadline", "delivery": "Delivery", "payment": "Payment", "show": "Show", "appointment": "Appointment", "errand": "Errand", "reminder": "Reminder" }, "families": { "breakfast": "meal", "lunch": "meal", "dinner": "meal", "coffee": "meal", "flight": "travel", "train": "travel", "commute": "travel", "drive": "travel", "walk": "workout", "run": "workout", "gym": "workout", "yoga": "workout", "swim": "workout" }, "examples": { "call": [ "Call", "Phone call", "Call with Priya", "Catch-up call", "Video call", "Zoom call", "Ring Mum" ], "meeting": [ "Meeting", "Team sync", "Standup", "Review with the board", "1:1", "Planning session", "Client meeting" ], "meal": [ "Meal", "Eating out", "Food with friends", "Meal together", "Bite to eat" ], "breakfast": [ "Breakfast", "Breakfast with Arjun", "Brunch", "Morning breakfast meeting" ], "lunch": [ "Lunch", "Lunch with the team", "Working lunch", "Lunch at the club" ], "dinner": [ "Dinner", "Dinner with Sam", "Dinner party", "Family dinner", "Dinner reservation" ], "coffee": [ "Coffee", "Coffee with Meera", "Chai", "Coffee catch-up", "Tea break" ], "birthday": [ "Birthday", "Riya's birthday", "Birthday party", "Bday", "Turns 40" ], "celebration": [ "Celebration", "Party", "Anniversary", "Diwali party", "Housewarming", "Farewell drinks" ], "wedding": [ "Wedding", "Sangeet", "Reception", "Mehendi", "Wedding of Anu and Dev" ], "travel": [ "Trip", "Travel", "Journey", "Holiday", "Weekend in Goa" ], "flight": [ "Flight", "Flight to Delhi", "6E 2134 BLR to BOM", "Fly to London", "Airport" ], "train": [ "Train", "Train to Chennai", "Vande Bharat", "Shatabdi", "Overnight train" ], "commute": [ "Commute", "Drive to work", "Office commute", "Metro to office" ], "drive": [ "Drive", "Road trip", "Drive to Mysore", "Pick up from the station" ], "doctor": [ "Doctor", "Dentist", "Doctor's appointment", "Check-up", "Blood test", "Physio" ], "workout": [ "Workout", "Exercise", "Training", "Fitness", "Cardio" ], "walk": [ "Walk", "Morning walk", "Evening walk", "Walk in the park" ], "run": [ "Run", "Morning run", "5k run", "Long run", "Marathon training" ], "gym": [ "Gym", "Leg day", "Strength session", "Weights", "Personal trainer", "Workout at the gym" ], "yoga": [ "Yoga", "Yoga class", "Pranayama", "Morning yoga", "Vinyasa" ], "swim": [ "Swim", "Swimming", "Pool", "Laps at the pool" ], "class": [ "Class", "Lecture", "Lesson", "Guitar lesson", "Workshop", "Course" ], "deadline": [ "Deadline", "Due", "Submit the report", "Last day to file", "Tax filing due" ], "delivery": [ "Delivery", "Package arriving", "Online order arriving", "Courier pickup", "Groceries arriving" ], "payment": [ "Payment", "Pay rent", "Bill due", "EMI", "Credit card payment", "Pay the electricity bill" ], "show": [ "Show", "Concert", "Movie", "Play", "Gig", "Stand-up comedy", "Match" ], "appointment": [ "Appointment", "Haircut", "Salon", "Bank appointment", "Car service" ], "errand": [ "Errand", "Groceries", "Pick up dry cleaning", "Post office", "Shopping" ], "reminder": [ "Reminder", "Remember to", "Don't forget", "Renew passport", "Renew insurance" ] }, "says": [ "title", "notes", "location" ] }, { "key": "picture", "name": "Picture", "type": "photo", "opens": { "column": "picture_photo_id", "table": "photo" } }, { "key": "picture_photo_id", "name": "Original", "type": "link", "link_to": "photo", "readonly": true, "media": true } ], "instructions": "An event is something on the calendar with a start and usually an end; an all-day event ignores the clock time. A repeating event carries an iCal repeat rule, and your reply only applies to invitations someone else sent. Always give times with an explicit time zone, and never guess a location or end time that was not stated.", "tables": [ { "name": "cotton_events", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "collection_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n collection_id TEXT", "position": 1 }, { "name": "title", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n title TEXT NOT NULL", "position": 2 }, { "name": "notes", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n notes TEXT", "position": 3 }, { "name": "starts_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n starts_at TEXT NOT NULL", "position": 4 }, { "name": "ends_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ends_at TEXT", "position": 5 }, { "name": "all_day", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n all_day INTEGER NOT NULL DEFAULT 0", "position": 6 }, { "name": "rrule", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n rrule TEXT", "position": 7 }, { "name": "location", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n location TEXT", "position": 8 }, { "name": "source_inbox_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n source_inbox_id TEXT", "position": 9 }, { "name": "gcal_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n gcal_id TEXT", "position": 10 }, { "name": "gcal_etag", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n gcal_etag TEXT", "position": 11 }, { "name": "sync_state", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n sync_state TEXT", "position": 12 }, { "name": "organizer_is_self", "type": "INTEGER", "default": "1", "nullable": false, "primary_key": false, "declaration": "\n organizer_is_self INTEGER NOT NULL DEFAULT 1", "position": 13 }, { "name": "my_response", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n my_response TEXT", "position": 14 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 15 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 16 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 17 }, { "name": "series_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " series_id TEXT", "position": 18 }, { "name": "original_starts_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " original_starts_at TEXT", "position": 19 }, { "name": "exdates", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " exdates TEXT CHECK (exdates IS NULL OR json_type(exdates) = 'array')", "position": 20 }, { "name": "trashed_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " trashed_at TEXT", "position": 21 }, { "name": "erase_requested_at", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n erase_requested_at TEXT", "position": 22 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 23 }, { "name": "ical_uid", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n ical_uid TEXT", "position": 24 }, { "name": "account", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n account TEXT", "position": 25 }, { "name": "on_google", "type": "INTEGER", "default": "0", "nullable": false, "primary_key": false, "declaration": "\n on_google INTEGER NOT NULL DEFAULT 0", "position": 26 }, { "name": "event_place", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " event_place TEXT", "position": 27 }, { "name": "country", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " country TEXT", "position": 28 }, { "name": "timezone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " timezone TEXT", "position": 29 }, { "name": "kind", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " kind TEXT", "position": 30 }, { "name": "picture", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " picture TEXT", "position": 31 }, { "name": "picture_photo_id", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": " picture_photo_id TEXT", "position": 32 } ], "constraints": [ { "declaration": "\n CHECK (on_google IN (0, 1))", "position": 33 }, { "declaration": "\n CHECK (my_response IN ('needs_action', 'accepted', 'declined', 'tentative'))", "position": 34 }, { "declaration": "\n CHECK (sync_state IN ('synced', 'pending', 'conflict'))\n ", "position": 35 } ], "prefix": "CREATE TABLE cotton_events (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_events_invites ON cotton_events (my_response, starts_at) WHERE my_response = 'needs_action' AND organizer_is_self = 0 AND trashed_at IS NULL", "CREATE INDEX idx_cotton_events_collection ON cotton_events (collection_id)", "CREATE INDEX idx_cotton_events_range ON cotton_events (starts_at)", "CREATE UNIQUE INDEX uq_cotton_events_gcal_id ON cotton_events (account, gcal_id) WHERE gcal_id IS NOT NULL", "CREATE INDEX idx_cotton_events_series ON cotton_events (series_id) WHERE series_id IS NOT NULL", "CREATE INDEX idx_cotton_events_trashed ON cotton_events (trashed_at) WHERE trashed_at IS NOT NULL", "CREATE INDEX idx_cotton_events_ical_uid ON cotton_events (ical_uid, original_starts_at) WHERE ical_uid IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_cotton_events_author ON cotton_events (substr(_hlc, 20), _hlc)" ], "full_text": [ "CREATE VIRTUAL TABLE fts_events USING fts5(\n title, notes, location, content = 'cotton_events', content_rowid = 'rowid',\n tokenize = 'unicode61 remove_diacritics 2'\n )" ], "triggers": [ "CREATE TRIGGER fts_events_ai AFTER INSERT ON cotton_events WHEN new.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) BEGIN\n INSERT INTO fts_events (rowid, title, notes, location) VALUES (new.rowid, new.title, new.notes, new.location);\n END", "CREATE TRIGGER fts_events_ad AFTER DELETE ON cotton_events WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) BEGIN\n INSERT INTO fts_events (fts_events, rowid, title, notes, location) VALUES ('delete', old.rowid, old.title, old.notes, old.location);\n END", "CREATE TRIGGER fts_events_au AFTER UPDATE OF title, notes, location ON cotton_events\n FOR EACH ROW WHEN old.rowid >= coalesce((SELECT floor FROM _fts_fill WHERE fts = 'fts_events'), 0) AND (new.title IS NOT old.title OR new.notes IS NOT old.notes OR new.location IS NOT old.location) BEGIN\n INSERT INTO fts_events (fts_events, rowid, title, notes, location) VALUES ('delete', old.rowid, old.title, old.notes, old.location);\n INSERT INTO fts_events (rowid, title, notes, location) VALUES (new.rowid, new.title, new.notes, new.location);\n END" ] }, { "name": "cotton_event_attendees", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "event_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n event_id TEXT NOT NULL", "position": 1 }, { "name": "email", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n email TEXT", "position": 2 }, { "name": "phone", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n phone TEXT", "position": 3 }, { "name": "display_name", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n display_name TEXT", "position": 4 }, { "name": "response", "type": "TEXT", "default": "'needs_action'", "nullable": false, "primary_key": false, "declaration": "\n response TEXT NOT NULL DEFAULT 'needs_action'", "position": 5 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 6 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 7 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 8 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 9 } ], "constraints": [ { "declaration": "\n CHECK (response IN ('needs_action', 'accepted', 'declined', 'tentative'))", "position": 10 }, { "declaration": "\n FOREIGN KEY (event_id) REFERENCES cotton_events(id)\n ", "position": 11 } ], "prefix": "CREATE TABLE cotton_event_attendees (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_event_attendees_event ON cotton_event_attendees (event_id)", "CREATE INDEX IF NOT EXISTS idx_cotton_event_attendees_author ON cotton_event_attendees (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ], "card": { "face": "event.board", "fields": [ { "slot": "photo", "column": "picture", "chooses": "kind" }, { "slot": "title", "column": "title" }, { "slot": "date", "column": "starts_at", "form": "weekday_date" }, { "slot": "ends", "column": "ends_at", "also": [ "starts_at" ] }, { "slot": "repeats", "column": "rrule" }, { "slot": "place", "column": "location" }, { "slot": "people", "column": "people", "max": 3 }, { "slot": "body", "column": "notes" } ], "corner": [ { "column": "starts_at", "form": "relative", "within": 0, "ahead": true, "line": "corner.today" }, { "column": "starts_at", "form": "relative", "within": 1, "ahead": true, "line": "corner.tomorrow" }, { "column": "starts_at", "form": "relative", "within": 6, "ahead": true } ], "offers": [ "event.board", "event.invitation" ] }, "picture": { "photo": "photo:a4c0a1a6ab854cbc99f2481f788b16b76214b2133e43df2502d694498861624f", "object": "tool-calendar" }, "engine": "calendar", "project": "project", "order": null, "slip": { "title": "title", "subtitle": "location", "trailing": "starts_at", "photo": null, "toggle": null, "caption": { "dates": [ "starts_at" ], "columns": [ "rrule" ], "status": "my_response" }, "dye": "sage" }, "tile": { "face": "slip-list", "current": { "column": "starts_at", "days": 0 } }, "page": [ { "heading": null, "columns": [ "title" ] }, { "heading": null, "columns": [ "starts_at", "ends_at", "all_day", "rrule", "my_response", "on_google" ] }, { "heading": null, "columns": [ "location" ] }, { "heading": "Who", "columns": [ "people", "guest_responses" ] }, { "heading": "Notes", "columns": [ "notes" ] }, { "heading": "Details", "columns": [ "calendar_name", "source", "project", "email_thread_id" ] }, { "heading": "Meetings", "list": { "table": "meeting", "link": "event_id", "limit": 3 } }, { "heading": "Mail", "list": { "table": "email_thread", "link": "event_id", "limit": 3 } } ], "archived": "trashed_at", "kept_by": { "when": "sync_state", "says": "Kept in step with Google Calendar" }, "record_route": "/calendar/event/[id]", "linked_when": { "scheduled": "starts {when}" }, "record_kind": "event", "filing_rank": 3, "role": "event", "sort": { "column": "starts_at" }, "day_grouping": "starts_at", "parts": { "shape": "desk", "head": { "facts": [] }, "links": [], "body": "notes", "lists": [ { "table": "meeting", "relation": "event_id", "heading": "Meetings" }, { "table": "email_thread", "relation": "event_id", "heading": "Mail" } ], "acts": { "more": [ "open-email-thread-id", "open-people", "open-project" ], "away": "delete" }, "cards": [ { "column": "start_time", "label": "time" }, { "column": "starts_at", "label": "when", "until": "ends_at" }, { "column": "location", "label": "where" }, { "column": "my_response" }, { "column": "guest_responses" }, { "column": "rrule", "object": "ring", "label": "repeats" }, { "column": "calendar_name", "label": "calendar" } ], "strip": [] }, "empty": { "title": "Nothing on the calendar yet.", "message": "Events from your synced calendars land here, and New event adds one." }, "create": { "label": "New event", "dated": "starts_at", "path": "/calendar/event/edit" }, "deletion": { "confirm": "Delete", "asks": true, "bin": true }, "links": [ { "label": "Deleted", "table": "bin", "where": { "table": "event" } } ], "commands": [ { "id": "delete", "label": "Delete", "kind": "delete", "verb": "delete_record", "data": { "table": "event" }, "confirm": "Undo on the receipt brings it back.", "bindings": { "id": "$id" }, "when": { "rrule": [ null, "" ] }, "receipt": "Deleted", "does": "destroys" }, { "id": "open-email-thread-id", "label": "Open from mail", "kind": "open", "opens": "email_thread_id" }, { "id": "open-people", "label": "Open who", "kind": "open", "opens": "people" }, { "id": "open-project", "label": "Open project", "kind": "open", "opens": "project" } ], "views": [ { "face": "nextUp", "name": "Next up" }, { "face": "month", "name": "Month", "opens": "/calendar/month" } ], "tool": { "views": [ { "id": "today", "label": "Today", "visibility": "owner", "is_default": true, "read": { "table": "event", "section": "today" } }, { "id": "upcoming", "label": "Upcoming", "visibility": "owner", "is_default": false, "read": { "table": "event", "section": "upcoming" } }, { "id": "recurring", "label": "Recurring", "visibility": "owner", "is_default": false, "read": { "table": "event", "where": { "rrule": { "present": true } } } }, { "id": "all", "label": "All", "visibility": "owner", "is_default": false, "read": { "table": "event" } } ], "name": "Calendar", "purpose": "Events, appointments and time you have planned.", "key": "calendar", "icon": "calendar-days", "card_stock": "sage", "route": "/calendar", "figures": [ { "read": "eventsLeftToday", "many": "{n} left today" } ] } }