"description": "When the index first held the record, or when it says it was made if that is earlier: what notifications are ordered by, and isRead and getUnreadCount compare with seenAt."
},
"isRead": {
"type": "boolean",
"description": "Whether the viewer had marked their notifications seen as of indexedAt."
const listGalleriesLex = {"lexicon":1,"id":"social.grain.group.pool.listGalleries","defs":{"main":{"type":"query","description":"Every gallery in a group's pool, newest first. Assembled at request time from the repos of the members who wrote them — a pool space never reaches a firehose, so none of it is in the index — and readable only by a member the group's host issues a credential to.","parameters":{"type":"params","required":["group"],"properties":{"group":{"type":"string","format":"did"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["space","galleries"],"properties":{"space":{"type":"string"},"galleries":{"type":"array","items":{"type":"ref","ref":"social.grain.group.pool.defs#poolGallery"}}}}},"errors":[{"name":"NotAuthorized","description":"The viewer is not a member of this pool."}]}}} as const
const putFavoriteLex = {"lexicon":1,"id":"social.grain.group.pool.putFavorite","defs":{"main":{"type":"procedure","description":"Favourite, or unfavourite, a gallery in a group's pool. The record is the viewer's own, written into the pool rather than their public repo: in the public repo it would name a private gallery to the whole network.","input":{"encoding":"application/json","schema":{"type":"object","required":["group","gallery","on"],"properties":{"group":{"type":"string","format":"did"},"gallery":{"type":"string","format":"at-uri","description":"The gallery being favourited, by the uri it would have in its author's repo."},"on":{"type":"boolean"}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["on"],"properties":{"on":{"type":"boolean"},"rkey":{"type":"string","description":"The favourite record, when there is one."}}}},"errors":[{"name":"NotAuthorized","description":"The viewer is not a member of this pool."}]}}} as const
const submissionLex = {"lexicon":1,"id":"social.grain.group.submission","defs":{"main":{"type":"record","key":"tid","description":"A member offering one of their own galleries to a group's pool. Lives in the member's repo; the group answers with a social.grain.group.item.","record":{"type":"object","required":["group","gallery","createdAt"],"properties":{"group":{"type":"string","format":"did","description":"The group (a group DID)."},"gallery":{"type":"string","format":"at-uri","description":"One of the submitter's galleries."},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
const grainNotificationDefsLex = {"lexicon":1,"id":"social.grain.notification.defs","defs":{"notificationItem":{"type":"object","required":["uri","reason","createdAt","author"],"properties":{"uri":{"type":"string","format":"at-uri"},"reason":{"type":"string","knownValues":["gallery-favorite","gallery-comment","gallery-comment-mention","gallery-mention","comment-favorite","story-favorite","story-comment","reply","follow"]},"createdAt":{"type":"string","format":"datetime"},"author":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"galleryUri":{"type":"string","format":"at-uri"},"galleryTitle":{"type":"string"},"galleryThumb":{"type":"string"},"storyUri":{"type":"string","format":"at-uri"},"storyThumb":{"type":"string"},"commentText":{"type":"string"},"replyToText":{"type":"string"}}}}} as const
const grainNotificationDefsLex = {"lexicon":1,"id":"social.grain.notification.defs","defs":{"notificationItem":{"type":"object","required":["uri","reason","createdAt","indexedAt","isRead","author"],"properties":{"uri":{"type":"string","format":"at-uri"},"reason":{"type":"string","knownValues":["gallery-favorite","gallery-comment","gallery-comment-mention","gallery-mention","comment-favorite","story-favorite","story-comment","reply","follow"]},"createdAt":{"type":"string","format":"datetime"},"indexedAt":{"type":"string","format":"datetime","description":"When the index first held the record, or when it says it was made if that is earlier: what notifications are ordered by, and isRead and getUnreadCount compare with seenAt."},"isRead":{"type":"boolean","description":"Whether the viewer had marked their notifications seen as of indexedAt."},"author":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"galleryUri":{"type":"string","format":"at-uri"},"galleryTitle":{"type":"string"},"galleryThumb":{"type":"string"},"storyUri":{"type":"string","format":"at-uri"},"storyThumb":{"type":"string"},"commentText":{"type":"string"},"replyToText":{"type":"string"}}}}} as const
const getUnreadCountLex = {"lexicon":1,"id":"social.grain.notification.getUnreadCount","defs":{"main":{"type":"query","description":"Count the viewer's notifications since they were last seen, as app.bsky.notification.getUnreadCount does. Requires auth.","output":{"encoding":"application/json","schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer"}}}}}}} as const
const listNotificationsLex = {"lexicon":1,"id":"social.grain.notification.listNotifications","defs":{"main":{"type":"query","description":"Get notifications for the authenticated user.","parameters":{"type":"params","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["notifications"],"properties":{"notifications":{"type":"array","items":{"type":"ref","ref":"social.grain.notification.defs#notificationItem"}},"cursor":{"type":"string"},"unseenCount":{"type":"integer"}}}}}}} as const
const listNotificationsLex = {"lexicon":1,"id":"social.grain.notification.listNotifications","defs":{"main":{"type":"query","description":"Get the authenticated user's notifications, the latest first, as app.bsky.notification.listNotifications does. Requires auth.","parameters":{"type":"params","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["notifications"],"properties":{"notifications":{"type":"array","items":{"type":"ref","ref":"social.grain.notification.defs#notificationItem"}},"cursor":{"type":"string"},"seenAt":{"type":"string","format":"datetime","description":"When the viewer last marked their notifications seen (updateSeen), if they have."}}}}}}} as const
const registerPushLex = {"lexicon":1,"id":"social.grain.notification.registerPush","defs":{"main":{"type":"procedure","description":"Register a device's push token for the viewer, as app.bsky.notification.registerPush does. Requires auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["serviceDid","token","platform","appId"],"properties":{"serviceDid":{"type":"string","format":"did","description":"The service that sends the pushes: this server's DID."},"token":{"type":"string"},"platform":{"type":"string","knownValues":["ios","android","web"]},"appId":{"type":"string","description":"The app's bundle or package id."}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
const unregisterPushLex = {"lexicon":1,"id":"social.grain.notification.unregisterPush","defs":{"main":{"type":"procedure","description":"Stop sending pushes to a device token, as app.bsky.notification.unregisterPush does. Requires auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["serviceDid","token","platform","appId"],"properties":{"serviceDid":{"type":"string","format":"did","description":"The service that sends the pushes: this server's DID."},"token":{"type":"string"},"platform":{"type":"string","knownValues":["ios","android","web"]},"appId":{"type":"string","description":"The app's bundle or package id."}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
const updateSeenLex = {"lexicon":1,"id":"social.grain.notification.updateSeen","defs":{"main":{"type":"procedure","description":"Mark the viewer's notifications seen up to a time, as app.bsky.notification.updateSeen does. getUnreadCount counts from it. Requires auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["seenAt"],"properties":{"seenAt":{"type":"string","format":"datetime"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const