0
2
social.grain lexicons for every method the Rust server will serve
Only what this pull adds. It is built on grain runs on a Rust server modelled on knotless, without hatk.
lexicons/social/grain/actor/defs.json+102−0
| @@ -84,6 +84,108 @@ | ||
"blockedBy": { "type": "boolean" }, | ||
"muted": { "type": "boolean" } | ||
} | ||
}, | ||
"profileSearchResult": { | ||
"type": "object", | ||
"required": ["did"], | ||
"properties": { | ||
"did": { "type": "string", "format": "did" }, | ||
"handle": { "type": "string" }, | ||
"displayName": { "type": "string" }, | ||
"description": { "type": "string" }, | ||
"avatar": { "type": "string" } | ||
} | ||
}, | ||
"typeaheadItem": { | ||
"type": "object", | ||
"required": ["did"], | ||
"properties": { | ||
"did": { "type": "string", "format": "did" }, | ||
"handle": { "type": "string" }, | ||
"displayName": { "type": "string" }, | ||
"avatar": { "type": "string" } | ||
} | ||
}, | ||
"suggestedFollow": { | ||
"type": "object", | ||
"required": ["did"], | ||
"properties": { | ||
"did": { "type": "string", "format": "did" }, | ||
"handle": { "type": "string" }, | ||
"displayName": { "type": "string" }, | ||
"description": { "type": "string" }, | ||
"avatar": { "type": "string" }, | ||
"followersCount": { "type": "integer" } | ||
} | ||
}, | ||
"preferences": { | ||
"type": "array", | ||
"items": { | ||
"type": "union", | ||
"refs": ["#pinnedFeedsPref", "#photoMetadataPref", "#themePref", "#notificationsPref"] | ||
} | ||
}, | ||
"pinnedFeedsPref": { | ||
"type": "object", | ||
"description": "The feeds pinned to the viewer's navigation.", | ||
"required": ["items"], | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "#pinnedFeed" }, | ||
"description": "In the order they show." | ||
} | ||
} | ||
}, | ||
"pinnedFeed": { | ||
"type": "object", | ||
"required": ["id", "label", "type", "path"], | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"type": { "type": "string", "knownValues": ["feed", "camera", "location", "hashtag"] }, | ||
"path": { "type": "string", "description": "The page it opens, on this site." } | ||
} | ||
}, | ||
"photoMetadataPref": { | ||
"type": "object", | ||
"description": "What an upload keeps of a photo's metadata.", | ||
"properties": { | ||
"includeExif": { | ||
"type": "boolean", | ||
"description": "Keep camera settings on uploaded photos." | ||
}, | ||
"includeLocation": { | ||
"type": "boolean", | ||
"description": "Keep where a photo was taken on uploaded photos." | ||
} | ||
} | ||
}, | ||
"themePref": { | ||
"type": "object", | ||
"required": ["theme"], | ||
"properties": { | ||
"theme": { "type": "string", "knownValues": ["system", "light", "dark"] } | ||
} | ||
}, | ||
"notificationsPref": { | ||
"type": "object", | ||
"description": "How each kind of notification reaches the viewer. A kind left out takes the default: push and in-app, from anyone.", | ||
"properties": { | ||
"favorites": { "type": "ref", "ref": "#notificationPref" }, | ||
"follows": { "type": "ref", "ref": "#notificationPref" }, | ||
"comments": { "type": "ref", "ref": "#notificationPref" }, | ||
"mentions": { "type": "ref", "ref": "#notificationPref" } | ||
} | ||
}, | ||
"notificationPref": { | ||
"type": "object", | ||
"required": ["push", "inApp", "from"], | ||
"properties": { | ||
"push": { "type": "boolean" }, | ||
"inApp": { "type": "boolean" }, | ||
"from": { "type": "string", "knownValues": ["all", "follows"] } | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/getFavorites.jsonnew+33−0
| @@ -0,0 +1,33 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.getFavorites", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get galleries favorited by the authenticated actor. Only the actor themselves can view their favorites.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["actor"], | ||
"properties": { | ||
"actor": { "type": "string", "format": "at-identifier" }, | ||
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 30 }, | ||
"cursor": { "type": "string" } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["items"], | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "social.grain.gallery.defs#galleryView" } | ||
}, | ||
"cursor": { "type": "string" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/getPreferences.jsonnew+20−0
| @@ -0,0 +1,20 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.getPreferences", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get the viewer's grain preferences, one of each kind they have set. Requires auth.", | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["preferences"], | ||
"properties": { | ||
"preferences": { "type": "ref", "ref": "social.grain.actor.defs#preferences" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/getProfile.jsonnew+22−0
| @@ -0,0 +1,22 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.getProfile", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get an actor's profile with gallery stats and follow relationships.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["actor"], | ||
"properties": { | ||
"actor": { "type": "string", "format": "at-identifier" }, | ||
"viewer": { "type": "string", "format": "did" } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { "type": "ref", "ref": "social.grain.actor.defs#profileViewDetailed" } | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/getSuggestedFollows.jsonnew+30−0
| @@ -0,0 +1,30 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.getSuggestedFollows", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get suggested profiles to follow based on bsky follow graph.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["actor"], | ||
"properties": { | ||
"actor": { "type": "string", "format": "did" }, | ||
"limit": { "type": "integer", "minimum": 1, "maximum": 20, "default": 10 } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "social.grain.actor.defs#suggestedFollow" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/putPreferences.jsonnew+24−0
| @@ -0,0 +1,24 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.putPreferences", | ||
"defs": { | ||
"main": { | ||
"type": "procedure", | ||
"description": "Set the viewer's grain preferences, replacing all of them, as app.bsky.actor.putPreferences does. Requires auth.", | ||
"input": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["preferences"], | ||
"properties": { | ||
"preferences": { "type": "ref", "ref": "social.grain.actor.defs#preferences" } | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { "type": "object", "properties": {} } | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/searchActors.jsonnew+33−0
| @@ -0,0 +1,33 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.searchActors", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Full-text search for user profiles.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["q"], | ||
"properties": { | ||
"q": { "type": "string", "description": "Search query" }, | ||
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 30 }, | ||
"cursor": { "type": "string" }, | ||
"fuzzy": { "type": "boolean", "default": true } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "social.grain.actor.defs#profileSearchResult" } | ||
}, | ||
"cursor": { "type": "string" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/actor/searchActorsTypeahead.jsonnew+30−0
| @@ -0,0 +1,30 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.actor.searchActorsTypeahead", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Typeahead search for actors, merging bsky and grain profiles.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["q"], | ||
"properties": { | ||
"q": { "type": "string", "description": "Search query" }, | ||
"limit": { "type": "integer", "minimum": 1, "maximum": 10, "default": 5 } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"actors": { | ||
"type": "array", | ||
"items": { "type": "ref", "ref": "social.grain.actor.defs#typeaheadItem" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/admin/actOnReview.jsonnew+33−0
| @@ -0,0 +1,33 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.admin.actOnReview", | ||
"defs": { | ||
"main": { | ||
"type": "procedure", | ||
"description": "Decide a subject in the review queue: take its account down, label it, or dismiss it. Closes every open report against the subject either way. A takedown is com.atproto.admin.updateSubjectStatus's, made in the same step. Requires an admin session.", | ||
"input": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["subject", "action"], | ||
"properties": { | ||
"subject": { | ||
"type": "string", | ||
"format": "uri", | ||
"description": "An account's bare DID, or a record's at:// URI." | ||
}, | ||
"action": { "type": "string", "knownValues": ["takedown", "label", "dismiss"] }, | ||
"label": { | ||
"type": "string", | ||
"description": "The label to apply; required for the label action." | ||
} | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { "type": "object", "properties": {} } | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/admin/addRepos.jsonnew+33−0
| @@ -0,0 +1,33 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "social.grain.admin.addRepos", | ||
"defs": { | ||
"main": { | ||
"type": "procedure", | ||
"description": "Start tracking repos, and backfill them. Requires an admin session.", | ||
"input": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["dids"], | ||
"properties": { | ||
"dids": { | ||
"type": "array", | ||
"items": { "type": "string", "format": "did" }, | ||
"minLength": 1, | ||
"maxLength": 100 | ||
} | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["added"], | ||
"properties": { "added": { "type": "integer" } } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
lexicons/social/grain/admin/applyLabel.jsonnew+29−0
lexicons/social/grain/admin/defs.jsonnew+159−0
lexicons/social/grain/admin/getInfo.jsonnew+29−0
lexicons/social/grain/admin/getRepo.jsonnew+20−0
lexicons/social/grain/admin/getReviewQueue.jsonnew+46−0
lexicons/social/grain/admin/getReviewStats.jsonnew+32−0
lexicons/social/grain/admin/getReviewSubject.jsonnew+40−0
lexicons/social/grain/admin/listLabelDefinitions.jsonnew+23−0
lexicons/social/grain/admin/listReports.jsonnew+38−0
lexicons/social/grain/admin/listRepos.jsonnew+34−0
lexicons/social/grain/admin/negateLabel.jsonnew+29−0
lexicons/social/grain/admin/removeRepos.jsonnew+33−0
lexicons/social/grain/admin/resolveReport.jsonnew+26−0
lexicons/social/grain/admin/resyncRepos.jsonnew+32−0
lexicons/social/grain/admin/searchRecords.jsonnew+32−0
lexicons/social/grain/admin/startScan.jsonnew+43−0
lexicons/social/grain/comment/getThread.jsonnew+38−0
lexicons/social/grain/feed/defs.jsonnew+22−0
lexicons/social/grain/feed/describeFeeds.jsonnew+28−0
lexicons/social/grain/feed/getFeed.jsonnew+43−0
lexicons/social/grain/gallery/defs.json+49−0
lexicons/social/grain/gallery/deleteGallery.jsonnew+24−0
lexicons/social/grain/gallery/getCameras.jsonnew+22−0
lexicons/social/grain/gallery/getFavorites.jsonnew+34−0
lexicons/social/grain/gallery/getGallery.jsonnew+27−0
lexicons/social/grain/gallery/getLocations.jsonnew+31−0
lexicons/social/grain/gallery/searchGalleries.jsonnew+33−0
lexicons/social/grain/graph/defs.jsonnew+66−0
lexicons/social/grain/graph/getBlocks.jsonnew+30−0
lexicons/social/grain/graph/getFollowers.jsonnew+34−0
lexicons/social/grain/graph/getFollowing.jsonnew+34−0
lexicons/social/grain/graph/getKnownFollowers.jsonnew+31−0
lexicons/social/grain/graph/getMutes.jsonnew+30−0
lexicons/social/grain/group/pool/createComment.jsonnew+41−0
lexicons/social/grain/group/pool/createGallery.jsonnew+57−0
lexicons/social/grain/group/pool/defs.jsonnew+92−0
lexicons/social/grain/group/pool/deleteComment.jsonnew+28−0
lexicons/social/grain/group/pool/deleteGallery.jsonnew+38−0
lexicons/social/grain/group/pool/getGallery.jsonnew+52−0
lexicons/social/grain/group/pool/listFeed.jsonnew+37−0
lexicons/social/grain/group/pool/listGalleries.jsonnew+35−0
lexicons/social/grain/group/pool/putFavorite.jsonnew+40−0
lexicons/social/grain/group/createGroup.jsonnew+38−0
lexicons/social/grain/group/getGroup.jsonnew+19−0
lexicons/social/grain/group/getGroupHost.jsonnew+21−0
lexicons/social/grain/group/getSubmissions.jsonnew+33−0
lexicons/social/grain/group/joinGroup.jsonnew+31−0
lexicons/social/grain/group/leaveGroup.jsonnew+22−0
lexicons/social/grain/group/listGroups.jsonnew+32−0
lexicons/social/grain/notification/defs.jsonnew+36−0
lexicons/social/grain/notification/getUnreadCount.jsonnew+18−0
lexicons/social/grain/notification/listNotifications.jsonnew+32−0
lexicons/social/grain/notification/registerPush.jsonnew+31−0
lexicons/social/grain/notification/unregisterPush.jsonnew+31−0
lexicons/social/grain/notification/updateSeen.jsonnew+22−0
lexicons/social/grain/privateGallery/addMember.jsonnew+36−0
lexicons/social/grain/privateGallery/createPrivateGallery.jsonnew+58−0
lexicons/social/grain/privateGallery/defs.jsonnew+77−0
lexicons/social/grain/privateGallery/getPrivateGallery.jsonnew+40−0
lexicons/social/grain/privateGallery/getSpaceSupport.jsonnew+39−0
lexicons/social/grain/privateGallery/listMembers.jsonnew+34−0
lexicons/social/grain/privateGallery/listPrivateGalleries.jsonnew+32−0
lexicons/social/grain/server/defs.jsonnew+17−0
lexicons/social/grain/server/deleteAccount.jsonnew+14−0
lexicons/social/grain/server/getSitemap.jsonnew+35−0
lexicons/social/grain/story/defs.json+18−0
lexicons/social/grain/story/getArchive.jsonnew+33−0
lexicons/social/grain/story/getAuthors.jsonnew+23−0
lexicons/social/grain/story/getStories.jsonnew+28−0
lexicons/social/grain/story/getStory.jsonnew+21−0
lexicons/social/grain/story/markViewed.jsonnew+30−0
lexicons/social/grain/sync/indexRecords.jsonnew+52−0
lexicons/README.mdnew+127−0
web/src/lib/components/molecules/ProfilePopover.svelte+1−1
web/src/lib/stories.ts+5−1
hatk.generated.client.ts+2−2
hatk.generated.ts+502−149
651 lines changed: not loaded until asked for.