atproto blogging
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": [
9 "uri",
10 "cid",
11 "author",
12 "reason",
13 "isRead",
14 "indexedAt"
15 ],
16 "properties": {
17 "author": {
18 "type": "ref",
19 "ref": "sh.weaver.actor.defs#profileViewBasic"
20 },
21 "cid": {
22 "type": "string",
23 "format": "cid"
24 },
25 "indexedAt": {
26 "type": "string",
27 "format": "datetime"
28 },
29 "isRead": {
30 "type": "boolean"
31 },
32 "reason": {
33 "type": "ref",
34 "ref": "#notificationReason"
35 },
36 "reasonSubject": {
37 "type": "string",
38 "description": "The subject of the notification (entry, notebook, etc).",
39 "format": "at-uri"
40 },
41 "record": {
42 "type": "unknown"
43 },
44 "uri": {
45 "type": "string",
46 "format": "at-uri"
47 }
48 }
49 },
50 "notificationGroup": {
51 "type": "object",
52 "description": "Grouped notifications (e.g., '5 people liked your entry').",
53 "required": [
54 "reason",
55 "subject",
56 "count",
57 "actors",
58 "mostRecentAt"
59 ],
60 "properties": {
61 "actors": {
62 "type": "array",
63 "description": "Most recent actors (up to 5).",
64 "items": {
65 "type": "ref",
66 "ref": "sh.weaver.actor.defs#profileViewBasic"
67 },
68 "maxLength": 5
69 },
70 "count": {
71 "type": "integer"
72 },
73 "isRead": {
74 "type": "boolean"
75 },
76 "mostRecentAt": {
77 "type": "string",
78 "format": "datetime"
79 },
80 "reason": {
81 "type": "ref",
82 "ref": "#notificationReason"
83 },
84 "subject": {
85 "type": "union",
86 "refs": [
87 "sh.weaver.notebook.defs#notebookView",
88 "sh.weaver.notebook.defs#entryView"
89 ]
90 }
91 }
92 },
93 "notificationReason": {
94 "type": "string",
95 "description": "Why this notification was generated.",
96 "knownValues": [
97 "like",
98 "bookmark",
99 "follow",
100 "followAccept",
101 "subscribe",
102 "subscribeAccept",
103 "collaborationInvite",
104 "collaborationAccept",
105 "newEntry",
106 "entryUpdate",
107 "mention",
108 "tag",
109 "comment"
110 ]
111 },
112 "subscriptionUpdateView": {
113 "type": "object",
114 "description": "New content from a notebook subscription.",
115 "required": [
116 "notebook",
117 "newEntries",
118 "updatedAt"
119 ],
120 "properties": {
121 "newEntries": {
122 "type": "array",
123 "description": "New entries since last check.",
124 "items": {
125 "type": "ref",
126 "ref": "sh.weaver.notebook.defs#entryView"
127 }
128 },
129 "notebook": {
130 "type": "ref",
131 "ref": "sh.weaver.notebook.defs#notebookView"
132 },
133 "updatedAt": {
134 "type": "string",
135 "format": "datetime"
136 },
137 "updatedEntries": {
138 "type": "array",
139 "description": "Entries that were updated.",
140 "items": {
141 "type": "ref",
142 "ref": "sh.weaver.notebook.defs#entryView"
143 }
144 }
145 }
146 }
147 }
148}