at main 87 lines 3.0 kB view raw
1{ 2 "lexicon": 1, 3 "id": "sh.weaver.notification.defs", 4 "defs": { 5 "notification": { 6 "type": "object", 7 "description": "A notification for a user.", 8 "required": ["uri", "cid", "author", "reason", "isRead", "indexedAt"], 9 "properties": { 10 "uri": { "type": "string", "format": "at-uri" }, 11 "cid": { "type": "string", "format": "cid" }, 12 "author": { "type": "ref", "ref": "sh.weaver.actor.defs#profileViewBasic" }, 13 "reason": { "type": "ref", "ref": "#notificationReason" }, 14 "reasonSubject": { 15 "type": "string", 16 "format": "at-uri", 17 "description": "The subject of the notification (entry, notebook, etc)." 18 }, 19 "record": { "type": "unknown" }, 20 "isRead": { "type": "boolean" }, 21 "indexedAt": { "type": "string", "format": "datetime" } 22 } 23 }, 24 "notificationReason": { 25 "type": "string", 26 "description": "Why this notification was generated.", 27 "knownValues": [ 28 "like", 29 "bookmark", 30 "follow", 31 "followAccept", 32 "subscribe", 33 "subscribeAccept", 34 "collaborationInvite", 35 "collaborationAccept", 36 "newEntry", 37 "entryUpdate", 38 "mention", 39 "tag", 40 "comment" 41 ] 42 }, 43 "notificationGroup": { 44 "type": "object", 45 "description": "Grouped notifications (e.g., '5 people liked your entry').", 46 "required": ["reason", "subject", "count", "actors", "mostRecentAt"], 47 "properties": { 48 "reason": { "type": "ref", "ref": "#notificationReason" }, 49 "subject": { 50 "type": "union", 51 "refs": [ 52 "sh.weaver.notebook.defs#notebookView", 53 "sh.weaver.notebook.defs#entryView" 54 ] 55 }, 56 "count": { "type": "integer" }, 57 "actors": { 58 "type": "array", 59 "maxLength": 5, 60 "items": { "type": "ref", "ref": "sh.weaver.actor.defs#profileViewBasic" }, 61 "description": "Most recent actors (up to 5)." 62 }, 63 "mostRecentAt": { "type": "string", "format": "datetime" }, 64 "isRead": { "type": "boolean" } 65 } 66 }, 67 "subscriptionUpdateView": { 68 "type": "object", 69 "description": "New content from a notebook subscription.", 70 "required": ["notebook", "newEntries", "updatedAt"], 71 "properties": { 72 "notebook": { "type": "ref", "ref": "sh.weaver.notebook.defs#notebookView" }, 73 "newEntries": { 74 "type": "array", 75 "items": { "type": "ref", "ref": "sh.weaver.notebook.defs#entryView" }, 76 "description": "New entries since last check." 77 }, 78 "updatedEntries": { 79 "type": "array", 80 "items": { "type": "ref", "ref": "sh.weaver.notebook.defs#entryView" }, 81 "description": "Entries that were updated." 82 }, 83 "updatedAt": { "type": "string", "format": "datetime" } 84 } 85 } 86 } 87}