grain.social is a photo sharing platform built on atproto.
grain.social
atproto
photography
appview
1// Auto-generated from lexicons. Do not edit.
2import type { LexDef, LexProcedure, LexQuery, LexRecord, LexServerParams, Checked, Prettify, StrictArg } from '@hatk/hatk/lex-types'
3import type { XrpcContext } from '@hatk/hatk/xrpc'
4import { callXrpc as _callXrpc } from '@hatk/hatk/xrpc'
5import { defineFeed as _defineFeed, type FeedResult, type FeedContext, type BaseContext, type Row } from '@hatk/hatk/feeds'
6import { seed as _seed, type SeedOpts } from '@hatk/hatk/seed'
7
8// ─── Lexicon Definitions ────────────────────────────────────────────
9
10const bskyActorDefsLex = {"id":"app.bsky.actor.defs","defs":{"nux":{"type":"object","required":["id","completed"],"properties":{"id":{"type":"string","maxLength":100},"data":{"type":"string","maxLength":3000,"description":"Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.","maxGraphemes":300},"completed":{"type":"boolean","default":false},"expiresAt":{"type":"string","format":"datetime","description":"The date and time at which the NUX will expire and should be considered completed."}},"description":"A new user experiences (NUX) storage object"},"mutedWord":{"type":"object","required":["value","targets"],"properties":{"id":{"type":"string"},"value":{"type":"string","maxLength":10000,"description":"The muted word itself.","maxGraphemes":1000},"targets":{"type":"array","items":{"ref":"app.bsky.actor.defs#mutedWordTarget","type":"ref"},"description":"The intended targets of the muted word."},"expiresAt":{"type":"string","format":"datetime","description":"The date and time at which the muted word will expire and no longer be applied."},"actorTarget":{"type":"string","default":"all","description":"Groups of users to apply the muted word to. If undefined, applies to all users.","knownValues":["all","exclude-following"]}},"description":"A word that the account owner has muted."},"savedFeed":{"type":"object","required":["id","type","value","pinned"],"properties":{"id":{"type":"string"},"type":{"type":"string","knownValues":["feed","list","timeline"]},"value":{"type":"string"},"pinned":{"type":"boolean"}}},"statusView":{"type":"object","required":["status","record"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"embed":{"refs":["app.bsky.embed.external#view"],"type":"union","description":"An optional embed associated with the status."},"record":{"type":"unknown"},"status":{"type":"string","description":"The status for the account.","knownValues":["app.bsky.actor.status#live"]},"isActive":{"type":"boolean","description":"True if the status is not expired, false if it is expired. Only present if expiration was set."},"expiresAt":{"type":"string","format":"datetime","description":"The date when this status will expire. The application might choose to no longer return the status after expiration."},"isDisabled":{"type":"boolean","description":"True if the user's go-live access has been disabled by a moderator, false otherwise."}}},"preferences":{"type":"array","items":{"refs":["#adultContentPref","#contentLabelPref","#savedFeedsPref","#savedFeedsPrefV2","#personalDetailsPref","#declaredAgePref","#feedViewPref","#threadViewPref","#interestsPref","#mutedWordsPref","#hiddenPostsPref","#bskyAppStatePref","#labelersPref","#postInteractionSettingsPref","#verificationPrefs","#liveEventPreferences"],"type":"union"}},"profileView":{"type":"object","required":["did","handle"],"properties":{"did":{"type":"string","format":"did"},"debug":{"type":"unknown","description":"Debug information for internal development"},"avatar":{"type":"string","format":"uri"},"handle":{"type":"string","format":"handle"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"status":{"ref":"#statusView","type":"ref"},"viewer":{"ref":"#viewerState","type":"ref"},"pronouns":{"type":"string"},"createdAt":{"type":"string","format":"datetime"},"indexedAt":{"type":"string","format":"datetime"},"associated":{"ref":"#profileAssociated","type":"ref"},"description":{"type":"string","maxLength":2560,"maxGraphemes":256},"displayName":{"type":"string","maxLength":640,"maxGraphemes":64},"verification":{"ref":"#verificationState","type":"ref"}}},"viewerState":{"type":"object","properties":{"muted":{"type":"boolean"},"blocking":{"type":"string","format":"at-uri"},"blockedBy":{"type":"boolean"},"following":{"type":"string","format":"at-uri"},"followedBy":{"type":"string","format":"at-uri"},"mutedByList":{"ref":"app.bsky.graph.defs#listViewBasic","type":"ref"},"blockingByList":{"ref":"app.bsky.graph.defs#listViewBasic","type":"ref"},"knownFollowers":{"ref":"#knownFollowers","type":"ref","description":"This property is present only in selected cases, as an optimization."},"activitySubscription":{"ref":"app.bsky.notification.defs#activitySubscription","type":"ref","description":"This property is present only in selected cases, as an optimization."}},"description":"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests."},"feedViewPref":{"type":"object","required":["feed"],"properties":{"feed":{"type":"string","description":"The URI of the feed, or an identifier which describes the feed."},"hideReplies":{"type":"boolean","description":"Hide replies in the feed."},"hideReposts":{"type":"boolean","description":"Hide reposts in the feed."},"hideQuotePosts":{"type":"boolean","description":"Hide quote posts in the feed."},"hideRepliesByLikeCount":{"type":"integer","description":"Hide replies in the feed if they do not have this number of likes."},"hideRepliesByUnfollowed":{"type":"boolean","default":true,"description":"Hide replies in the feed if they are not by followed users."}}},"labelersPref":{"type":"object","required":["labelers"],"properties":{"labelers":{"type":"array","items":{"ref":"#labelerPrefItem","type":"ref"}}}},"interestsPref":{"type":"object","required":["tags"],"properties":{"tags":{"type":"array","items":{"type":"string","maxLength":640,"maxGraphemes":64},"maxLength":100,"description":"A list of tags which describe the account owner's interests gathered during onboarding."}}},"knownFollowers":{"type":"object","required":["count","followers"],"properties":{"count":{"type":"integer"},"followers":{"type":"array","items":{"ref":"#profileViewBasic","type":"ref"},"maxLength":5,"minLength":0}},"description":"The subject's followers whom you also follow"},"mutedWordsPref":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"ref":"app.bsky.actor.defs#mutedWord","type":"ref"},"description":"A list of words the account owner has muted."}}},"savedFeedsPref":{"type":"object","required":["pinned","saved"],"properties":{"saved":{"type":"array","items":{"type":"string","format":"at-uri"}},"pinned":{"type":"array","items":{"type":"string","format":"at-uri"}},"timelineIndex":{"type":"integer"}}},"threadViewPref":{"type":"object","properties":{"sort":{"type":"string","description":"Sorting mode for threads.","knownValues":["oldest","newest","most-likes","random","hotness"]}}},"declaredAgePref":{"type":"object","properties":{"isOverAge13":{"type":"boolean","description":"Indicates if the user has declared that they are over 13 years of age."},"isOverAge16":{"type":"boolean","description":"Indicates if the user has declared that they are over 16 years of age."},"isOverAge18":{"type":"boolean","description":"Indicates if the user has declared that they are over 18 years of age."}},"description":"Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration."},"hiddenPostsPref":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"string","format":"at-uri"},"description":"A list of URIs of posts the account owner has hidden."}}},"labelerPrefItem":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"}}},"mutedWordTarget":{"type":"string","maxLength":640,"knownValues":["content","tag"],"maxGraphemes":64},"adultContentPref":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","default":false}}},"bskyAppStatePref":{"type":"object","properties":{"nuxs":{"type":"array","items":{"ref":"app.bsky.actor.defs#nux","type":"ref"},"maxLength":100,"description":"Storage for NUXs the user has encountered."},"queuedNudges":{"type":"array","items":{"type":"string","maxLength":100},"maxLength":1000,"description":"An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user."},"activeProgressGuide":{"ref":"#bskyAppProgressGuide","type":"ref"}},"description":"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this."},"contentLabelPref":{"type":"object","required":["label","visibility"],"properties":{"label":{"type":"string"},"labelerDid":{"type":"string","format":"did","description":"Which labeler does this preference apply to? If undefined, applies globally."},"visibility":{"type":"string","knownValues":["ignore","show","warn","hide"]}}},"profileViewBasic":{"type":"object","required":["did","handle"],"properties":{"did":{"type":"string","format":"did"},"debug":{"type":"unknown","description":"Debug information for internal development"},"avatar":{"type":"string","format":"uri"},"handle":{"type":"string","format":"handle"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"status":{"ref":"#statusView","type":"ref"},"viewer":{"ref":"#viewerState","type":"ref"},"pronouns":{"type":"string"},"createdAt":{"type":"string","format":"datetime"},"associated":{"ref":"#profileAssociated","type":"ref"},"displayName":{"type":"string","maxLength":640,"maxGraphemes":64},"verification":{"ref":"#verificationState","type":"ref"}}},"savedFeedsPrefV2":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"ref":"app.bsky.actor.defs#savedFeed","type":"ref"}}}},"verificationView":{"type":"object","required":["issuer","uri","isValid","createdAt"],"properties":{"uri":{"type":"string","format":"at-uri","description":"The AT-URI of the verification record."},"issuer":{"type":"string","format":"did","description":"The user who issued this verification."},"isValid":{"type":"boolean","description":"True if the verification passes validation, otherwise false."},"createdAt":{"type":"string","format":"datetime","description":"Timestamp when the verification was created."}},"description":"An individual verification for an associated subject."},"profileAssociated":{"type":"object","properties":{"chat":{"ref":"#profileAssociatedChat","type":"ref"},"germ":{"ref":"#profileAssociatedGerm","type":"ref"},"lists":{"type":"integer"},"labeler":{"type":"boolean"},"feedgens":{"type":"integer"},"starterPacks":{"type":"integer"},"activitySubscription":{"ref":"#profileAssociatedActivitySubscription","type":"ref"}}},"verificationPrefs":{"type":"object","required":[],"properties":{"hideBadges":{"type":"boolean","default":false,"description":"Hide the blue check badges for verified accounts and trusted verifiers."}},"description":"Preferences for how verified accounts appear in the app."},"verificationState":{"type":"object","required":["verifications","verifiedStatus","trustedVerifierStatus"],"properties":{"verifications":{"type":"array","items":{"ref":"#verificationView","type":"ref"},"description":"All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included."},"verifiedStatus":{"type":"string","description":"The user's status as a verified account.","knownValues":["valid","invalid","none"]},"trustedVerifierStatus":{"type":"string","description":"The user's status as a trusted verifier.","knownValues":["valid","invalid","none"]}},"description":"Represents the verification information about the user this object is attached to."},"personalDetailsPref":{"type":"object","properties":{"birthDate":{"type":"string","format":"datetime","description":"The birth date of account owner."}}},"profileViewDetailed":{"type":"object","required":["did","handle"],"properties":{"did":{"type":"string","format":"did"},"debug":{"type":"unknown","description":"Debug information for internal development"},"avatar":{"type":"string","format":"uri"},"banner":{"type":"string","format":"uri"},"handle":{"type":"string","format":"handle"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"status":{"ref":"#statusView","type":"ref"},"viewer":{"ref":"#viewerState","type":"ref"},"website":{"type":"string","format":"uri"},"pronouns":{"type":"string"},"createdAt":{"type":"string","format":"datetime"},"indexedAt":{"type":"string","format":"datetime"},"associated":{"ref":"#profileAssociated","type":"ref"},"pinnedPost":{"ref":"com.atproto.repo.strongRef","type":"ref"},"postsCount":{"type":"integer"},"description":{"type":"string","maxLength":2560,"maxGraphemes":256},"displayName":{"type":"string","maxLength":640,"maxGraphemes":64},"followsCount":{"type":"integer"},"verification":{"ref":"#verificationState","type":"ref"},"followersCount":{"type":"integer"},"joinedViaStarterPack":{"ref":"app.bsky.graph.defs#starterPackViewBasic","type":"ref"}}},"bskyAppProgressGuide":{"type":"object","required":["guide"],"properties":{"guide":{"type":"string","maxLength":100}},"description":"If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress."},"liveEventPreferences":{"type":"object","properties":{"hideAllFeeds":{"type":"boolean","default":false,"description":"Whether to hide all feeds from live events."},"hiddenFeedIds":{"type":"array","items":{"type":"string"},"description":"A list of feed IDs that the user has hidden from live events."}},"description":"Preferences for live events."},"profileAssociatedChat":{"type":"object","required":["allowIncoming"],"properties":{"allowIncoming":{"type":"string","knownValues":["all","none","following"]}}},"profileAssociatedGerm":{"type":"object","required":["showButtonTo","messageMeUrl"],"properties":{"messageMeUrl":{"type":"string","format":"uri"},"showButtonTo":{"type":"string","knownValues":["usersIFollow","everyone"]}}},"postInteractionSettingsPref":{"type":"object","required":[],"properties":{"threadgateAllowRules":{"type":"array","items":{"refs":["app.bsky.feed.threadgate#mentionRule","app.bsky.feed.threadgate#followerRule","app.bsky.feed.threadgate#followingRule","app.bsky.feed.threadgate#listRule"],"type":"union"},"maxLength":5,"description":"Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply."},"postgateEmbeddingRules":{"type":"array","items":{"refs":["app.bsky.feed.postgate#disableRule"],"type":"union"},"maxLength":5,"description":"Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed."}},"description":"Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly."},"profileAssociatedActivitySubscription":{"type":"object","required":["allowSubscriptions"],"properties":{"allowSubscriptions":{"type":"string","knownValues":["followers","mutuals","none"]}}}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
11const bskyActorProfileLex = {"lexicon":1,"id":"app.bsky.actor.profile","defs":{"main":{"type":"record","key":"literal:self","description":"A user profile record","record":{"type":"object","properties":{"displayName":{"type":"string","maxGraphemes":64,"maxLength":640},"description":{"type":"string","maxGraphemes":256,"maxLength":2560},"avatar":{"type":"blob","accept":["image/png","image/jpeg"],"maxSize":1000000},"banner":{"type":"blob","accept":["image/png","image/jpeg"],"maxSize":1000000},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
12const bskyEmbedDefsLex = {"id":"app.bsky.embed.defs","defs":{"aspectRatio":{"type":"object","required":["width","height"],"properties":{"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}},"description":"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
13const externalLex = {"id":"app.bsky.embed.external","defs":{"main":{"type":"object","required":["external"],"properties":{"external":{"ref":"#external","type":"ref"}},"description":"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post)."},"view":{"type":"object","required":["external"],"properties":{"external":{"ref":"#viewExternal","type":"ref"}}},"external":{"type":"object","required":["uri","title","description"],"properties":{"uri":{"type":"string","format":"uri"},"thumb":{"type":"blob","accept":["image/*"],"maxSize":1000000},"title":{"type":"string"},"description":{"type":"string"}}},"viewExternal":{"type":"object","required":["uri","title","description"],"properties":{"uri":{"type":"string","format":"uri"},"thumb":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"}}}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
14const imagesLex = {"id":"app.bsky.embed.images","defs":{"main":{"type":"object","required":["images"],"properties":{"images":{"type":"array","items":{"ref":"#image","type":"ref"},"maxLength":4}}},"view":{"type":"object","required":["images"],"properties":{"images":{"type":"array","items":{"ref":"#viewImage","type":"ref"},"maxLength":4}}},"image":{"type":"object","required":["image","alt"],"properties":{"alt":{"type":"string","description":"Alt text description of the image, for accessibility."},"image":{"type":"blob","accept":["image/*"],"maxSize":1000000},"aspectRatio":{"ref":"app.bsky.embed.defs#aspectRatio","type":"ref"}}},"viewImage":{"type":"object","required":["thumb","fullsize","alt"],"properties":{"alt":{"type":"string","description":"Alt text description of the image, for accessibility."},"thumb":{"type":"string","format":"uri","description":"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},"fullsize":{"type":"string","format":"uri","description":"Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."},"aspectRatio":{"ref":"app.bsky.embed.defs#aspectRatio","type":"ref"}}}},"$type":"com.atproto.lexicon.schema","lexicon":1,"description":"A set of images embedded in a Bluesky record (eg, a post)."} as const
15const recordLex = {"id":"app.bsky.embed.record","defs":{"main":{"type":"object","required":["record"],"properties":{"record":{"ref":"com.atproto.repo.strongRef","type":"ref"}}},"view":{"type":"object","required":["record"],"properties":{"record":{"refs":["#viewRecord","#viewNotFound","#viewBlocked","#viewDetached","app.bsky.feed.defs#generatorView","app.bsky.graph.defs#listView","app.bsky.labeler.defs#labelerView","app.bsky.graph.defs#starterPackViewBasic"],"type":"union"}}},"viewRecord":{"type":"object","required":["uri","cid","author","value","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"value":{"type":"unknown","description":"The record data itself."},"author":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref"},"embeds":{"type":"array","items":{"refs":["app.bsky.embed.images#view","app.bsky.embed.video#view","app.bsky.embed.external#view","app.bsky.embed.record#view","app.bsky.embed.recordWithMedia#view"],"type":"union"}},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"indexedAt":{"type":"string","format":"datetime"},"likeCount":{"type":"integer"},"quoteCount":{"type":"integer"},"replyCount":{"type":"integer"},"repostCount":{"type":"integer"}}},"viewBlocked":{"type":"object","required":["uri","blocked","author"],"properties":{"uri":{"type":"string","format":"at-uri"},"author":{"ref":"app.bsky.feed.defs#blockedAuthor","type":"ref"},"blocked":{"type":"boolean","const":true}}},"viewDetached":{"type":"object","required":["uri","detached"],"properties":{"uri":{"type":"string","format":"at-uri"},"detached":{"type":"boolean","const":true}}},"viewNotFound":{"type":"object","required":["uri","notFound"],"properties":{"uri":{"type":"string","format":"at-uri"},"notFound":{"type":"boolean","const":true}}}},"$type":"com.atproto.lexicon.schema","lexicon":1,"description":"A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record."} as const
16const recordWithMediaLex = {"id":"app.bsky.embed.recordWithMedia","defs":{"main":{"type":"object","required":["record","media"],"properties":{"media":{"refs":["app.bsky.embed.images","app.bsky.embed.video","app.bsky.embed.external"],"type":"union"},"record":{"ref":"app.bsky.embed.record","type":"ref"}}},"view":{"type":"object","required":["record","media"],"properties":{"media":{"refs":["app.bsky.embed.images#view","app.bsky.embed.video#view","app.bsky.embed.external#view"],"type":"union"},"record":{"ref":"app.bsky.embed.record#view","type":"ref"}}}},"$type":"com.atproto.lexicon.schema","lexicon":1,"description":"A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card."} as const
17const videoLex = {"id":"app.bsky.embed.video","defs":{"main":{"type":"object","required":["video"],"properties":{"alt":{"type":"string","maxLength":10000,"description":"Alt text description of the video, for accessibility.","maxGraphemes":1000},"video":{"type":"blob","accept":["video/mp4"],"maxSize":100000000,"description":"The mp4 video file. May be up to 100mb, formerly limited to 50mb."},"captions":{"type":"array","items":{"ref":"#caption","type":"ref"},"maxLength":20},"aspectRatio":{"ref":"app.bsky.embed.defs#aspectRatio","type":"ref"},"presentation":{"type":"string","description":"A hint to the client about how to present the video.","knownValues":["default","gif"]}}},"view":{"type":"object","required":["cid","playlist"],"properties":{"alt":{"type":"string","maxLength":10000,"maxGraphemes":1000},"cid":{"type":"string","format":"cid"},"playlist":{"type":"string","format":"uri"},"thumbnail":{"type":"string","format":"uri"},"aspectRatio":{"ref":"app.bsky.embed.defs#aspectRatio","type":"ref"},"presentation":{"type":"string","description":"A hint to the client about how to present the video.","knownValues":["default","gif"]}}},"caption":{"type":"object","required":["lang","file"],"properties":{"file":{"type":"blob","accept":["text/vtt"],"maxSize":20000},"lang":{"type":"string","format":"language"}}}},"$type":"com.atproto.lexicon.schema","lexicon":1,"description":"A video embedded in a Bluesky record (eg, a post)."} as const
18const bskyFeedDefsLex = {"id":"app.bsky.feed.defs","defs":{"postView":{"type":"object","required":["uri","cid","author","record","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"debug":{"type":"unknown","description":"Debug information for internal development"},"embed":{"refs":["app.bsky.embed.images#view","app.bsky.embed.video#view","app.bsky.embed.external#view","app.bsky.embed.record#view","app.bsky.embed.recordWithMedia#view"],"type":"union"},"author":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"record":{"type":"unknown"},"viewer":{"ref":"#viewerState","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"likeCount":{"type":"integer"},"quoteCount":{"type":"integer"},"replyCount":{"type":"integer"},"threadgate":{"ref":"#threadgateView","type":"ref"},"repostCount":{"type":"integer"},"bookmarkCount":{"type":"integer"}}},"replyRef":{"type":"object","required":["root","parent"],"properties":{"root":{"refs":["#postView","#notFoundPost","#blockedPost"],"type":"union"},"parent":{"refs":["#postView","#notFoundPost","#blockedPost"],"type":"union"},"grandparentAuthor":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref","description":"When parent is a reply to another post, this is the author of that post."}}},"reasonPin":{"type":"object","properties":{}},"blockedPost":{"type":"object","required":["uri","blocked","author"],"properties":{"uri":{"type":"string","format":"at-uri"},"author":{"ref":"#blockedAuthor","type":"ref"},"blocked":{"type":"boolean","const":true}}},"interaction":{"type":"object","properties":{"item":{"type":"string","format":"at-uri"},"event":{"type":"string","knownValues":["app.bsky.feed.defs#requestLess","app.bsky.feed.defs#requestMore","app.bsky.feed.defs#clickthroughItem","app.bsky.feed.defs#clickthroughAuthor","app.bsky.feed.defs#clickthroughReposter","app.bsky.feed.defs#clickthroughEmbed","app.bsky.feed.defs#interactionSeen","app.bsky.feed.defs#interactionLike","app.bsky.feed.defs#interactionRepost","app.bsky.feed.defs#interactionReply","app.bsky.feed.defs#interactionQuote","app.bsky.feed.defs#interactionShare"]},"reqId":{"type":"string","maxLength":100,"description":"Unique identifier per request that may be passed back alongside interactions."},"feedContext":{"type":"string","maxLength":2000,"description":"Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton."}}},"requestLess":{"type":"token","description":"Request that less content like the given feed item be shown in the feed"},"requestMore":{"type":"token","description":"Request that more content like the given feed item be shown in the feed"},"viewerState":{"type":"object","properties":{"like":{"type":"string","format":"at-uri"},"pinned":{"type":"boolean"},"repost":{"type":"string","format":"at-uri"},"bookmarked":{"type":"boolean"},"threadMuted":{"type":"boolean"},"replyDisabled":{"type":"boolean"},"embeddingDisabled":{"type":"boolean"}},"description":"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests."},"feedViewPost":{"type":"object","required":["post"],"properties":{"post":{"ref":"#postView","type":"ref"},"reply":{"ref":"#replyRef","type":"ref"},"reqId":{"type":"string","maxLength":100,"description":"Unique identifier per request that may be passed back alongside interactions."},"reason":{"refs":["#reasonRepost","#reasonPin"],"type":"union"},"feedContext":{"type":"string","maxLength":2000,"description":"Context provided by feed generator that may be passed back alongside interactions."}}},"notFoundPost":{"type":"object","required":["uri","notFound"],"properties":{"uri":{"type":"string","format":"at-uri"},"notFound":{"type":"boolean","const":true}}},"reasonRepost":{"type":"object","required":["by","indexedAt"],"properties":{"by":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref"},"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"indexedAt":{"type":"string","format":"datetime"}}},"blockedAuthor":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"viewer":{"ref":"app.bsky.actor.defs#viewerState","type":"ref"}}},"generatorView":{"type":"object","required":["uri","cid","did","creator","displayName","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"did":{"type":"string","format":"did"},"uri":{"type":"string","format":"at-uri"},"avatar":{"type":"string","format":"uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"viewer":{"ref":"#generatorViewerState","type":"ref"},"creator":{"ref":"app.bsky.actor.defs#profileView","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"likeCount":{"type":"integer","minimum":0},"contentMode":{"type":"string","knownValues":["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},"description":{"type":"string","maxLength":3000,"maxGraphemes":300},"displayName":{"type":"string"},"descriptionFacets":{"type":"array","items":{"ref":"app.bsky.richtext.facet","type":"ref"}},"acceptsInteractions":{"type":"boolean"}}},"threadContext":{"type":"object","properties":{"rootAuthorLike":{"type":"string","format":"at-uri"}},"description":"Metadata about this post within the context of the thread it is in."},"threadViewPost":{"type":"object","required":["post"],"properties":{"post":{"ref":"#postView","type":"ref"},"parent":{"refs":["#threadViewPost","#notFoundPost","#blockedPost"],"type":"union"},"replies":{"type":"array","items":{"refs":["#threadViewPost","#notFoundPost","#blockedPost"],"type":"union"}},"threadContext":{"ref":"#threadContext","type":"ref"}}},"threadgateView":{"type":"object","properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"lists":{"type":"array","items":{"ref":"app.bsky.graph.defs#listViewBasic","type":"ref"}},"record":{"type":"unknown"}}},"interactionLike":{"type":"token","description":"User liked the feed item"},"interactionSeen":{"type":"token","description":"Feed item was seen by user"},"clickthroughItem":{"type":"token","description":"User clicked through to the feed item"},"contentModeVideo":{"type":"token","description":"Declares the feed generator returns posts containing app.bsky.embed.video embeds."},"interactionQuote":{"type":"token","description":"User quoted the feed item"},"interactionReply":{"type":"token","description":"User replied to the feed item"},"interactionShare":{"type":"token","description":"User shared the feed item"},"skeletonFeedPost":{"type":"object","required":["post"],"properties":{"post":{"type":"string","format":"at-uri"},"reason":{"refs":["#skeletonReasonRepost","#skeletonReasonPin"],"type":"union"},"feedContext":{"type":"string","maxLength":2000,"description":"Context that will be passed through to client and may be passed to feed generator back alongside interactions."}}},"clickthroughEmbed":{"type":"token","description":"User clicked through to the embedded content of the feed item"},"interactionRepost":{"type":"token","description":"User reposted the feed item"},"skeletonReasonPin":{"type":"object","properties":{}},"clickthroughAuthor":{"type":"token","description":"User clicked through to the author of the feed item"},"clickthroughReposter":{"type":"token","description":"User clicked through to the reposter of the feed item"},"generatorViewerState":{"type":"object","properties":{"like":{"type":"string","format":"at-uri"}}},"skeletonReasonRepost":{"type":"object","required":["repost"],"properties":{"repost":{"type":"string","format":"at-uri"}}},"contentModeUnspecified":{"type":"token","description":"Declares the feed generator returns any types of posts."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
19const postLex = {"id":"app.bsky.feed.post","defs":{"main":{"key":"tid","type":"record","record":{"type":"object","required":["text","createdAt"],"properties":{"tags":{"type":"array","items":{"type":"string","maxLength":640,"maxGraphemes":64},"maxLength":8,"description":"Additional hashtags, in addition to any included in post text and facets."},"text":{"type":"string","maxLength":3000,"description":"The primary post content. May be an empty string, if there are embeds.","maxGraphemes":300},"embed":{"refs":["app.bsky.embed.images","app.bsky.embed.video","app.bsky.embed.external","app.bsky.embed.record","app.bsky.embed.recordWithMedia"],"type":"union"},"langs":{"type":"array","items":{"type":"string","format":"language"},"maxLength":3,"description":"Indicates human language of post primary text content."},"reply":{"ref":"#replyRef","type":"ref"},"facets":{"type":"array","items":{"ref":"app.bsky.richtext.facet","type":"ref"},"description":"Annotations of text (mentions, URLs, hashtags, etc)"},"labels":{"refs":["com.atproto.label.defs#selfLabels"],"type":"union","description":"Self-label values for this post. Effectively content warnings."},"entities":{"type":"array","items":{"ref":"#entity","type":"ref"},"description":"DEPRECATED: replaced by app.bsky.richtext.facet."},"createdAt":{"type":"string","format":"datetime","description":"Client-declared timestamp when this post was originally created."}}},"description":"Record containing a Bluesky post."},"entity":{"type":"object","required":["index","type","value"],"properties":{"type":{"type":"string","description":"Expected values are 'mention' and 'link'."},"index":{"ref":"#textSlice","type":"ref"},"value":{"type":"string"}},"description":"Deprecated: use facets instead."},"replyRef":{"type":"object","required":["root","parent"],"properties":{"root":{"ref":"com.atproto.repo.strongRef","type":"ref"},"parent":{"ref":"com.atproto.repo.strongRef","type":"ref"}}},"textSlice":{"type":"object","required":["start","end"],"properties":{"end":{"type":"integer","minimum":0},"start":{"type":"integer","minimum":0}},"description":"Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
20const postgateLex = {"id":"app.bsky.feed.postgate","defs":{"main":{"key":"tid","type":"record","record":{"type":"object","required":["post","createdAt"],"properties":{"post":{"type":"string","format":"at-uri","description":"Reference (AT-URI) to the post record."},"createdAt":{"type":"string","format":"datetime"},"embeddingRules":{"type":"array","items":{"refs":["#disableRule"],"type":"union"},"maxLength":5,"description":"List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed."},"detachedEmbeddingUris":{"type":"array","items":{"type":"string","format":"at-uri"},"maxLength":50,"description":"List of AT-URIs embedding this post that the author has detached from."}}},"description":"Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository."},"disableRule":{"type":"object","properties":{},"description":"Disables embedding of this post."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
21const threadgateLex = {"id":"app.bsky.feed.threadgate","defs":{"main":{"key":"tid","type":"record","record":{"type":"object","required":["post","createdAt"],"properties":{"post":{"type":"string","format":"at-uri","description":"Reference (AT-URI) to the post record."},"allow":{"type":"array","items":{"refs":["#mentionRule","#followerRule","#followingRule","#listRule"],"type":"union"},"maxLength":5,"description":"List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply."},"createdAt":{"type":"string","format":"datetime"},"hiddenReplies":{"type":"array","items":{"type":"string","format":"at-uri"},"maxLength":300,"description":"List of hidden reply URIs."}}},"description":"Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository."},"listRule":{"type":"object","required":["list"],"properties":{"list":{"type":"string","format":"at-uri"}},"description":"Allow replies from actors on a list."},"mentionRule":{"type":"object","properties":{},"description":"Allow replies from actors mentioned in your post."},"followerRule":{"type":"object","properties":{},"description":"Allow replies from actors who follow you."},"followingRule":{"type":"object","properties":{},"description":"Allow replies from actors you follow."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
22const bskyGraphDefsLex = {"id":"app.bsky.graph.defs","defs":{"modlist":{"type":"token","description":"A list of actors to apply an aggregate moderation action (mute/block) on."},"listView":{"type":"object","required":["uri","cid","creator","name","purpose","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"name":{"type":"string","maxLength":64,"minLength":1},"avatar":{"type":"string","format":"uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"viewer":{"ref":"#listViewerState","type":"ref"},"creator":{"ref":"app.bsky.actor.defs#profileView","type":"ref"},"purpose":{"ref":"#listPurpose","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"description":{"type":"string","maxLength":3000,"maxGraphemes":300},"listItemCount":{"type":"integer","minimum":0},"descriptionFacets":{"type":"array","items":{"ref":"app.bsky.richtext.facet","type":"ref"}}}},"curatelist":{"type":"token","description":"A list of actors used for curation purposes such as list feeds or interaction gating."},"listPurpose":{"type":"string","knownValues":["app.bsky.graph.defs#modlist","app.bsky.graph.defs#curatelist","app.bsky.graph.defs#referencelist"]},"listItemView":{"type":"object","required":["uri","subject"],"properties":{"uri":{"type":"string","format":"at-uri"},"subject":{"ref":"app.bsky.actor.defs#profileView","type":"ref"}}},"relationship":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"blocking":{"type":"string","format":"at-uri","description":"if the actor blocks this DID, this is the AT-URI of the block record"},"blockedBy":{"type":"string","format":"at-uri","description":"if the actor is blocked by this DID, contains the AT-URI of the block record"},"following":{"type":"string","format":"at-uri","description":"if the actor follows this DID, this is the AT-URI of the follow record"},"followedBy":{"type":"string","format":"at-uri","description":"if the actor is followed by this DID, contains the AT-URI of the follow record"},"blockedByList":{"type":"string","format":"at-uri","description":"if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record"},"blockingByList":{"type":"string","format":"at-uri","description":"if the actor blocks this DID via a block list, this is the AT-URI of the listblock record"}},"description":"lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)"},"listViewBasic":{"type":"object","required":["uri","cid","name","purpose"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"name":{"type":"string","maxLength":64,"minLength":1},"avatar":{"type":"string","format":"uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"viewer":{"ref":"#listViewerState","type":"ref"},"purpose":{"ref":"#listPurpose","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"listItemCount":{"type":"integer","minimum":0}}},"notFoundActor":{"type":"object","required":["actor","notFound"],"properties":{"actor":{"type":"string","format":"at-identifier"},"notFound":{"type":"boolean","const":true}},"description":"indicates that a handle or DID could not be resolved"},"referencelist":{"type":"token","description":"A list of actors used for only for reference purposes such as within a starter pack."},"listViewerState":{"type":"object","properties":{"muted":{"type":"boolean"},"blocked":{"type":"string","format":"at-uri"}}},"starterPackView":{"type":"object","required":["uri","cid","record","creator","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"list":{"ref":"#listViewBasic","type":"ref"},"feeds":{"type":"array","items":{"ref":"app.bsky.feed.defs#generatorView","type":"ref"},"maxLength":3},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"record":{"type":"unknown"},"creator":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"joinedWeekCount":{"type":"integer","minimum":0},"listItemsSample":{"type":"array","items":{"ref":"#listItemView","type":"ref"},"maxLength":12},"joinedAllTimeCount":{"type":"integer","minimum":0}}},"starterPackViewBasic":{"type":"object","required":["uri","cid","record","creator","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"record":{"type":"unknown"},"creator":{"ref":"app.bsky.actor.defs#profileViewBasic","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"listItemCount":{"type":"integer","minimum":0},"joinedWeekCount":{"type":"integer","minimum":0},"joinedAllTimeCount":{"type":"integer","minimum":0}}}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
23const bskyGraphFollowLex = {"lexicon":1,"id":"app.bsky.graph.follow","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["subject","createdAt"],"properties":{"subject":{"type":"string"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
24const bskyLabelerDefsLex = {"id":"app.bsky.labeler.defs","defs":{"labelerView":{"type":"object","required":["uri","cid","creator","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"viewer":{"ref":"#labelerViewerState","type":"ref"},"creator":{"ref":"app.bsky.actor.defs#profileView","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"likeCount":{"type":"integer","minimum":0}}},"labelerPolicies":{"type":"object","required":["labelValues"],"properties":{"labelValues":{"type":"array","items":{"ref":"com.atproto.label.defs#labelValue","type":"ref"},"description":"The label values which this labeler publishes. May include global or custom labels."},"labelValueDefinitions":{"type":"array","items":{"ref":"com.atproto.label.defs#labelValueDefinition","type":"ref"},"description":"Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler."}}},"labelerViewerState":{"type":"object","properties":{"like":{"type":"string","format":"at-uri"}}},"labelerViewDetailed":{"type":"object","required":["uri","cid","creator","policies","indexedAt"],"properties":{"cid":{"type":"string","format":"cid"},"uri":{"type":"string","format":"at-uri"},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"viewer":{"ref":"#labelerViewerState","type":"ref"},"creator":{"ref":"app.bsky.actor.defs#profileView","type":"ref"},"policies":{"ref":"app.bsky.labeler.defs#labelerPolicies","type":"ref"},"indexedAt":{"type":"string","format":"datetime"},"likeCount":{"type":"integer","minimum":0},"reasonTypes":{"type":"array","items":{"ref":"com.atproto.moderation.defs#reasonType","type":"ref"},"description":"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed."},"subjectTypes":{"type":"array","items":{"ref":"com.atproto.moderation.defs#subjectType","type":"ref"},"description":"The set of subject types (account, record, etc) this service accepts reports on."},"subjectCollections":{"type":"array","items":{"type":"string","format":"nsid"},"description":"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type."}}}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
25const bskyNotificationDefsLex = {"id":"app.bsky.notification.defs","defs":{"preference":{"type":"object","required":["list","push"],"properties":{"list":{"type":"boolean"},"push":{"type":"boolean"}}},"preferences":{"type":"object","required":["chat","follow","like","likeViaRepost","mention","quote","reply","repost","repostViaRepost","starterpackJoined","subscribedPost","unverified","verified"],"properties":{"chat":{"ref":"#chatPreference","type":"ref"},"like":{"ref":"#filterablePreference","type":"ref"},"quote":{"ref":"#filterablePreference","type":"ref"},"reply":{"ref":"#filterablePreference","type":"ref"},"follow":{"ref":"#filterablePreference","type":"ref"},"repost":{"ref":"#filterablePreference","type":"ref"},"mention":{"ref":"#filterablePreference","type":"ref"},"verified":{"ref":"#preference","type":"ref"},"unverified":{"ref":"#preference","type":"ref"},"likeViaRepost":{"ref":"#filterablePreference","type":"ref"},"subscribedPost":{"ref":"#preference","type":"ref"},"repostViaRepost":{"ref":"#filterablePreference","type":"ref"},"starterpackJoined":{"ref":"#preference","type":"ref"}}},"recordDeleted":{"type":"object","properties":{}},"chatPreference":{"type":"object","required":["include","push"],"properties":{"push":{"type":"boolean"},"include":{"type":"string","knownValues":["all","accepted"]}}},"activitySubscription":{"type":"object","required":["post","reply"],"properties":{"post":{"type":"boolean"},"reply":{"type":"boolean"}}},"filterablePreference":{"type":"object","required":["include","list","push"],"properties":{"list":{"type":"boolean"},"push":{"type":"boolean"},"include":{"type":"string","knownValues":["all","follows"]}}},"subjectActivitySubscription":{"type":"object","required":["subject","activitySubscription"],"properties":{"subject":{"type":"string","format":"did"},"activitySubscription":{"ref":"#activitySubscription","type":"ref"}},"description":"Object used to store activity subscription data in stash."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
26const facetLex = {"id":"app.bsky.richtext.facet","defs":{"tag":{"type":"object","required":["tag"],"properties":{"tag":{"type":"string","maxLength":640,"maxGraphemes":64}},"description":"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags')."},"link":{"type":"object","required":["uri"],"properties":{"uri":{"type":"string","format":"uri"}},"description":"Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL."},"main":{"type":"object","required":["index","features"],"properties":{"index":{"ref":"#byteSlice","type":"ref"},"features":{"type":"array","items":{"refs":["#mention","#link","#tag"],"type":"union"}}},"description":"Annotation of a sub-string within rich text."},"mention":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"}},"description":"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID."},"byteSlice":{"type":"object","required":["byteStart","byteEnd"],"properties":{"byteEnd":{"type":"integer","minimum":0},"byteStart":{"type":"integer","minimum":0}},"description":"Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets."}},"$type":"com.atproto.lexicon.schema","lexicon":1} as const
27const atprotoLabelDefsLex = {"lexicon":1,"id":"com.atproto.label.defs","defs":{"label":{"type":"object","description":"Metadata tag on an atproto resource (eg, repo or record).","required":["src","uri","val","cts"],"properties":{"ver":{"type":"integer"},"src":{"type":"string","format":"did"},"uri":{"type":"string","format":"uri"},"cid":{"type":"string","format":"cid"},"val":{"type":"string","maxLength":128},"neg":{"type":"boolean"},"cts":{"type":"string","format":"datetime"},"exp":{"type":"string","format":"datetime"},"sig":{"type":"bytes"}}},"selfLabels":{"type":"object","description":"Metadata tags on an atproto record, published by the author within the record.","required":["values"],"properties":{"values":{"type":"array","items":{"type":"ref","ref":"#selfLabel"},"maxLength":10}}},"selfLabel":{"type":"object","required":["val"],"properties":{"val":{"type":"string","maxLength":128}}},"labelValueDefinition":{"type":"object","description":"Declares a label value and its expected interpretations and behaviors.","required":["identifier","severity","blurs","locales"],"properties":{"identifier":{"type":"string","maxLength":100},"severity":{"type":"string","knownValues":["inform","alert","none"]},"blurs":{"type":"string","knownValues":["content","media","none"]},"defaultSetting":{"type":"string","knownValues":["ignore","warn","hide"]},"adultOnly":{"type":"boolean"},"locales":{"type":"array","items":{"type":"ref","ref":"#labelValueDefinitionStrings"}}}},"labelValueDefinitionStrings":{"type":"object","required":["lang","name","description"],"properties":{"lang":{"type":"string","format":"language"},"name":{"type":"string","maxLength":640},"description":{"type":"string","maxLength":100000}}},"labelValue":{"type":"string","knownValues":["!hide","!no-promote","!warn","!no-unauthenticated","dmca-violation","doxxing","porn","sexual","nudity","nsfl","gore"]}}} as const
28const atprotoModerationDefsLex = {"lexicon":1,"id":"com.atproto.moderation.defs","defs":{"reasonType":{"type":"string","knownValues":["com.atproto.moderation.defs#reasonSpam","com.atproto.moderation.defs#reasonViolation","com.atproto.moderation.defs#reasonMisleading","com.atproto.moderation.defs#reasonSexual","com.atproto.moderation.defs#reasonRude","com.atproto.moderation.defs#reasonOther","com.atproto.moderation.defs#reasonAppeal"]},"reasonSpam":{"type":"token","description":"Spam: frequent unwanted promotion, replies, mentions."},"reasonViolation":{"type":"token","description":"Direct violation of server rules, laws, terms of service."},"reasonMisleading":{"type":"token","description":"Misleading identity, affiliation, or content."},"reasonSexual":{"type":"token","description":"Unwanted or mislabeled sexual content."},"reasonRude":{"type":"token","description":"Rude, harassing, explicit, or otherwise unwelcoming behavior."},"reasonOther":{"type":"token","description":"Reports not falling under another report category."},"reasonAppeal":{"type":"token","description":"Appeal a previously taken moderation action."},"subjectType":{"type":"string","description":"Tag describing a type of subject that might be reported.","knownValues":["account","record","chat"]}}} as const
29const strongRefLex = {"lexicon":1,"id":"com.atproto.repo.strongRef","description":"A URI with a content-hash fingerprint.","defs":{"main":{"type":"object","required":["uri","cid"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"}}}}} as const
30const declarationLex = {"lexicon":1,"id":"com.germnetwork.declaration","defs":{"main":{"type":"record","description":"A declaration of a Germ Network account","key":"literal:self","record":{"type":"object","required":["version","currentKey"],"properties":{"version":{"type":"string","description":"Semver version number, without pre-release or build information, for the format of opaque content","minLength":5,"maxLength":14},"currentKey":{"type":"bytes","description":"Opaque value, an ed25519 public key prefixed with a byte enum"},"messageMe":{"type":"ref","description":"Controls who can message this account","ref":"#messageMe"},"keyPackage":{"type":"bytes","description":"Opaque value, contains MLS KeyPackage(s), and other signature data, and is signed by the currentKey"},"continuityProofs":{"type":"array","description":"Array of opaque values to allow for key rolling","items":{"type":"bytes"},"maxLength":1000}}}},"messageMe":{"type":"object","required":["showButtonTo","messageMeUrl"],"properties":{"messageMeUrl":{"type":"string","description":"A URL to present to an account that does not have its own com.germnetwork.declaration record, where the app should fill in the fragment component with the DIDs of the two accounts who wish to message each other","format":"uri","minLength":1,"maxLength":2047},"showButtonTo":{"type":"string","knownValues":["none","usersIFollow","everyone"],"description":"The policy of who can message the account, this value is included in the keyPackage, but is duplicated here to allow applications to decide if they should show a 'Message on Germ' button to the viewer.","minLength":1,"maxLength":100}}}}} as const
31const addressLex = {"lexicon":1,"id":"community.lexicon.location.address","defs":{"main":{"type":"object","description":"A physical location in the form of a street address.","required":["country"],"properties":{"country":{"type":"string","description":"The ISO 3166 country code. Preferably the 2-letter code.","minLength":2,"maxLength":10},"postalCode":{"type":"string","description":"The postal code of the location."},"region":{"type":"string","description":"The administrative region of the country. For example, a state in the USA."},"locality":{"type":"string","description":"The locality of the region. For example, a city in the USA."},"street":{"type":"string","description":"The street address."},"name":{"type":"string","description":"The name of the location."}}}}} as const
32const geoLex = {"lexicon":1,"id":"community.lexicon.location.geo","defs":{"main":{"type":"object","description":"A physical location in the form of a WGS84 coordinate.","required":["latitude","longitude"],"properties":{"latitude":{"type":"string"},"longitude":{"type":"string"},"altitude":{"type":"string"},"name":{"type":"string","description":"The name of the location."}}}}} as const
33const hthreeLex = {"lexicon":1,"id":"community.lexicon.location.hthree","defs":{"main":{"type":"object","description":"A physical location in the form of a H3 encoded location.","required":["value"],"properties":{"value":{"type":"string","description":"The h3 encoded location."},"name":{"type":"string","description":"The name of the location."}}}}} as const
34const applyWritesLex = {"lexicon":1,"id":"dev.hatk.applyWrites","defs":{"main":{"type":"procedure","description":"Apply multiple record writes in a single atomic PDS transaction.","input":{"encoding":"application/json","schema":{"type":"object","required":["writes"],"properties":{"writes":{"type":"array","items":{"type":"union","refs":["#create","#update","#delete"]}}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"union","refs":["#createResult","#updateResult","#deleteResult"]}}}}}},"create":{"type":"object","required":["collection","value"],"properties":{"collection":{"type":"string"},"rkey":{"type":"string"},"value":{"type":"unknown"}}},"update":{"type":"object","required":["collection","rkey","value"],"properties":{"collection":{"type":"string"},"rkey":{"type":"string"},"value":{"type":"unknown"}}},"delete":{"type":"object","required":["collection","rkey"],"properties":{"collection":{"type":"string"},"rkey":{"type":"string"}}},"createResult":{"type":"object","required":["uri","cid"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"}}},"updateResult":{"type":"object","required":["uri","cid"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"}}},"deleteResult":{"type":"object","properties":{}}}} as const
35const createRecordLex = {"lexicon":1,"id":"dev.hatk.createRecord","defs":{"main":{"type":"procedure","description":"Create a record via the user's PDS.","input":{"encoding":"application/json","schema":{"type":"object","required":["collection","repo","record"],"properties":{"collection":{"type":"string"},"repo":{"type":"string","format":"did"},"record":{"type":"unknown"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"}}}}}}} as const
36const createReportLex = {"lexicon":1,"id":"dev.hatk.createReport","defs":{"main":{"type":"procedure","description":"Report an account or record for moderation review.","input":{"encoding":"application/json","schema":{"type":"object","required":["subject","label"],"properties":{"subject":{"type":"union","description":"The account or record being reported.","refs":["#repoRef","com.atproto.repo.strongRef"]},"label":{"type":"string","description":"Label identifier for the report reason."},"reason":{"type":"string","maxLength":2000,"description":"Optional free-text explanation."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["id","subject","label","reportedBy","createdAt"],"properties":{"id":{"type":"integer"},"subject":{"type":"unknown"},"label":{"type":"string"},"reason":{"type":"string"},"reportedBy":{"type":"string","format":"did"},"createdAt":{"type":"string","format":"datetime"}}}}},"repoRef":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"}}}}} as const
37const deleteRecordLex = {"lexicon":1,"id":"dev.hatk.deleteRecord","defs":{"main":{"type":"procedure","description":"Delete a record via the user's PDS.","input":{"encoding":"application/json","schema":{"type":"object","required":["collection","rkey"],"properties":{"collection":{"type":"string"},"rkey":{"type":"string"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
38const describeCollectionsLex = {"lexicon":1,"id":"dev.hatk.describeCollections","defs":{"main":{"type":"query","description":"List indexed collections and their schemas.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","required":["collection"],"properties":{"collection":{"type":"string"},"columns":{"type":"array","items":{"type":"object","required":["name","originalName","type","required"],"properties":{"name":{"type":"string"},"originalName":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"}}}}}}}}}}}}} as const
39const describeFeedsLex = {"lexicon":1,"id":"dev.hatk.describeFeeds","defs":{"main":{"type":"query","description":"List available feeds.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"feeds":{"type":"array","items":{"type":"object","required":["name","label"],"properties":{"name":{"type":"string"},"label":{"type":"string"}}}}}}}}}} as const
40const describeLabelsLex = {"lexicon":1,"id":"dev.hatk.describeLabels","defs":{"main":{"type":"query","description":"List available label definitions.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"definitions":{"type":"array","items":{"type":"ref","ref":"#labelDefinition"}}}}}},"labelDefinition":{"type":"object","required":["identifier","severity","blurs","defaultSetting"],"properties":{"identifier":{"type":"string"},"severity":{"type":"string"},"blurs":{"type":"string"},"defaultSetting":{"type":"string"},"locales":{"type":"array","items":{"type":"ref","ref":"#labelLocale"}}}},"labelLocale":{"type":"object","required":["lang","name","description"],"properties":{"lang":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}} as const
41const getFeedLex = {"lexicon":1,"id":"dev.hatk.getFeed","defs":{"main":{"type":"query","description":"Retrieve a named feed of items.","parameters":{"type":"params","required":["feed"],"properties":{"feed":{"type":"string","description":"Feed name"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":30},"cursor":{"type":"string"},"actor":{"type":"string","format":"did","description":"Filter by actor DID"},"camera":{"type":"string","description":"Filter by camera make and model"},"location":{"type":"string","description":"Filter by H3 cell index"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"ref","ref":"social.grain.gallery.defs#galleryView"}},"cursor":{"type":"string"}}}}}}} as const
42const getPreferencesLex = {"lexicon":1,"id":"dev.hatk.getPreferences","defs":{"main":{"type":"query","description":"Get all preferences for the authenticated user.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"preferences":{"type":"unknown"}}}}}}} as const
43const getRecordLex = {"lexicon":1,"id":"dev.hatk.getRecord","defs":{"main":{"type":"query","description":"Fetch a single record by AT URI.","parameters":{"type":"params","required":["uri"],"properties":{"uri":{"type":"string","format":"at-uri"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"record":{"type":"unknown"}}}}}}} as const
44const getRecordsLex = {"lexicon":1,"id":"dev.hatk.getRecords","defs":{"main":{"type":"query","description":"List records from a collection with optional filters.","parameters":{"type":"params","required":["collection"],"properties":{"collection":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"},"sort":{"type":"string"},"order":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"unknown"}},"cursor":{"type":"string"}}}}}}} as const
45const putPreferenceLex = {"lexicon":1,"id":"dev.hatk.putPreference","defs":{"main":{"type":"procedure","description":"Set a single preference by key.","input":{"encoding":"application/json","schema":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"unknown"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
46const putRecordLex = {"lexicon":1,"id":"dev.hatk.putRecord","defs":{"main":{"type":"procedure","description":"Create or update a record via the user's PDS.","input":{"encoding":"application/json","schema":{"type":"object","required":["collection","rkey","record"],"properties":{"collection":{"type":"string"},"rkey":{"type":"string"},"record":{"type":"unknown"},"repo":{"type":"string","format":"did"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"}}}}}}} as const
47const searchRecordsLex = {"lexicon":1,"id":"dev.hatk.searchRecords","defs":{"main":{"type":"query","description":"Full-text search across a collection.","parameters":{"type":"params","required":["collection","q"],"properties":{"collection":{"type":"string"},"q":{"type":"string","description":"Search query"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"},"fuzzy":{"type":"boolean","default":true}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"unknown"}},"cursor":{"type":"string"}}}}}}} as const
48const uploadBlobLex = {"lexicon":1,"id":"dev.hatk.uploadBlob","defs":{"main":{"type":"procedure","description":"Upload a blob via the user's PDS.","input":{"encoding":"*/*"},"output":{"encoding":"application/json","schema":{"type":"object","required":["blob"],"properties":{"blob":{"type":"blob"}}}}}}} as const
49const searchLex = {"lexicon":1,"id":"parts.page.mention.search","defs":{"main":{"type":"query","description":"Search a mention service for matching results.","parameters":{"type":"params","required":["service"],"properties":{"service":{"type":"string","format":"at-uri","description":"AT URI of the parts.page.mention.service record"},"search":{"type":"string","description":"Search query string"},"scope":{"type":"string","description":"Optional scope identifier to narrow results"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":20}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"type":"ref","ref":"#result"},"maxLength":50}}}}},"result":{"type":"object","required":["uri","name"],"properties":{"uri":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"labels":{"type":"array","items":{"type":"ref","ref":"#mentionLabel"}},"href":{"type":"string","format":"uri"},"icon":{"type":"string","format":"uri"},"embed":{"type":"ref","ref":"#embedInfo"},"subscope":{"type":"ref","ref":"#subscopeInfo"}}},"mentionLabel":{"type":"object","properties":{"text":{"type":"string"}}},"embedInfo":{"type":"object","required":["src"],"properties":{"src":{"type":"string","format":"uri"},"width":{"type":"integer","minimum":16,"maximum":3200},"height":{"type":"integer","minimum":16,"maximum":3200},"aspectRatio":{"type":"ref","ref":"#aspectRatio"}}},"aspectRatio":{"type":"object","required":["width","height"],"properties":{"width":{"type":"integer"},"height":{"type":"integer"}}},"subscopeInfo":{"type":"object","required":["scope","label"],"properties":{"scope":{"type":"string"},"label":{"type":"string","maxLength":100}}}}} as const
50const grainActorDefsLex = {"lexicon":1,"id":"social.grain.actor.defs","defs":{"profileView":{"type":"object","required":["cid","did","handle"],"properties":{"cid":{"type":"string","format":"cid"},"did":{"type":"string","format":"did"},"handle":{"type":"string","format":"handle"},"displayName":{"type":"string","maxGraphemes":64,"maxLength":640},"description":{"type":"string","maxLength":2560,"maxGraphemes":256},"labels":{"type":"array","items":{"ref":"com.atproto.label.defs#label","type":"ref"}},"avatar":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"datetime"}}},"profileViewDetailed":{"type":"object","required":["cid","did","handle"],"properties":{"cid":{"type":"string","format":"cid"},"did":{"type":"string","format":"did"},"handle":{"type":"string","format":"handle"},"displayName":{"type":"string","maxGraphemes":64,"maxLength":640},"description":{"type":"string","maxGraphemes":256,"maxLength":2560},"avatar":{"type":"string","format":"uri"},"cameras":{"type":"array","items":{"type":"string"},"description":"List of camera make and models used by this actor derived from EXIF data of photos linked to galleries."},"followersCount":{"type":"integer"},"followsCount":{"type":"integer"},"galleryCount":{"type":"integer"},"indexedAt":{"type":"string","format":"datetime"},"createdAt":{"type":"string","format":"datetime"},"messageMe":{"type":"ref","ref":"#messageMe"},"viewer":{"type":"ref","ref":"#viewerState"},"labels":{"type":"array","items":{"type":"ref","ref":"com.atproto.label.defs#label"}}}},"messageMe":{"type":"object","required":["showButtonTo","messageMeUrl"],"properties":{"messageMeUrl":{"type":"string","format":"uri"},"showButtonTo":{"type":"string","knownValues":["usersIFollow","everyone"]}}},"viewerState":{"type":"object","description":"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.","properties":{"following":{"type":"string","format":"at-uri"},"followedBy":{"type":"string","format":"at-uri"},"blocking":{"type":"string","format":"at-uri"},"blockedBy":{"type":"boolean"},"muted":{"type":"boolean"}}}}} as const
51const grainActorProfileLex = {"lexicon":1,"id":"social.grain.actor.profile","defs":{"main":{"type":"record","description":"A declaration of a basic account profile.","key":"literal:self","record":{"type":"object","properties":{"displayName":{"type":"string","maxGraphemes":64,"maxLength":640},"description":{"type":"string","description":"Free-form profile description text.","maxGraphemes":256,"maxLength":2560},"avatar":{"type":"blob","description":"Small image to be displayed next to posts from account. AKA, 'profile picture'","accept":["image/png","image/jpeg"],"maxSize":1000000},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
52const commentLex = {"lexicon":1,"id":"social.grain.comment","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["text","subject","createdAt"],"properties":{"text":{"type":"string","maxLength":3000,"maxGraphemes":300},"facets":{"type":"array","description":"Annotations of description text (mentions and URLs, hashtags, etc)","items":{"type":"ref","ref":"app.bsky.richtext.facet"}},"subject":{"type":"string","format":"at-uri"},"focus":{"type":"string","format":"at-uri"},"replyTo":{"type":"string","format":"at-uri"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
53const grainCommentDefsLex = {"lexicon":1,"id":"social.grain.comment.defs","defs":{"commentView":{"type":"object","required":["uri","cid","author","text","createdAt"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"},"author":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"record":{"type":"unknown"},"text":{"type":"string","maxLength":3000,"maxGraphemes":300},"facets":{"type":"array","description":"Annotations of description text (mentions and URLs, hashtags, etc)","items":{"type":"ref","ref":"app.bsky.richtext.facet"}},"subject":{"type":"union","refs":["social.grain.gallery.defs#galleryView"],"description":"The subject of the comment, which can be a gallery or a photo."},"focus":{"type":"union","refs":["social.grain.photo.defs#photoView"],"description":"The photo that the comment is focused on, if applicable."},"replyTo":{"type":"string","format":"at-uri","description":"The URI of the comment this comment is replying to, if applicable."},"createdAt":{"type":"string","format":"datetime"},"favCount":{"type":"integer"},"viewer":{"type":"ref","ref":"#viewerState"},"muted":{"type":"boolean","description":"True if the viewer has muted the comment author. Client should show collapsed with option to expand."}}},"viewerState":{"type":"object","description":"Metadata about the requesting account's relationship with the comment. Only has meaningful content for authed requests.","properties":{"fav":{"type":"string","format":"at-uri"}}}}} as const
54const grainDefsLex = {"lexicon":1,"id":"social.grain.defs","defs":{"aspectRatio":{"type":"object","description":"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.","required":["width","height"],"properties":{"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}} as const
55const favoriteLex = {"lexicon":1,"id":"social.grain.favorite","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["createdAt","subject"],"properties":{"createdAt":{"type":"string","format":"datetime"},"subject":{"type":"string","format":"at-uri"}}}}}} as const
56const galleryLex = {"lexicon":1,"id":"social.grain.gallery","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["title","createdAt"],"properties":{"title":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":1000},"facets":{"type":"array","description":"Annotations of description text (mentions, URLs, hashtags, etc)","items":{"type":"ref","ref":"app.bsky.richtext.facet"}},"labels":{"type":"union","description":"Self-label values for this post. Effectively content warnings.","refs":["com.atproto.label.defs#selfLabels"]},"location":{"type":"ref","ref":"community.lexicon.location.hthree"},"address":{"type":"ref","ref":"community.lexicon.location.address"},"updatedAt":{"type":"string","format":"datetime"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
57const grainGalleryDefsLex = {"lexicon":1,"id":"social.grain.gallery.defs","defs":{"galleryView":{"type":"object","required":["uri","cid","creator","record","indexedAt"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"},"title":{"type":"string"},"description":{"type":"string"},"cameras":{"type":"array","description":"List of camera make and models used in this gallery derived from EXIF data.","items":{"type":"string"}},"location":{"type":"ref","ref":"community.lexicon.location.hthree"},"address":{"type":"ref","ref":"community.lexicon.location.address"},"locationDisplay":{"type":"string","description":"Formatted location label for display."},"facets":{"type":"array","description":"Annotations of description text (mentions, URLs, hashtags, etc)","items":{"type":"ref","ref":"app.bsky.richtext.facet"}},"creator":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"record":{"type":"unknown"},"items":{"type":"array","items":{"type":"union","refs":["social.grain.photo.defs#photoView"]}},"favCount":{"type":"integer"},"commentCount":{"type":"integer"},"labels":{"type":"array","items":{"type":"ref","ref":"com.atproto.label.defs#label"}},"createdAt":{"type":"string","format":"datetime"},"indexedAt":{"type":"string","format":"datetime"},"viewer":{"type":"ref","ref":"#viewerState"},"crossPost":{"type":"ref","ref":"#crossPostInfo"}}},"crossPostInfo":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"URL to the cross-posted Bluesky post."}}},"viewerState":{"type":"object","description":"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.","properties":{"fav":{"type":"string","format":"at-uri"}}}}} as const
58const itemLex = {"lexicon":1,"id":"social.grain.gallery.item","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["createdAt","gallery","item"],"properties":{"createdAt":{"type":"string","format":"datetime"},"gallery":{"type":"string","format":"at-uri"},"item":{"type":"string","format":"at-uri"},"position":{"type":"integer","default":0}}}}}} as const
59const blockLex = {"lexicon":1,"id":"social.grain.graph.block","defs":{"main":{"key":"tid","type":"record","record":{"type":"object","required":["subject","createdAt"],"properties":{"subject":{"type":"string","format":"did"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
60const grainGraphFollowLex = {"lexicon":1,"id":"social.grain.graph.follow","defs":{"main":{"key":"tid","type":"record","record":{"type":"object","required":["subject","createdAt"],"properties":{"subject":{"type":"string","format":"did"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
61const muteActorLex = {"lexicon":1,"id":"social.grain.graph.muteActor","defs":{"main":{"type":"procedure","description":"Mute an actor. Mutes are private and only affect the muter's feeds.","input":{"encoding":"application/json","schema":{"type":"object","required":["actor"],"properties":{"actor":{"type":"string","format":"did"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
62const unmuteActorLex = {"lexicon":1,"id":"social.grain.graph.unmuteActor","defs":{"main":{"type":"procedure","description":"Unmute an actor.","input":{"encoding":"application/json","schema":{"type":"object","required":["actor"],"properties":{"actor":{"type":"string","format":"did"}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
63const photoLex = {"lexicon":1,"id":"social.grain.photo","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["photo","aspectRatio","createdAt"],"properties":{"photo":{"type":"blob","accept":["image/*"],"maxSize":1000000},"alt":{"type":"string","description":"Alt text description of the image, for accessibility."},"aspectRatio":{"type":"ref","ref":"social.grain.defs#aspectRatio"},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
64const grainPhotoDefsLex = {"lexicon":1,"id":"social.grain.photo.defs","defs":{"photoView":{"type":"object","required":["uri","cid","thumb","fullsize","aspectRatio"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"},"thumb":{"type":"string","format":"uri","description":"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},"fullsize":{"type":"string","format":"uri","description":"Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."},"alt":{"type":"string","description":"Alt text description of the image, for accessibility."},"aspectRatio":{"type":"ref","ref":"social.grain.defs#aspectRatio"},"exif":{"type":"ref","ref":"social.grain.photo.defs#exifView","description":"EXIF metadata for the photo, if available."},"gallery":{"type":"ref","ref":"#galleryState"}}},"exifView":{"type":"object","required":["uri","cid","photo","record","createdAt"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"},"photo":{"type":"string","format":"at-uri"},"record":{"type":"unknown"},"createdAt":{"type":"string","format":"datetime"},"dateTimeOriginal":{"type":"string"},"exposureTime":{"type":"string"},"fNumber":{"type":"string"},"flash":{"type":"string"},"focalLengthIn35mmFormat":{"type":"string"},"iSO":{"type":"integer"},"lensMake":{"type":"string"},"lensModel":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"}}},"galleryState":{"type":"object","required":["item","itemCreatedAt","itemPosition"],"description":"Metadata about the photo's relationship with the subject content. Only has meaningful content when photo is attached to a gallery.","properties":{"item":{"type":"string","format":"at-uri"},"itemCreatedAt":{"type":"string","format":"datetime"},"itemPosition":{"type":"integer"}}}}} as const
65const exifLex = {"lexicon":1,"id":"social.grain.photo.exif","defs":{"main":{"type":"record","description":"Basic EXIF metadata for a photo. Integers are scaled by 1000000 to accommodate decimal values and potentially other tags in the future.","key":"tid","record":{"type":"object","required":["photo","createdAt"],"properties":{"photo":{"type":"string","format":"at-uri"},"createdAt":{"type":"string","format":"datetime"},"dateTimeOriginal":{"type":"string","format":"datetime"},"exposureTime":{"type":"integer"},"fNumber":{"type":"integer"},"flash":{"type":"string"},"focalLengthIn35mmFormat":{"type":"integer"},"iSO":{"type":"integer"},"lensMake":{"type":"string"},"lensModel":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"}}}}}} as const
66const storyLex = {"lexicon":1,"id":"social.grain.story","defs":{"main":{"type":"record","key":"tid","record":{"type":"object","required":["media","aspectRatio","createdAt"],"properties":{"media":{"type":"blob","accept":["image/*","video/*"],"maxSize":5000000},"aspectRatio":{"type":"ref","ref":"social.grain.defs#aspectRatio"},"location":{"type":"ref","ref":"community.lexicon.location.hthree"},"address":{"type":"ref","ref":"community.lexicon.location.address"},"labels":{"type":"union","description":"Self-label values for this story. Effectively content warnings.","refs":["com.atproto.label.defs#selfLabels"]},"createdAt":{"type":"string","format":"datetime"}}}}}} as const
67const grainStoryDefsLex = {"lexicon":1,"id":"social.grain.story.defs","defs":{"storyView":{"type":"object","required":["uri","cid","creator","thumb","fullsize","aspectRatio","createdAt"],"properties":{"uri":{"type":"string","format":"at-uri"},"cid":{"type":"string","format":"cid"},"creator":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"thumb":{"type":"string","format":"uri","description":"Thumbnail URL for the story image."},"fullsize":{"type":"string","format":"uri","description":"Full-size URL for the story image."},"aspectRatio":{"type":"ref","ref":"social.grain.defs#aspectRatio"},"location":{"type":"ref","ref":"community.lexicon.location.hthree"},"address":{"type":"ref","ref":"community.lexicon.location.address"},"locationDisplay":{"type":"string","description":"Formatted location label for display."},"createdAt":{"type":"string","format":"datetime"},"labels":{"type":"array","items":{"type":"ref","ref":"com.atproto.label.defs#label"}},"expired":{"type":"boolean","description":"Whether the story has passed its 24-hour window."},"commentCount":{"type":"integer"},"viewer":{"type":"ref","ref":"#viewerState"},"crossPost":{"type":"ref","ref":"social.grain.gallery.defs#crossPostInfo"}}},"viewerState":{"type":"object","description":"Metadata about the requesting account's relationship with the story.","properties":{"fav":{"type":"string","format":"at-uri"}}}}} as const
68const deleteAccountLex = {"lexicon":1,"id":"social.grain.unspecced.deleteAccount","defs":{"main":{"type":"procedure","description":"Delete the authenticated user's Grain account. Removes all of their Grain records from their PDS and clears supporting server-side state (mutes, preferences, push tokens, OAuth session). Reports and labels are preserved.","output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
69const deleteGalleryLex = {"lexicon":1,"id":"social.grain.unspecced.deleteGallery","defs":{"main":{"type":"procedure","description":"Delete a gallery and all associated records (items, photos, EXIF, favorites, comments).","input":{"encoding":"application/json","schema":{"type":"object","required":["rkey"],"properties":{"rkey":{"type":"string","description":"Record key of the gallery to delete."}}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{}}}}}} as const
70const getActorFavoritesLex = {"lexicon":1,"id":"social.grain.unspecced.getActorFavorites","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":"did"},"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"}}}}}}} as const
71const getActorProfileLex = {"lexicon":1,"id":"social.grain.unspecced.getActorProfile","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":"did"},"viewer":{"type":"string","format":"did"}}},"output":{"encoding":"application/json","schema":{"type":"ref","ref":"social.grain.actor.defs#profileViewDetailed"}}}}} as const
72const getBlocksLex = {"lexicon":1,"id":"social.grain.unspecced.getBlocks","defs":{"main":{"type":"query","description":"Get the viewer's blocked users.","parameters":{"type":"params","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getBlocks#blockItem"}},"cursor":{"type":"string"}}}}},"blockItem":{"type":"object","required":["did","blockUri"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"avatar":{"type":"string"},"blockUri":{"type":"string","format":"at-uri"}}}}} as const
73const getCamerasLex = {"lexicon":1,"id":"social.grain.unspecced.getCameras","defs":{"main":{"type":"query","description":"Get top cameras by photo count.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getCameras#cameraItem"}}}}}},"cameraItem":{"type":"object","required":["camera","photoCount"],"properties":{"camera":{"type":"string"},"photoCount":{"type":"integer"}}}}} as const
74const getCommentThreadLex = {"lexicon":1,"id":"social.grain.unspecced.getCommentThread","defs":{"main":{"type":"query","description":"Get comments for a subject (gallery or story), sorted oldest-first with author profiles.","parameters":{"type":"params","required":["subject"],"properties":{"subject":{"type":"string","format":"at-uri","description":"The subject URI to fetch comments for."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["comments"],"properties":{"comments":{"type":"array","items":{"type":"ref","ref":"social.grain.comment.defs#commentView"}},"cursor":{"type":"string"},"totalCount":{"type":"integer"}}}}}}} as const
75const getFollowersLex = {"lexicon":1,"id":"social.grain.unspecced.getFollowers","defs":{"main":{"type":"query","description":"Get followers for a given user.","parameters":{"type":"params","required":["actor"],"properties":{"actor":{"type":"string","format":"did"},"viewer":{"type":"string","format":"did"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"totalCount":{"type":"integer"},"items":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getFollowers#followerItem"}},"cursor":{"type":"string"}}}}},"followerItem":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatar":{"type":"string"},"viewer":{"type":"ref","ref":"social.grain.unspecced.getFollowers#viewerState"}}},"viewerState":{"type":"object","properties":{"following":{"type":"string","format":"at-uri"}}}}} as const
76const getFollowingLex = {"lexicon":1,"id":"social.grain.unspecced.getFollowing","defs":{"main":{"type":"query","description":"Get users that a given user follows.","parameters":{"type":"params","required":["actor"],"properties":{"actor":{"type":"string","format":"did"},"viewer":{"type":"string","format":"did"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"totalCount":{"type":"integer"},"items":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getFollowing#followingItem"}},"cursor":{"type":"string"}}}}},"followingItem":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatar":{"type":"string"},"viewer":{"type":"ref","ref":"social.grain.unspecced.getFollowing#viewerState"}}},"viewerState":{"type":"object","properties":{"following":{"type":"string","format":"at-uri"}}}}} as const
77const getGalleryLex = {"lexicon":1,"id":"social.grain.unspecced.getGallery","defs":{"main":{"type":"query","description":"Get a single gallery view by AT URI.","parameters":{"type":"params","required":["gallery"],"properties":{"gallery":{"type":"string","format":"at-uri","description":"The gallery AT URI."}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["gallery"],"properties":{"gallery":{"type":"ref","ref":"social.grain.gallery.defs#galleryView"}}}}}}} as const
78const getKnownFollowersLex = {"lexicon":1,"id":"social.grain.unspecced.getKnownFollowers","defs":{"main":{"type":"query","description":"Get followers of a given actor that the viewer also follows.","parameters":{"type":"params","required":["actor","viewer"],"properties":{"actor":{"type":"string","format":"did"},"viewer":{"type":"string","format":"did"},"limit":{"type":"integer","minimum":1,"maximum":50,"default":50}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getKnownFollowers#followerItem"}}}}}},"followerItem":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatar":{"type":"string"}}}}} as const
79const getLocationsLex = {"lexicon":1,"id":"social.grain.unspecced.getLocations","defs":{"main":{"type":"query","description":"Get top locations by gallery count.","output":{"encoding":"application/json","schema":{"type":"object","properties":{"locations":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getLocations#locationItem"}}}}}},"locationItem":{"type":"object","required":["name","h3Index","galleryCount"],"properties":{"name":{"type":"string"},"h3Index":{"type":"string","description":"Canonical H3 cell for the place (densest cell in the group)."},"galleryCount":{"type":"integer"},"h3Cells":{"type":"array","description":"All H3 cells whose galleries map to this place. Ordered by gallery count desc.","items":{"type":"string"}}}}}} as const
80const getMutesLex = {"lexicon":1,"id":"social.grain.unspecced.getMutes","defs":{"main":{"type":"query","description":"Get the viewer's muted users.","parameters":{"type":"params","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getMutes#muteItem"}},"cursor":{"type":"string"}}}}},"muteItem":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"avatar":{"type":"string"}}}}} as const
81const getNotificationsLex = {"lexicon":1,"id":"social.grain.unspecced.getNotifications","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"},"countOnly":{"type":"boolean","description":"If true, only return unseenCount without hydrating notifications."}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["notifications"],"properties":{"notifications":{"type":"array","items":{"type":"ref","ref":"#notificationItem"}},"cursor":{"type":"string"},"unseenCount":{"type":"integer"}}}}},"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
82const getStoriesLex = {"lexicon":1,"id":"social.grain.unspecced.getStories","defs":{"main":{"type":"query","description":"Get a user's active stories (posted within the last 24 hours).","parameters":{"type":"params","required":["actor"],"properties":{"actor":{"type":"string","format":"did"}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["stories"],"properties":{"stories":{"type":"array","items":{"type":"ref","ref":"social.grain.story.defs#storyView"}}}}}}}} as const
83const getStoryLex = {"lexicon":1,"id":"social.grain.unspecced.getStory","defs":{"main":{"type":"query","parameters":{"type":"params","required":["story"],"properties":{"story":{"type":"string","format":"at-uri"}}},"output":{"encoding":"application/json","schema":{"type":"object","properties":{"story":{"type":"ref","ref":"social.grain.story.defs#storyView"}}}}}}} as const
84const getStoryArchiveLex = {"lexicon":1,"id":"social.grain.unspecced.getStoryArchive","defs":{"main":{"type":"query","description":"Get all stories for an actor, including expired ones. For archive browsing.","parameters":{"type":"params","required":["actor"],"properties":{"actor":{"type":"string","format":"did"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string"}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["stories"],"properties":{"stories":{"type":"array","items":{"type":"ref","ref":"social.grain.story.defs#storyView"}},"cursor":{"type":"string"}}}}}}} as const
85const getStoryAuthorsLex = {"lexicon":1,"id":"social.grain.unspecced.getStoryAuthors","defs":{"main":{"type":"query","description":"Get authors who have active stories (posted within the last 24 hours).","output":{"encoding":"application/json","schema":{"type":"object","required":["authors"],"properties":{"authors":{"type":"array","items":{"type":"ref","ref":"social.grain.unspecced.getStoryAuthors#storyAuthor"}}}}}},"storyAuthor":{"type":"object","required":["profile","storyCount","latestAt"],"properties":{"profile":{"type":"ref","ref":"social.grain.actor.defs#profileView"},"storyCount":{"type":"integer"},"latestAt":{"type":"string","format":"datetime"}}}}} as const
86const getSuggestedFollowsLex = {"lexicon":1,"id":"social.grain.unspecced.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.unspecced.getSuggestedFollows#suggestedItem"}}}}}},"suggestedItem":{"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"}}}}} as const
87const searchActorsTypeaheadLex = {"lexicon":1,"id":"social.grain.unspecced.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":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"avatar":{"type":"string"}}}}}}}}}} as const
88const searchGalleriesLex = {"lexicon":1,"id":"social.grain.unspecced.searchGalleries","defs":{"main":{"type":"query","description":"Full-text search for galleries, returning full gallery views.","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.gallery.defs#galleryView"}},"cursor":{"type":"string"}}}}}}} as const
89const searchProfilesLex = {"lexicon":1,"id":"social.grain.unspecced.searchProfiles","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.unspecced.searchProfiles#profileSearchResult"}},"cursor":{"type":"string"}}}}},"profileSearchResult":{"type":"object","required":["did"],"properties":{"did":{"type":"string","format":"did"},"handle":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatar":{"type":"string"}}}}} as const
90
91// ─── Type Registry ──────────────────────────────────────────────────
92
93type Registry = {
94 'app.bsky.actor.defs': typeof bskyActorDefsLex
95 'app.bsky.actor.profile': typeof bskyActorProfileLex
96 'app.bsky.embed.defs': typeof bskyEmbedDefsLex
97 'app.bsky.embed.external': typeof externalLex
98 'app.bsky.embed.images': typeof imagesLex
99 'app.bsky.embed.record': typeof recordLex
100 'app.bsky.embed.recordWithMedia': typeof recordWithMediaLex
101 'app.bsky.embed.video': typeof videoLex
102 'app.bsky.feed.defs': typeof bskyFeedDefsLex
103 'app.bsky.feed.post': typeof postLex
104 'app.bsky.feed.postgate': typeof postgateLex
105 'app.bsky.feed.threadgate': typeof threadgateLex
106 'app.bsky.graph.defs': typeof bskyGraphDefsLex
107 'app.bsky.graph.follow': typeof bskyGraphFollowLex
108 'app.bsky.labeler.defs': typeof bskyLabelerDefsLex
109 'app.bsky.notification.defs': typeof bskyNotificationDefsLex
110 'app.bsky.richtext.facet': typeof facetLex
111 'com.atproto.label.defs': typeof atprotoLabelDefsLex
112 'com.atproto.moderation.defs': typeof atprotoModerationDefsLex
113 'com.atproto.repo.strongRef': typeof strongRefLex
114 'com.germnetwork.declaration': typeof declarationLex
115 'community.lexicon.location.address': typeof addressLex
116 'community.lexicon.location.geo': typeof geoLex
117 'community.lexicon.location.hthree': typeof hthreeLex
118 'dev.hatk.applyWrites': typeof applyWritesLex
119 'dev.hatk.createRecord': typeof createRecordLex
120 'dev.hatk.createReport': typeof createReportLex
121 'dev.hatk.deleteRecord': typeof deleteRecordLex
122 'dev.hatk.describeCollections': typeof describeCollectionsLex
123 'dev.hatk.describeFeeds': typeof describeFeedsLex
124 'dev.hatk.describeLabels': typeof describeLabelsLex
125 'dev.hatk.getFeed': typeof getFeedLex
126 'dev.hatk.getPreferences': typeof getPreferencesLex
127 'dev.hatk.getRecord': typeof getRecordLex
128 'dev.hatk.getRecords': typeof getRecordsLex
129 'dev.hatk.putPreference': typeof putPreferenceLex
130 'dev.hatk.putRecord': typeof putRecordLex
131 'dev.hatk.searchRecords': typeof searchRecordsLex
132 'dev.hatk.uploadBlob': typeof uploadBlobLex
133 'parts.page.mention.search': typeof searchLex
134 'social.grain.actor.defs': typeof grainActorDefsLex
135 'social.grain.actor.profile': typeof grainActorProfileLex
136 'social.grain.comment': typeof commentLex
137 'social.grain.comment.defs': typeof grainCommentDefsLex
138 'social.grain.defs': typeof grainDefsLex
139 'social.grain.favorite': typeof favoriteLex
140 'social.grain.gallery': typeof galleryLex
141 'social.grain.gallery.defs': typeof grainGalleryDefsLex
142 'social.grain.gallery.item': typeof itemLex
143 'social.grain.graph.block': typeof blockLex
144 'social.grain.graph.follow': typeof grainGraphFollowLex
145 'social.grain.graph.muteActor': typeof muteActorLex
146 'social.grain.graph.unmuteActor': typeof unmuteActorLex
147 'social.grain.photo': typeof photoLex
148 'social.grain.photo.defs': typeof grainPhotoDefsLex
149 'social.grain.photo.exif': typeof exifLex
150 'social.grain.story': typeof storyLex
151 'social.grain.story.defs': typeof grainStoryDefsLex
152 'social.grain.unspecced.deleteAccount': typeof deleteAccountLex
153 'social.grain.unspecced.deleteGallery': typeof deleteGalleryLex
154 'social.grain.unspecced.getActorFavorites': typeof getActorFavoritesLex
155 'social.grain.unspecced.getActorProfile': typeof getActorProfileLex
156 'social.grain.unspecced.getBlocks': typeof getBlocksLex
157 'social.grain.unspecced.getCameras': typeof getCamerasLex
158 'social.grain.unspecced.getCommentThread': typeof getCommentThreadLex
159 'social.grain.unspecced.getFollowers': typeof getFollowersLex
160 'social.grain.unspecced.getFollowing': typeof getFollowingLex
161 'social.grain.unspecced.getGallery': typeof getGalleryLex
162 'social.grain.unspecced.getKnownFollowers': typeof getKnownFollowersLex
163 'social.grain.unspecced.getLocations': typeof getLocationsLex
164 'social.grain.unspecced.getMutes': typeof getMutesLex
165 'social.grain.unspecced.getNotifications': typeof getNotificationsLex
166 'social.grain.unspecced.getStories': typeof getStoriesLex
167 'social.grain.unspecced.getStory': typeof getStoryLex
168 'social.grain.unspecced.getStoryArchive': typeof getStoryArchiveLex
169 'social.grain.unspecced.getStoryAuthors': typeof getStoryAuthorsLex
170 'social.grain.unspecced.getSuggestedFollows': typeof getSuggestedFollowsLex
171 'social.grain.unspecced.searchActorsTypeahead': typeof searchActorsTypeaheadLex
172 'social.grain.unspecced.searchGalleries': typeof searchGalleriesLex
173 'social.grain.unspecced.searchProfiles': typeof searchProfilesLex
174}
175
176// ─── Record & Method Types ──────────────────────────────────────────
177
178export type BskyActorProfile = Prettify<LexRecord<typeof bskyActorProfileLex, Registry>>
179export type Post = Prettify<LexRecord<typeof postLex, Registry>>
180export type Postgate = Prettify<LexRecord<typeof postgateLex, Registry>>
181export type Threadgate = Prettify<LexRecord<typeof threadgateLex, Registry>>
182export type BskyGraphFollow = Prettify<LexRecord<typeof bskyGraphFollowLex, Registry>>
183export type Declaration = Prettify<LexRecord<typeof declarationLex, Registry>>
184export type ApplyWrites = Prettify<LexProcedure<typeof applyWritesLex, Registry>>
185export type CreateReport = Prettify<LexProcedure<typeof createReportLex, Registry>>
186export type DescribeCollections = Prettify<LexQuery<typeof describeCollectionsLex, Registry>>
187export type DescribeFeeds = Prettify<LexQuery<typeof describeFeedsLex, Registry>>
188export type DescribeLabels = Prettify<LexQuery<typeof describeLabelsLex, Registry>>
189export type GetFeed = Prettify<LexQuery<typeof getFeedLex, Registry>>
190export type GetPreferences = Prettify<LexQuery<typeof getPreferencesLex, Registry>>
191export type GetRecord = Prettify<LexQuery<typeof getRecordLex, Registry>>
192export type GetRecords = Prettify<LexQuery<typeof getRecordsLex, Registry>>
193export type PutPreference = Prettify<LexProcedure<typeof putPreferenceLex, Registry>>
194export type SearchRecords = Prettify<LexQuery<typeof searchRecordsLex, Registry>>
195export type UploadBlob = Prettify<LexProcedure<typeof uploadBlobLex, Registry>>
196export type Search = Prettify<LexQuery<typeof searchLex, Registry>>
197export type GrainActorProfile = Prettify<LexRecord<typeof grainActorProfileLex, Registry>>
198export type Comment = Prettify<LexRecord<typeof commentLex, Registry>>
199export type Favorite = Prettify<LexRecord<typeof favoriteLex, Registry>>
200export type Gallery = Prettify<LexRecord<typeof galleryLex, Registry>>
201export type Item = Prettify<LexRecord<typeof itemLex, Registry>>
202export type Block = Prettify<LexRecord<typeof blockLex, Registry>>
203export type GrainGraphFollow = Prettify<LexRecord<typeof grainGraphFollowLex, Registry>>
204export type MuteActor = Prettify<LexProcedure<typeof muteActorLex, Registry>>
205export type UnmuteActor = Prettify<LexProcedure<typeof unmuteActorLex, Registry>>
206export type Photo = Prettify<LexRecord<typeof photoLex, Registry>>
207export type Exif = Prettify<LexRecord<typeof exifLex, Registry>>
208export type Story = Prettify<LexRecord<typeof storyLex, Registry>>
209export type DeleteAccount = Prettify<LexProcedure<typeof deleteAccountLex, Registry>>
210export type DeleteGallery = Prettify<LexProcedure<typeof deleteGalleryLex, Registry>>
211export type GetActorFavorites = Prettify<LexQuery<typeof getActorFavoritesLex, Registry>>
212export type GetActorProfile = Prettify<LexQuery<typeof getActorProfileLex, Registry>>
213export type GetBlocks = Prettify<LexQuery<typeof getBlocksLex, Registry>>
214export type GetCameras = Prettify<LexQuery<typeof getCamerasLex, Registry>>
215export type GetCommentThread = Prettify<LexQuery<typeof getCommentThreadLex, Registry>>
216export type GetFollowers = Prettify<LexQuery<typeof getFollowersLex, Registry>>
217export type GetFollowing = Prettify<LexQuery<typeof getFollowingLex, Registry>>
218export type GetGallery = Prettify<LexQuery<typeof getGalleryLex, Registry>>
219export type GetKnownFollowers = Prettify<LexQuery<typeof getKnownFollowersLex, Registry>>
220export type GetLocations = Prettify<LexQuery<typeof getLocationsLex, Registry>>
221export type GetMutes = Prettify<LexQuery<typeof getMutesLex, Registry>>
222export type GetNotifications = Prettify<LexQuery<typeof getNotificationsLex, Registry>>
223export type GetStories = Prettify<LexQuery<typeof getStoriesLex, Registry>>
224export type GetStory = Prettify<LexQuery<typeof getStoryLex, Registry>>
225export type GetStoryArchive = Prettify<LexQuery<typeof getStoryArchiveLex, Registry>>
226export type GetStoryAuthors = Prettify<LexQuery<typeof getStoryAuthorsLex, Registry>>
227export type GetSuggestedFollows = Prettify<LexQuery<typeof getSuggestedFollowsLex, Registry>>
228export type SearchActorsTypeahead = Prettify<LexQuery<typeof searchActorsTypeaheadLex, Registry>>
229export type SearchGalleries = Prettify<LexQuery<typeof searchGalleriesLex, Registry>>
230export type SearchProfiles = Prettify<LexQuery<typeof searchProfilesLex, Registry>>
231
232export type RecordRegistry = {
233 'app.bsky.actor.profile': BskyActorProfile
234 'app.bsky.feed.post': Post
235 'app.bsky.feed.postgate': Postgate
236 'app.bsky.feed.threadgate': Threadgate
237 'app.bsky.graph.follow': BskyGraphFollow
238 'com.germnetwork.declaration': Declaration
239 'social.grain.actor.profile': GrainActorProfile
240 'social.grain.comment': Comment
241 'social.grain.favorite': Favorite
242 'social.grain.gallery': Gallery
243 'social.grain.gallery.item': Item
244 'social.grain.graph.block': Block
245 'social.grain.graph.follow': GrainGraphFollow
246 'social.grain.photo': Photo
247 'social.grain.photo.exif': Exif
248 'social.grain.story': Story
249}
250
251export type CreateRecord = {
252 params: {}
253 input: { [K in keyof RecordRegistry]: { collection: K; record: RecordRegistry[K]; repo?: string } }[keyof RecordRegistry]
254 output: { uri?: string; cid?: string }
255}
256
257export type DeleteRecord = {
258 params: {}
259 input: { [K in keyof RecordRegistry]: { collection: K; rkey: string } }[keyof RecordRegistry]
260 output: {}
261}
262
263export type PutRecord = {
264 params: {}
265 input: { [K in keyof RecordRegistry]: { collection: K; rkey: string; record: RecordRegistry[K]; repo?: string } }[keyof RecordRegistry]
266 output: { uri?: string; cid?: string }
267}
268
269// ─── Named Defs (Views, Objects) ────────────────────────────────────
270
271export type Nux = Prettify<LexDef<typeof bskyActorDefsLex, 'nux', Registry>>
272export type MutedWord = Prettify<LexDef<typeof bskyActorDefsLex, 'mutedWord', Registry>>
273export type SavedFeed = Prettify<LexDef<typeof bskyActorDefsLex, 'savedFeed', Registry>>
274export type StatusView = Prettify<LexDef<typeof bskyActorDefsLex, 'statusView', Registry>>
275export type BskyActorDefsProfileView = Prettify<LexDef<typeof bskyActorDefsLex, 'profileView', Registry>>
276export type BskyActorDefsViewerState = Prettify<LexDef<typeof bskyActorDefsLex, 'viewerState', Registry>>
277export type FeedViewPref = Prettify<LexDef<typeof bskyActorDefsLex, 'feedViewPref', Registry>>
278export type LabelersPref = Prettify<LexDef<typeof bskyActorDefsLex, 'labelersPref', Registry>>
279export type InterestsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'interestsPref', Registry>>
280export type KnownFollowers = Prettify<LexDef<typeof bskyActorDefsLex, 'knownFollowers', Registry>>
281export type MutedWordsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'mutedWordsPref', Registry>>
282export type SavedFeedsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'savedFeedsPref', Registry>>
283export type ThreadViewPref = Prettify<LexDef<typeof bskyActorDefsLex, 'threadViewPref', Registry>>
284export type DeclaredAgePref = Prettify<LexDef<typeof bskyActorDefsLex, 'declaredAgePref', Registry>>
285export type HiddenPostsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'hiddenPostsPref', Registry>>
286export type LabelerPrefItem = Prettify<LexDef<typeof bskyActorDefsLex, 'labelerPrefItem', Registry>>
287export type AdultContentPref = Prettify<LexDef<typeof bskyActorDefsLex, 'adultContentPref', Registry>>
288export type BskyAppStatePref = Prettify<LexDef<typeof bskyActorDefsLex, 'bskyAppStatePref', Registry>>
289export type ContentLabelPref = Prettify<LexDef<typeof bskyActorDefsLex, 'contentLabelPref', Registry>>
290export type ProfileViewBasic = Prettify<LexDef<typeof bskyActorDefsLex, 'profileViewBasic', Registry>>
291export type SavedFeedsPrefV2 = Prettify<LexDef<typeof bskyActorDefsLex, 'savedFeedsPrefV2', Registry>>
292export type VerificationView = Prettify<LexDef<typeof bskyActorDefsLex, 'verificationView', Registry>>
293export type ProfileAssociated = Prettify<LexDef<typeof bskyActorDefsLex, 'profileAssociated', Registry>>
294export type VerificationPrefs = Prettify<LexDef<typeof bskyActorDefsLex, 'verificationPrefs', Registry>>
295export type VerificationState = Prettify<LexDef<typeof bskyActorDefsLex, 'verificationState', Registry>>
296export type PersonalDetailsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'personalDetailsPref', Registry>>
297export type BskyActorDefsProfileViewDetailed = Prettify<LexDef<typeof bskyActorDefsLex, 'profileViewDetailed', Registry>>
298export type BskyAppProgressGuide = Prettify<LexDef<typeof bskyActorDefsLex, 'bskyAppProgressGuide', Registry>>
299export type LiveEventPreferences = Prettify<LexDef<typeof bskyActorDefsLex, 'liveEventPreferences', Registry>>
300export type ProfileAssociatedChat = Prettify<LexDef<typeof bskyActorDefsLex, 'profileAssociatedChat', Registry>>
301export type ProfileAssociatedGerm = Prettify<LexDef<typeof bskyActorDefsLex, 'profileAssociatedGerm', Registry>>
302export type PostInteractionSettingsPref = Prettify<LexDef<typeof bskyActorDefsLex, 'postInteractionSettingsPref', Registry>>
303export type ProfileAssociatedActivitySubscription = Prettify<LexDef<typeof bskyActorDefsLex, 'profileAssociatedActivitySubscription', Registry>>
304export type BskyEmbedDefsAspectRatio = Prettify<LexDef<typeof bskyEmbedDefsLex, 'aspectRatio', Registry>>
305export type ExternalView = Prettify<LexDef<typeof externalLex, 'view', Registry>>
306export type External = Prettify<LexDef<typeof externalLex, 'external', Registry>>
307export type ViewExternal = Prettify<LexDef<typeof externalLex, 'viewExternal', Registry>>
308export type ImagesView = Prettify<LexDef<typeof imagesLex, 'view', Registry>>
309export type Image = Prettify<LexDef<typeof imagesLex, 'image', Registry>>
310export type ViewImage = Prettify<LexDef<typeof imagesLex, 'viewImage', Registry>>
311export type RecordView = Prettify<LexDef<typeof recordLex, 'view', Registry>>
312export type ViewRecord = Prettify<LexDef<typeof recordLex, 'viewRecord', Registry>>
313export type ViewBlocked = Prettify<LexDef<typeof recordLex, 'viewBlocked', Registry>>
314export type ViewDetached = Prettify<LexDef<typeof recordLex, 'viewDetached', Registry>>
315export type ViewNotFound = Prettify<LexDef<typeof recordLex, 'viewNotFound', Registry>>
316export type RecordWithMediaView = Prettify<LexDef<typeof recordWithMediaLex, 'view', Registry>>
317export type VideoView = Prettify<LexDef<typeof videoLex, 'view', Registry>>
318export type Caption = Prettify<LexDef<typeof videoLex, 'caption', Registry>>
319export type PostView = Prettify<LexDef<typeof bskyFeedDefsLex, 'postView', Registry>>
320export type BskyFeedDefsReplyRef = Prettify<LexDef<typeof bskyFeedDefsLex, 'replyRef', Registry>>
321export type ReasonPin = Prettify<LexDef<typeof bskyFeedDefsLex, 'reasonPin', Registry>>
322export type BlockedPost = Prettify<LexDef<typeof bskyFeedDefsLex, 'blockedPost', Registry>>
323export type Interaction = Prettify<LexDef<typeof bskyFeedDefsLex, 'interaction', Registry>>
324export type BskyFeedDefsViewerState = Prettify<LexDef<typeof bskyFeedDefsLex, 'viewerState', Registry>>
325export type FeedViewPost = Prettify<LexDef<typeof bskyFeedDefsLex, 'feedViewPost', Registry>>
326export type NotFoundPost = Prettify<LexDef<typeof bskyFeedDefsLex, 'notFoundPost', Registry>>
327export type ReasonRepost = Prettify<LexDef<typeof bskyFeedDefsLex, 'reasonRepost', Registry>>
328export type BlockedAuthor = Prettify<LexDef<typeof bskyFeedDefsLex, 'blockedAuthor', Registry>>
329export type GeneratorView = Prettify<LexDef<typeof bskyFeedDefsLex, 'generatorView', Registry>>
330export type ThreadContext = Prettify<LexDef<typeof bskyFeedDefsLex, 'threadContext', Registry>>
331export type ThreadViewPost = Prettify<LexDef<typeof bskyFeedDefsLex, 'threadViewPost', Registry>>
332export type ThreadgateView = Prettify<LexDef<typeof bskyFeedDefsLex, 'threadgateView', Registry>>
333export type SkeletonFeedPost = Prettify<LexDef<typeof bskyFeedDefsLex, 'skeletonFeedPost', Registry>>
334export type SkeletonReasonPin = Prettify<LexDef<typeof bskyFeedDefsLex, 'skeletonReasonPin', Registry>>
335export type GeneratorViewerState = Prettify<LexDef<typeof bskyFeedDefsLex, 'generatorViewerState', Registry>>
336export type SkeletonReasonRepost = Prettify<LexDef<typeof bskyFeedDefsLex, 'skeletonReasonRepost', Registry>>
337export type Entity = Prettify<LexDef<typeof postLex, 'entity', Registry>>
338export type PostReplyRef = Prettify<LexDef<typeof postLex, 'replyRef', Registry>>
339export type TextSlice = Prettify<LexDef<typeof postLex, 'textSlice', Registry>>
340export type DisableRule = Prettify<LexDef<typeof postgateLex, 'disableRule', Registry>>
341export type ListRule = Prettify<LexDef<typeof threadgateLex, 'listRule', Registry>>
342export type MentionRule = Prettify<LexDef<typeof threadgateLex, 'mentionRule', Registry>>
343export type FollowerRule = Prettify<LexDef<typeof threadgateLex, 'followerRule', Registry>>
344export type FollowingRule = Prettify<LexDef<typeof threadgateLex, 'followingRule', Registry>>
345export type ListView = Prettify<LexDef<typeof bskyGraphDefsLex, 'listView', Registry>>
346export type ListItemView = Prettify<LexDef<typeof bskyGraphDefsLex, 'listItemView', Registry>>
347export type Relationship = Prettify<LexDef<typeof bskyGraphDefsLex, 'relationship', Registry>>
348export type ListViewBasic = Prettify<LexDef<typeof bskyGraphDefsLex, 'listViewBasic', Registry>>
349export type NotFoundActor = Prettify<LexDef<typeof bskyGraphDefsLex, 'notFoundActor', Registry>>
350export type ListViewerState = Prettify<LexDef<typeof bskyGraphDefsLex, 'listViewerState', Registry>>
351export type StarterPackView = Prettify<LexDef<typeof bskyGraphDefsLex, 'starterPackView', Registry>>
352export type StarterPackViewBasic = Prettify<LexDef<typeof bskyGraphDefsLex, 'starterPackViewBasic', Registry>>
353export type LabelerView = Prettify<LexDef<typeof bskyLabelerDefsLex, 'labelerView', Registry>>
354export type LabelerPolicies = Prettify<LexDef<typeof bskyLabelerDefsLex, 'labelerPolicies', Registry>>
355export type LabelerViewerState = Prettify<LexDef<typeof bskyLabelerDefsLex, 'labelerViewerState', Registry>>
356export type LabelerViewDetailed = Prettify<LexDef<typeof bskyLabelerDefsLex, 'labelerViewDetailed', Registry>>
357export type Preference = Prettify<LexDef<typeof bskyNotificationDefsLex, 'preference', Registry>>
358export type Preferences = Prettify<LexDef<typeof bskyNotificationDefsLex, 'preferences', Registry>>
359export type RecordDeleted = Prettify<LexDef<typeof bskyNotificationDefsLex, 'recordDeleted', Registry>>
360export type ChatPreference = Prettify<LexDef<typeof bskyNotificationDefsLex, 'chatPreference', Registry>>
361export type ActivitySubscription = Prettify<LexDef<typeof bskyNotificationDefsLex, 'activitySubscription', Registry>>
362export type FilterablePreference = Prettify<LexDef<typeof bskyNotificationDefsLex, 'filterablePreference', Registry>>
363export type SubjectActivitySubscription = Prettify<LexDef<typeof bskyNotificationDefsLex, 'subjectActivitySubscription', Registry>>
364export type Tag = Prettify<LexDef<typeof facetLex, 'tag', Registry>>
365export type Link = Prettify<LexDef<typeof facetLex, 'link', Registry>>
366export type Mention = Prettify<LexDef<typeof facetLex, 'mention', Registry>>
367export type ByteSlice = Prettify<LexDef<typeof facetLex, 'byteSlice', Registry>>
368export type Label = Prettify<LexDef<typeof atprotoLabelDefsLex, 'label', Registry>>
369export type SelfLabels = Prettify<LexDef<typeof atprotoLabelDefsLex, 'selfLabels', Registry>>
370export type SelfLabel = Prettify<LexDef<typeof atprotoLabelDefsLex, 'selfLabel', Registry>>
371export type LabelValueDefinition = Prettify<LexDef<typeof atprotoLabelDefsLex, 'labelValueDefinition', Registry>>
372export type LabelValueDefinitionStrings = Prettify<LexDef<typeof atprotoLabelDefsLex, 'labelValueDefinitionStrings', Registry>>
373export type DeclarationMessageMe = Prettify<LexDef<typeof declarationLex, 'messageMe', Registry>>
374export type Create = Prettify<LexDef<typeof applyWritesLex, 'create', Registry>>
375export type Update = Prettify<LexDef<typeof applyWritesLex, 'update', Registry>>
376export type Delete = Prettify<LexDef<typeof applyWritesLex, 'delete', Registry>>
377export type CreateResult = Prettify<LexDef<typeof applyWritesLex, 'createResult', Registry>>
378export type UpdateResult = Prettify<LexDef<typeof applyWritesLex, 'updateResult', Registry>>
379export type DeleteResult = Prettify<LexDef<typeof applyWritesLex, 'deleteResult', Registry>>
380export type RepoRef = Prettify<LexDef<typeof createReportLex, 'repoRef', Registry>>
381export type LabelDefinition = Prettify<LexDef<typeof describeLabelsLex, 'labelDefinition', Registry>>
382export type LabelLocale = Prettify<LexDef<typeof describeLabelsLex, 'labelLocale', Registry>>
383export type Result = Prettify<LexDef<typeof searchLex, 'result', Registry>>
384export type MentionLabel = Prettify<LexDef<typeof searchLex, 'mentionLabel', Registry>>
385export type EmbedInfo = Prettify<LexDef<typeof searchLex, 'embedInfo', Registry>>
386export type SearchAspectRatio = Prettify<LexDef<typeof searchLex, 'aspectRatio', Registry>>
387export type SubscopeInfo = Prettify<LexDef<typeof searchLex, 'subscopeInfo', Registry>>
388export type GrainActorDefsProfileView = Prettify<LexDef<typeof grainActorDefsLex, 'profileView', Registry>>
389export type GrainActorDefsProfileViewDetailed = Prettify<LexDef<typeof grainActorDefsLex, 'profileViewDetailed', Registry>>
390export type GrainActorDefsMessageMe = Prettify<LexDef<typeof grainActorDefsLex, 'messageMe', Registry>>
391export type GrainActorDefsViewerState = Prettify<LexDef<typeof grainActorDefsLex, 'viewerState', Registry>>
392export type CommentView = Prettify<LexDef<typeof grainCommentDefsLex, 'commentView', Registry>>
393export type GrainCommentDefsViewerState = Prettify<LexDef<typeof grainCommentDefsLex, 'viewerState', Registry>>
394export type GrainDefsAspectRatio = Prettify<LexDef<typeof grainDefsLex, 'aspectRatio', Registry>>
395export type GalleryView = Prettify<LexDef<typeof grainGalleryDefsLex, 'galleryView', Registry>>
396export type CrossPostInfo = Prettify<LexDef<typeof grainGalleryDefsLex, 'crossPostInfo', Registry>>
397export type GrainGalleryDefsViewerState = Prettify<LexDef<typeof grainGalleryDefsLex, 'viewerState', Registry>>
398export type PhotoView = Prettify<LexDef<typeof grainPhotoDefsLex, 'photoView', Registry>>
399export type ExifView = Prettify<LexDef<typeof grainPhotoDefsLex, 'exifView', Registry>>
400export type GalleryState = Prettify<LexDef<typeof grainPhotoDefsLex, 'galleryState', Registry>>
401export type StoryView = Prettify<LexDef<typeof grainStoryDefsLex, 'storyView', Registry>>
402export type GrainStoryDefsViewerState = Prettify<LexDef<typeof grainStoryDefsLex, 'viewerState', Registry>>
403export type BlockItem = Prettify<LexDef<typeof getBlocksLex, 'blockItem', Registry>>
404export type CameraItem = Prettify<LexDef<typeof getCamerasLex, 'cameraItem', Registry>>
405export type GetFollowersFollowerItem = Prettify<LexDef<typeof getFollowersLex, 'followerItem', Registry>>
406export type GetFollowersViewerState = Prettify<LexDef<typeof getFollowersLex, 'viewerState', Registry>>
407export type FollowingItem = Prettify<LexDef<typeof getFollowingLex, 'followingItem', Registry>>
408export type GetFollowingViewerState = Prettify<LexDef<typeof getFollowingLex, 'viewerState', Registry>>
409export type GetKnownFollowersFollowerItem = Prettify<LexDef<typeof getKnownFollowersLex, 'followerItem', Registry>>
410export type LocationItem = Prettify<LexDef<typeof getLocationsLex, 'locationItem', Registry>>
411export type MuteItem = Prettify<LexDef<typeof getMutesLex, 'muteItem', Registry>>
412export type NotificationItem = Prettify<LexDef<typeof getNotificationsLex, 'notificationItem', Registry>>
413export type StoryAuthor = Prettify<LexDef<typeof getStoryAuthorsLex, 'storyAuthor', Registry>>
414export type SuggestedItem = Prettify<LexDef<typeof getSuggestedFollowsLex, 'suggestedItem', Registry>>
415export type ProfileSearchResult = Prettify<LexDef<typeof searchProfilesLex, 'profileSearchResult', Registry>>
416
417// ─── XRPC Schema ────────────────────────────────────────────────────
418
419export type XrpcSchema = {
420 'dev.hatk.applyWrites': ApplyWrites
421 'dev.hatk.createRecord': CreateRecord
422 'dev.hatk.createReport': CreateReport
423 'dev.hatk.deleteRecord': DeleteRecord
424 'dev.hatk.describeCollections': DescribeCollections
425 'dev.hatk.describeFeeds': DescribeFeeds
426 'dev.hatk.describeLabels': DescribeLabels
427 'dev.hatk.getFeed': GetFeed
428 'dev.hatk.getPreferences': GetPreferences
429 'dev.hatk.getRecord': GetRecord
430 'dev.hatk.getRecords': GetRecords
431 'dev.hatk.putPreference': PutPreference
432 'dev.hatk.putRecord': PutRecord
433 'dev.hatk.searchRecords': SearchRecords
434 'dev.hatk.uploadBlob': UploadBlob
435 'parts.page.mention.search': Search
436 'social.grain.graph.muteActor': MuteActor
437 'social.grain.graph.unmuteActor': UnmuteActor
438 'social.grain.unspecced.deleteAccount': DeleteAccount
439 'social.grain.unspecced.deleteGallery': DeleteGallery
440 'social.grain.unspecced.getActorFavorites': GetActorFavorites
441 'social.grain.unspecced.getActorProfile': GetActorProfile
442 'social.grain.unspecced.getBlocks': GetBlocks
443 'social.grain.unspecced.getCameras': GetCameras
444 'social.grain.unspecced.getCommentThread': GetCommentThread
445 'social.grain.unspecced.getFollowers': GetFollowers
446 'social.grain.unspecced.getFollowing': GetFollowing
447 'social.grain.unspecced.getGallery': GetGallery
448 'social.grain.unspecced.getKnownFollowers': GetKnownFollowers
449 'social.grain.unspecced.getLocations': GetLocations
450 'social.grain.unspecced.getMutes': GetMutes
451 'social.grain.unspecced.getNotifications': GetNotifications
452 'social.grain.unspecced.getStories': GetStories
453 'social.grain.unspecced.getStory': GetStory
454 'social.grain.unspecced.getStoryArchive': GetStoryArchive
455 'social.grain.unspecced.getStoryAuthors': GetStoryAuthors
456 'social.grain.unspecced.getSuggestedFollows': GetSuggestedFollows
457 'social.grain.unspecced.searchActorsTypeahead': SearchActorsTypeahead
458 'social.grain.unspecced.searchGalleries': SearchGalleries
459 'social.grain.unspecced.searchProfiles': SearchProfiles
460}
461
462// ─── XRPC Helpers ───────────────────────────────────────────────────
463
464export type { BaseContext, Row } from '@hatk/hatk/feeds'
465export { InvalidRequestError, NotFoundError } from '@hatk/hatk/xrpc'
466export { defineSetup } from '@hatk/hatk/setup'
467export { defineHook } from '@hatk/hatk/hooks'
468export { defineLabel } from '@hatk/hatk/labels'
469export { defineOG } from '@hatk/hatk/opengraph'
470export { defineRenderer } from '@hatk/hatk/renderer'
471export type Ctx<K extends keyof XrpcSchema & keyof Registry> = XrpcContext<
472 LexServerParams<Registry[K], Registry>,
473 RecordRegistry,
474 K extends keyof XrpcSchema ? InputOf<K> : unknown
475>
476
477type OutputOf<K extends keyof XrpcSchema> = XrpcSchema[K]['output']
478type InputOf<K extends keyof XrpcSchema> = XrpcSchema[K] extends { input: infer I } ? I : unknown
479
480export function defineQuery<K extends keyof XrpcSchema & string>(
481 nsid: K,
482 handler: (ctx: Ctx<K> & { ok: <T extends OutputOf<K>>(value: StrictArg<T, OutputOf<K>>) => Checked<OutputOf<K>> }) => Promise<Checked<OutputOf<K>>>,
483) {
484 return { __type: 'query' as const, nsid, handler: (ctx: any) => handler({ ...ctx, ok: (v: any) => v }) }
485}
486
487export function defineProcedure<K extends keyof XrpcSchema & string>(
488 nsid: K,
489 handler: (ctx: Ctx<K> & { ok: <T extends OutputOf<K>>(value: StrictArg<T, OutputOf<K>>) => Checked<OutputOf<K>> }) => Promise<Checked<OutputOf<K>>>,
490) {
491 return { __type: 'procedure' as const, nsid, handler: (ctx: any) => handler({ ...ctx, ok: (v: any) => v }) }
492}
493
494// ─── Server-side XRPC Caller ────────────────────────────────────────
495
496type ExtractParams<T> = T extends { params: infer P } ? P : Record<string, unknown>
497export async function callXrpc<K extends keyof XrpcSchema & string>(
498 nsid: K,
499 params?: ExtractParams<XrpcSchema[K]>,
500): Promise<OutputOf<K>> {
501 return _callXrpc(nsid, params as any) as Promise<OutputOf<K>>
502}
503
504// ─── Feed & Seed Helpers ────────────────────────────────────────────
505
506type FeedGenerate = (ctx: FeedContext & { ok: (value: FeedResult) => Checked<FeedResult> }) => Promise<Checked<FeedResult>>
507export function defineFeed<K extends keyof RecordRegistry>(
508 opts: { collection: K; view?: string; label: string; generate: FeedGenerate; hydrate?: (ctx: BaseContext, items: Row<RecordRegistry[K]>[]) => Promise<unknown[]> }
509): ReturnType<typeof _defineFeed>
510export function defineFeed(
511 opts: { collection?: never; view?: never; label: string; generate: FeedGenerate; hydrate: (ctx: BaseContext, items: Row<unknown>[]) => Promise<unknown[]> }
512): ReturnType<typeof _defineFeed>
513export function defineFeed(opts: any) { return _defineFeed(opts) }
514export function seed(opts?: SeedOpts) { return _seed<RecordRegistry>(opts) }
515
516// View identity helpers — wrap object literals to enable excess property checking.
517// Usage: rows.map(r => views.statusView({ ...fields })) catches extra properties.
518export const views = {
519 statusView: (v: StatusView): StatusView => v,
520 bskyActorDefsProfileView: (v: BskyActorDefsProfileView): BskyActorDefsProfileView => v,
521 profileViewBasic: (v: ProfileViewBasic): ProfileViewBasic => v,
522 verificationView: (v: VerificationView): VerificationView => v,
523 bskyActorDefsProfileViewDetailed: (v: BskyActorDefsProfileViewDetailed): BskyActorDefsProfileViewDetailed => v,
524 postView: (v: PostView): PostView => v,
525 generatorView: (v: GeneratorView): GeneratorView => v,
526 threadgateView: (v: ThreadgateView): ThreadgateView => v,
527 listView: (v: ListView): ListView => v,
528 listItemView: (v: ListItemView): ListItemView => v,
529 listViewBasic: (v: ListViewBasic): ListViewBasic => v,
530 starterPackView: (v: StarterPackView): StarterPackView => v,
531 starterPackViewBasic: (v: StarterPackViewBasic): StarterPackViewBasic => v,
532 labelerView: (v: LabelerView): LabelerView => v,
533 labelerViewDetailed: (v: LabelerViewDetailed): LabelerViewDetailed => v,
534 grainActorDefsProfileView: (v: GrainActorDefsProfileView): GrainActorDefsProfileView => v,
535 grainActorDefsProfileViewDetailed: (v: GrainActorDefsProfileViewDetailed): GrainActorDefsProfileViewDetailed => v,
536 commentView: (v: CommentView): CommentView => v,
537 galleryView: (v: GalleryView): GalleryView => v,
538 photoView: (v: PhotoView): PhotoView => v,
539 exifView: (v: ExifView): ExifView => v,
540 storyView: (v: StoryView): StoryView => v,
541} as const