// Generated TypeScript client for AT Protocol records // Generated at: 2025-09-29 01:19:06 UTC // Lexicons: 42 /** * @example Usage * ```ts * import { AtProtoClient } from "./generated_client.ts"; * * const client = new AtProtoClient( * 'https://api.slices.network', * 'at://did:plc:bcgltzqazw5tb6k2g3ttenbj/network.slices.slice/3lymhd4jhrd2z' * ); * * // Get records from the app.bsky.graph.follow collection * const records = await client.app.bsky.graph.follow.getRecords(); * * // Get a specific record * const record = await client.app.bsky.graph.follow.getRecord({ * uri: 'at://did:plc:example/app.bsky.graph.follow/3abc123' * }); * * // Get records with filtering and search * const filteredRecords = await client.app.bsky.graph.follow.getRecords({ * where: { * text: { contains: "example search term" } * } * }); * * // Use slice-level methods for cross-collection queries with type safety * const sliceRecords = await client.network.slices.slice.getSliceRecords({ * where: { * collection: { eq: 'app.bsky.graph.follow' } * } * }); * * // Search across multiple collections using union types * const multiCollectionRecords = await client.network.slices.slice.getSliceRecords({ * where: { * collection: { in: ['app.bsky.graph.follow', 'app.bsky.actor.profile'] }, * text: { contains: 'example search term' }, * did: { in: ['did:plc:user1', 'did:plc:user2'] } * }, * limit: 20 * }); * * // Serve the records as JSON * Deno.serve(async () => new Response(JSON.stringify(records.records.map(r => r.value)))); * ``` */ import { type AuthProvider, type BlobRef, type CountRecordsResponse, type GetRecordParams, type GetRecordsResponse, type IndexedRecordFields, type RecordResponse, SlicesClient, type SortField, type WhereCondition, } from "@slices/client"; import type { OAuthClient } from "@slices/oauth"; export type AppBskyGraphDefsListPurpose = | "app.bsky.graph.defs#modlist" | "app.bsky.graph.defs#curatelist" | "app.bsky.graph.defs#referencelist" | (string & Record); export type AppBskyFeedDefsEvent = | "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" | (string & Record); export type AppBskyFeedDefsContentMode = | "app.bsky.feed.defs#contentModeUnspecified" | "app.bsky.feed.defs#contentModeVideo" | (string & Record); export type AppBskyActorDefsActorTarget = | "all" | "exclude-following" | (string & Record); export type AppBskyActorDefsType = | "feed" | "list" | "timeline" | (string & Record); export type AppBskyActorDefsSort = | "oldest" | "newest" | "most-likes" | "random" | "hotness" | (string & Record); export type AppBskyActorDefsMutedWordTarget = | "content" | "tag" | (string & Record); export type AppBskyActorDefsVisibility = | "ignore" | "show" | "warn" | "hide" | (string & Record); export type AppBskyActorDefsAllowIncoming = | "all" | "none" | "following" | (string & Record); export type ComAtprotoLabelDefsLabelValue = | "!hide" | "!no-promote" | "!warn" | "!no-unauthenticated" | "dmca-violation" | "doxxing" | "porn" | "sexual" | "nudity" | "nsfl" | "gore" | (string & Record); export type ComAtprotoLabelDefsBlurs = | "content" | "media" | "none" | (string & Record); export type ComAtprotoLabelDefsSeverity = | "inform" | "alert" | "none" | (string & Record); export type ComAtprotoLabelDefsDefaultSetting = | "ignore" | "warn" | "hide" | (string & Record); export interface AppBskyEmbedDefsAspectRatio { width: number; height: number; } export interface AppBskyEmbedRecordMain { record: ComAtprotoRepoStrongRef; } export interface AppBskyEmbedRecordView { record: | AppBskyEmbedRecord["ViewRecord"] | AppBskyEmbedRecord["ViewNotFound"] | AppBskyEmbedRecord["ViewBlocked"] | AppBskyEmbedRecord["ViewDetached"] | AppBskyFeedDefs["GeneratorView"] | AppBskyGraphDefs["ListView"] | AppBskyLabelerDefs["LabelerView"] | AppBskyGraphDefs["StarterPackViewBasic"] | { $type: string; [key: string]: unknown }; } export interface AppBskyEmbedRecordViewRecord { cid: string; uri: string; /** The record data itself. */ value: unknown; author: AppBskyActorDefs["ProfileViewBasic"]; embeds?: | AppBskyEmbedImages["View"] | AppBskyEmbedVideo["View"] | AppBskyEmbedExternal["View"] | AppBskyEmbedRecord["View"] | AppBskyEmbedRecordWithMedia["View"] | { $type: string; [key: string]: unknown }[]; labels?: ComAtprotoLabelDefs["Label"][]; indexedAt: string; likeCount?: number; quoteCount?: number; replyCount?: number; repostCount?: number; } export interface AppBskyEmbedRecordViewBlocked { uri: string; author: AppBskyFeedDefs["BlockedAuthor"]; blocked: boolean; } export interface AppBskyEmbedRecordViewDetached { uri: string; detached: boolean; } export interface AppBskyEmbedRecordViewNotFound { uri: string; notFound: boolean; } export interface AppBskyEmbedImagesMain { images: AppBskyEmbedImages["Image"][]; } export interface AppBskyEmbedImagesView { images: AppBskyEmbedImages["ViewImage"][]; } export interface AppBskyEmbedImagesImage { /** Alt text description of the image, for accessibility. */ alt: string; image: BlobRef; aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; } export interface AppBskyEmbedImagesViewImage { /** Alt text description of the image, for accessibility. */ alt: string; /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */ thumb: string; /** 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. */ fullsize: string; aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; } export interface AppBskyEmbedRecordWithMediaMain { media: | AppBskyEmbedImages["Main"] | AppBskyEmbedVideo["Main"] | AppBskyEmbedExternal["Main"] | { $type: string; [key: string]: unknown }; record: AppBskyEmbedRecord["Main"]; } export interface AppBskyEmbedRecordWithMediaView { media: | AppBskyEmbedImages["View"] | AppBskyEmbedVideo["View"] | AppBskyEmbedExternal["View"] | { $type: string; [key: string]: unknown }; record: AppBskyEmbedRecord["View"]; } export interface AppBskyEmbedVideoMain { /** Alt text description of the video, for accessibility. */ alt?: string; video: BlobRef; captions?: AppBskyEmbedVideo["Caption"][]; aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; } export interface AppBskyEmbedVideoView { alt?: string; cid: string; playlist: string; thumbnail?: string; aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; } export interface AppBskyEmbedVideoCaption { file: BlobRef; lang: string; } export interface AppBskyEmbedExternalMain { external: AppBskyEmbedExternal["External"]; } export interface AppBskyEmbedExternalView { external: AppBskyEmbedExternal["ViewExternal"]; } export interface AppBskyEmbedExternalExternal { uri: string; thumb?: BlobRef; title: string; description: string; } export interface AppBskyEmbedExternalViewExternal { uri: string; thumb?: string; title: string; description: string; } export interface AppBskyGraphFollow { subject: string; createdAt: string; } export type AppBskyGraphFollowSortFields = "subject" | "createdAt"; export type AppBskyGraphDefsModlist = "app.bsky.graph.defs#modlist"; export interface AppBskyGraphDefsListView { cid: string; uri: string; name: string; avatar?: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyGraphDefs["ListViewerState"]; creator: AppBskyActorDefs["ProfileView"]; purpose: AppBskyGraphDefs["ListPurpose"]; indexedAt: string; description?: string; listItemCount?: number; descriptionFacets?: AppBskyRichtextFacet["Main"][]; } export type AppBskyGraphDefsCuratelist = "app.bsky.graph.defs#curatelist"; export interface AppBskyGraphDefsListItemView { uri: string; subject: AppBskyActorDefs["ProfileView"]; } export interface AppBskyGraphDefsRelationship { did: string; /** if the actor follows this DID, this is the AT-URI of the follow record */ following?: string; /** if the actor is followed by this DID, contains the AT-URI of the follow record */ followedBy?: string; } export interface AppBskyGraphDefsListViewBasic { cid: string; uri: string; name: string; avatar?: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyGraphDefs["ListViewerState"]; purpose: AppBskyGraphDefs["ListPurpose"]; indexedAt?: string; listItemCount?: number; } export interface AppBskyGraphDefsNotFoundActor { actor: string; notFound: boolean; } export type AppBskyGraphDefsReferencelist = "app.bsky.graph.defs#referencelist"; export interface AppBskyGraphDefsListViewerState { muted?: boolean; blocked?: string; } export interface AppBskyGraphDefsStarterPackView { cid: string; uri: string; list?: AppBskyGraphDefs["ListViewBasic"]; feeds?: AppBskyFeedDefs["GeneratorView"][]; labels?: ComAtprotoLabelDefs["Label"][]; record: unknown; creator: AppBskyActorDefs["ProfileViewBasic"]; indexedAt: string; joinedWeekCount?: number; listItemsSample?: AppBskyGraphDefs["ListItemView"][]; joinedAllTimeCount?: number; } export interface AppBskyGraphDefsStarterPackViewBasic { cid: string; uri: string; labels?: ComAtprotoLabelDefs["Label"][]; record: unknown; creator: AppBskyActorDefs["ProfileViewBasic"]; indexedAt: string; listItemCount?: number; joinedWeekCount?: number; joinedAllTimeCount?: number; } export interface AppBskyFeedDefsPostView { cid: string; uri: string; embed?: | AppBskyEmbedImages["View"] | AppBskyEmbedVideo["View"] | AppBskyEmbedExternal["View"] | AppBskyEmbedRecord["View"] | AppBskyEmbedRecordWithMedia["View"] | { $type: string; [key: string]: unknown }; author: AppBskyActorDefs["ProfileViewBasic"]; labels?: ComAtprotoLabelDefs["Label"][]; record: unknown; viewer?: AppBskyFeedDefs["ViewerState"]; indexedAt: string; likeCount?: number; quoteCount?: number; replyCount?: number; threadgate?: AppBskyFeedDefs["ThreadgateView"]; repostCount?: number; } export interface AppBskyFeedDefsReplyRef { root: | AppBskyFeedDefs["PostView"] | AppBskyFeedDefs["NotFoundPost"] | AppBskyFeedDefs["BlockedPost"] | { $type: string; [key: string]: unknown }; parent: | AppBskyFeedDefs["PostView"] | AppBskyFeedDefs["NotFoundPost"] | AppBskyFeedDefs["BlockedPost"] | { $type: string; [key: string]: unknown }; /** When parent is a reply to another post, this is the author of that post. */ grandparentAuthor?: AppBskyActorDefs["ProfileViewBasic"]; } export type AppBskyFeedDefsReasonPin = Record; export interface AppBskyFeedDefsBlockedPost { uri: string; author: AppBskyFeedDefs["BlockedAuthor"]; blocked: boolean; } export interface AppBskyFeedDefsInteraction { item?: string; event?: AppBskyFeedDefsEvent; /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ feedContext?: string; } export type AppBskyFeedDefsRequestLess = "app.bsky.feed.defs#requestLess"; export type AppBskyFeedDefsRequestMore = "app.bsky.feed.defs#requestMore"; export interface AppBskyFeedDefsViewerState { like?: string; pinned?: boolean; repost?: string; threadMuted?: boolean; replyDisabled?: boolean; embeddingDisabled?: boolean; } export interface AppBskyFeedDefsFeedViewPost { post: AppBskyFeedDefs["PostView"]; reply?: AppBskyFeedDefs["ReplyRef"]; reason?: AppBskyFeedDefs["ReasonRepost"] | AppBskyFeedDefs["ReasonPin"] | { $type: string; [key: string]: unknown; }; /** Context provided by feed generator that may be passed back alongside interactions. */ feedContext?: string; } export interface AppBskyFeedDefsNotFoundPost { uri: string; notFound: boolean; } export interface AppBskyFeedDefsReasonRepost { by: AppBskyActorDefs["ProfileViewBasic"]; indexedAt: string; } export interface AppBskyFeedDefsBlockedAuthor { did: string; viewer?: AppBskyActorDefs["ViewerState"]; } export interface AppBskyFeedDefsGeneratorView { cid: string; did: string; uri: string; avatar?: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyFeedDefs["GeneratorViewerState"]; creator: AppBskyActorDefs["ProfileView"]; indexedAt: string; likeCount?: number; contentMode?: AppBskyFeedDefsContentMode; description?: string; displayName: string; descriptionFacets?: AppBskyRichtextFacet["Main"][]; acceptsInteractions?: boolean; } export interface AppBskyFeedDefsThreadContext { rootAuthorLike?: string; } export interface AppBskyFeedDefsThreadViewPost { post: AppBskyFeedDefs["PostView"]; parent?: | AppBskyFeedDefs["ThreadViewPost"] | AppBskyFeedDefs["NotFoundPost"] | AppBskyFeedDefs["BlockedPost"] | { $type: string; [key: string]: unknown }; replies?: | AppBskyFeedDefs["ThreadViewPost"] | AppBskyFeedDefs["NotFoundPost"] | AppBskyFeedDefs["BlockedPost"] | { $type: string; [key: string]: unknown }[]; threadContext?: AppBskyFeedDefs["ThreadContext"]; } export interface AppBskyFeedDefsThreadgateView { cid?: string; uri?: string; lists?: AppBskyGraphDefs["ListViewBasic"][]; record?: unknown; } export type AppBskyFeedDefsInteractionLike = "app.bsky.feed.defs#interactionLike"; export type AppBskyFeedDefsInteractionSeen = "app.bsky.feed.defs#interactionSeen"; export type AppBskyFeedDefsClickthroughItem = "app.bsky.feed.defs#clickthroughItem"; export type AppBskyFeedDefsContentModeVideo = "app.bsky.feed.defs#contentModeVideo"; export type AppBskyFeedDefsInteractionQuote = "app.bsky.feed.defs#interactionQuote"; export type AppBskyFeedDefsInteractionReply = "app.bsky.feed.defs#interactionReply"; export type AppBskyFeedDefsInteractionShare = "app.bsky.feed.defs#interactionShare"; export interface AppBskyFeedDefsSkeletonFeedPost { post: string; reason?: | AppBskyFeedDefs["SkeletonReasonRepost"] | AppBskyFeedDefs["SkeletonReasonPin"] | { $type: string; [key: string]: unknown }; /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ feedContext?: string; } export type AppBskyFeedDefsClickthroughEmbed = "app.bsky.feed.defs#clickthroughEmbed"; export type AppBskyFeedDefsInteractionRepost = "app.bsky.feed.defs#interactionRepost"; export type AppBskyFeedDefsSkeletonReasonPin = Record; export type AppBskyFeedDefsClickthroughAuthor = "app.bsky.feed.defs#clickthroughAuthor"; export type AppBskyFeedDefsClickthroughReposter = "app.bsky.feed.defs#clickthroughReposter"; export interface AppBskyFeedDefsGeneratorViewerState { like?: string; } export interface AppBskyFeedDefsSkeletonReasonRepost { repost: string; } export type AppBskyFeedDefsContentModeUnspecified = "app.bsky.feed.defs#contentModeUnspecified"; export interface AppBskyFeedPostgate { /** Reference (AT-URI) to the post record. */ post: string; createdAt: string; /** 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. */ embeddingRules?: AppBskyFeedPostgate["DisableRule"] | { $type: string; [key: string]: unknown; }[]; /** List of AT-URIs embedding this post that the author has detached from. */ detachedEmbeddingUris?: string[]; } export type AppBskyFeedPostgateSortFields = "post" | "createdAt"; export type AppBskyFeedPostgateDisableRule = Record; export interface AppBskyFeedThreadgate { /** Reference (AT-URI) to the post record. */ post: string; /** 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. */ allow?: | AppBskyFeedThreadgate["MentionRule"] | AppBskyFeedThreadgate["FollowerRule"] | AppBskyFeedThreadgate["FollowingRule"] | AppBskyFeedThreadgate["ListRule"] | { $type: string; [key: string]: unknown }[]; createdAt: string; /** List of hidden reply URIs. */ hiddenReplies?: string[]; } export type AppBskyFeedThreadgateSortFields = "post" | "createdAt"; export interface AppBskyFeedThreadgateListRule { list: string; } export type AppBskyFeedThreadgateMentionRule = Record; export type AppBskyFeedThreadgateFollowerRule = Record; export type AppBskyFeedThreadgateFollowingRule = Record; export interface AppBskyRichtextFacetTag { tag: string; } export interface AppBskyRichtextFacetLink { uri: string; } export interface AppBskyRichtextFacetMain { index: AppBskyRichtextFacet["ByteSlice"]; features: | AppBskyRichtextFacet["Mention"] | AppBskyRichtextFacet["Link"] | AppBskyRichtextFacet["Tag"] | { $type: string; [key: string]: unknown }[]; } export interface AppBskyRichtextFacetMention { did: string; } export interface AppBskyRichtextFacetByteSlice { byteEnd: number; byteStart: number; } export interface AppBskyActorDefsNux { id: string; /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */ data?: string; completed: boolean; /** The date and time at which the NUX will expire and should be considered completed. */ expiresAt?: string; } export interface AppBskyActorDefsMutedWord { id?: string; /** The muted word itself. */ value: string; /** The intended targets of the muted word. */ targets: AppBskyActorDefs["MutedWordTarget"][]; /** The date and time at which the muted word will expire and no longer be applied. */ expiresAt?: string; /** Groups of users to apply the muted word to. If undefined, applies to all users. */ actorTarget?: AppBskyActorDefsActorTarget; } export interface AppBskyActorDefsSavedFeed { id: string; type: AppBskyActorDefsType; value: string; pinned: boolean; } export type AppBskyActorDefsPreferences = | AppBskyActorDefs["AdultContentPref"] | AppBskyActorDefs["ContentLabelPref"] | AppBskyActorDefs["SavedFeedsPref"] | AppBskyActorDefs["SavedFeedsPrefV2"] | AppBskyActorDefs["PersonalDetailsPref"] | AppBskyActorDefs["FeedViewPref"] | AppBskyActorDefs["ThreadViewPref"] | AppBskyActorDefs["InterestsPref"] | AppBskyActorDefs["MutedWordsPref"] | AppBskyActorDefs["HiddenPostsPref"] | AppBskyActorDefs["BskyAppStatePref"] | AppBskyActorDefs["LabelersPref"] | AppBskyActorDefs["PostInteractionSettingsPref"] | { $type: string; [key: string]: unknown }[]; export interface AppBskyActorDefsProfileView { did: string; avatar?: string; handle: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyActorDefs["ViewerState"]; createdAt?: string; indexedAt?: string; associated?: AppBskyActorDefs["ProfileAssociated"]; description?: string; displayName?: string; } export interface AppBskyActorDefsViewerState { muted?: boolean; blocking?: string; blockedBy?: boolean; following?: string; followedBy?: string; mutedByList?: AppBskyGraphDefs["ListViewBasic"]; blockingByList?: AppBskyGraphDefs["ListViewBasic"]; knownFollowers?: AppBskyActorDefs["KnownFollowers"]; } export interface AppBskyActorDefsFeedViewPref { /** The URI of the feed, or an identifier which describes the feed. */ feed: string; /** Hide replies in the feed. */ hideReplies?: boolean; /** Hide reposts in the feed. */ hideReposts?: boolean; /** Hide quote posts in the feed. */ hideQuotePosts?: boolean; /** Hide replies in the feed if they do not have this number of likes. */ hideRepliesByLikeCount?: number; /** Hide replies in the feed if they are not by followed users. */ hideRepliesByUnfollowed?: boolean; } export interface AppBskyActorDefsLabelersPref { labelers: AppBskyActorDefs["LabelerPrefItem"][]; } export interface AppBskyActorDefsInterestsPref { /** A list of tags which describe the account owner's interests gathered during onboarding. */ tags: string[]; } export interface AppBskyActorDefsKnownFollowers { count: number; followers: AppBskyActorDefs["ProfileViewBasic"][]; } export interface AppBskyActorDefsMutedWordsPref { /** A list of words the account owner has muted. */ items: AppBskyActorDefs["MutedWord"][]; } export interface AppBskyActorDefsSavedFeedsPref { saved: string[]; pinned: string[]; timelineIndex?: number; } export interface AppBskyActorDefsThreadViewPref { /** Sorting mode for threads. */ sort?: AppBskyActorDefsSort; /** Show followed users at the top of all replies. */ prioritizeFollowedUsers?: boolean; } export interface AppBskyActorDefsHiddenPostsPref { /** A list of URIs of posts the account owner has hidden. */ items: string[]; } export interface AppBskyActorDefsLabelerPrefItem { did: string; } export interface AppBskyActorDefsAdultContentPref { enabled: boolean; } export interface AppBskyActorDefsBskyAppStatePref { /** Storage for NUXs the user has encountered. */ nuxs?: AppBskyActorDefs["Nux"][]; /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */ queuedNudges?: string[]; activeProgressGuide?: AppBskyActorDefs["BskyAppProgressGuide"]; } export interface AppBskyActorDefsContentLabelPref { label: string; /** Which labeler does this preference apply to? If undefined, applies globally. */ labelerDid?: string; visibility: AppBskyActorDefsVisibility; } export interface AppBskyActorDefsProfileViewBasic { did: string; avatar?: string; handle: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyActorDefs["ViewerState"]; createdAt?: string; associated?: AppBskyActorDefs["ProfileAssociated"]; displayName?: string; } export interface AppBskyActorDefsSavedFeedsPrefV2 { items: AppBskyActorDefs["SavedFeed"][]; } export interface AppBskyActorDefsProfileAssociated { chat?: AppBskyActorDefs["ProfileAssociatedChat"]; lists?: number; labeler?: boolean; feedgens?: number; starterPacks?: number; } export interface AppBskyActorDefsPersonalDetailsPref { /** The birth date of account owner. */ birthDate?: string; } export interface AppBskyActorDefsProfileViewDetailed { did: string; avatar?: string; banner?: string; handle: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyActorDefs["ViewerState"]; createdAt?: string; indexedAt?: string; associated?: AppBskyActorDefs["ProfileAssociated"]; pinnedPost?: ComAtprotoRepoStrongRef; postsCount?: number; description?: string; displayName?: string; followsCount?: number; followersCount?: number; joinedViaStarterPack?: AppBskyGraphDefs["StarterPackViewBasic"]; } export interface AppBskyActorDefsBskyAppProgressGuide { guide: string; } export interface AppBskyActorDefsProfileAssociatedChat { allowIncoming: AppBskyActorDefsAllowIncoming; } export interface AppBskyActorDefsPostInteractionSettingsPref { /** 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. */ threadgateAllowRules?: | AppBskyFeedThreadgate["MentionRule"] | AppBskyFeedThreadgate["FollowerRule"] | AppBskyFeedThreadgate["FollowingRule"] | AppBskyFeedThreadgate["ListRule"] | { $type: string; [key: string]: unknown }[]; /** 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. */ postgateEmbeddingRules?: AppBskyFeedPostgate["DisableRule"] | { $type: string; [key: string]: unknown; }[]; } export interface AppBskyActorProfile { /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ avatar?: BlobRef; /** Larger horizontal image to display behind profile view. */ banner?: BlobRef; /** Self-label values, specific to the Bluesky application, on the overall account. */ labels?: ComAtprotoLabelDefs["SelfLabels"] | { $type: string; [key: string]: unknown; }; createdAt?: string; pinnedPost?: ComAtprotoRepoStrongRef; /** Free-form profile description text. */ description?: string; displayName?: string; joinedViaStarterPack?: ComAtprotoRepoStrongRef; } export type AppBskyActorProfileSortFields = | "createdAt" | "description" | "displayName"; export interface AppBskyLabelerDefsLabelerView { cid: string; uri: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyLabelerDefs["LabelerViewerState"]; creator: AppBskyActorDefs["ProfileView"]; indexedAt: string; likeCount?: number; } export interface AppBskyLabelerDefsLabelerPolicies { /** The label values which this labeler publishes. May include global or custom labels. */ labelValues: ComAtprotoLabelDefs["LabelValue"][]; /** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. */ labelValueDefinitions?: ComAtprotoLabelDefs["LabelValueDefinition"][]; } export interface AppBskyLabelerDefsLabelerViewerState { like?: string; } export interface AppBskyLabelerDefsLabelerViewDetailed { cid: string; uri: string; labels?: ComAtprotoLabelDefs["Label"][]; viewer?: AppBskyLabelerDefs["LabelerViewerState"]; creator: AppBskyActorDefs["ProfileView"]; policies: AppBskyLabelerDefs["LabelerPolicies"]; indexedAt: string; likeCount?: number; } export interface NetworkSlicesWaitlistRequest { /** The AT URI of the slice being requested access to */ slice: string; /** When the user joined the waitlist */ createdAt: string; } export type NetworkSlicesWaitlistRequestSortFields = "slice" | "createdAt"; export interface NetworkSlicesWaitlistDefsRequestView { /** The AT URI of the slice being requested access to */ slice: string; /** When the user joined the waitlist */ createdAt: string; /** Profile of the requester */ profile?: AppBskyActorDefs["ProfileViewBasic"]; } export interface NetworkSlicesWaitlistDefsInviteView { /** The DID being invited */ did: string; /** The AT URI of the slice this invite is for */ slice: string; /** When this invitation was created */ createdAt: string; /** Optional expiration date for this invitation */ expiresAt?: string; /** The AT URI of this invite record */ uri?: string; /** Profile of the invitee */ profile?: AppBskyActorDefs["ProfileViewBasic"]; } export interface NetworkSlicesWaitlistInvite { /** The DID being invited */ did: string; /** The AT URI of the slice this invite is for */ slice: string; /** When this invitation was created */ createdAt: string; /** Optional expiration date for this invitation */ expiresAt?: string; } export type NetworkSlicesWaitlistInviteSortFields = | "did" | "slice" | "createdAt" | "expiresAt"; export interface NetworkSlicesSliceSyncUserCollectionsInput { slice: string; timeoutSeconds?: number; } export interface NetworkSlicesSliceSyncUserCollectionsOutput { reposProcessed: number; recordsSynced: number; timedOut: boolean; } export interface NetworkSlicesSliceDefsSliceView { uri: string; cid: string; /** Display name of the slice */ name: string; /** Primary domain namespace for this slice (e.g. social.grain) */ domain: string; /** Profile of the slice creator */ creator: NetworkSlicesActorDefs["ProfileViewBasic"]; createdAt: string; /** Recent activity sparkline data points for the last 24 hours */ sparkline?: NetworkSlicesSliceDefs["SparklinePoint"][]; /** Total number of indexed records in this slice */ indexedRecordCount?: number; /** Total number of unique indexed actors in this slice */ indexedActorCount?: number; /** Number of collections with indexed records */ indexedCollectionCount?: number; /** Total number of waitlist requests for this slice */ waitlistRequestCount?: number; /** Total number of waitlist invites for this slice */ waitlistInviteCount?: number; } export interface NetworkSlicesSliceDefsSparklinePoint { timestamp: string; count: number; } export interface NetworkSlicesSliceGetSparklinesInput { slices: string[]; interval?: string; duration?: string; } export interface NetworkSlicesSliceGetSparklinesOutput { sparklines: NetworkSlicesSliceGetSparklines["SparklineEntry"][]; } export interface NetworkSlicesSliceGetSparklinesSparklineEntry { /** AT-URI of the slice */ sliceUri: string; /** Array of sparkline data points */ points: NetworkSlicesSliceDefs["SparklinePoint"][]; } export interface NetworkSlicesSliceGetJobLogsParams { jobId: string; limit?: number; } export interface NetworkSlicesSliceGetJobLogsOutput { logs: NetworkSlicesSliceGetJobLogs["LogEntry"][]; } export interface NetworkSlicesSliceGetJobLogsLogEntry { /** Log entry ID */ id: number; /** When the log entry was created */ createdAt: string; /** Type of log entry */ logType: string; /** UUID of related job if applicable */ jobId?: string; /** DID of related user if applicable */ userDid?: string; /** AT-URI of related slice if applicable */ sliceUri?: string; /** Log level */ level: string; /** Log message */ message: string; /** Additional metadata associated with the log entry */ metadata?: unknown; } export interface NetworkSlicesSliceGetJetstreamStatusOutput { connected: boolean; } export interface NetworkSlicesSliceGetSyncSummaryParams { slice: string; collections?: string[]; externalCollections?: string[]; repos?: string[]; maxRepos?: number; } export interface NetworkSlicesSliceGetSyncSummaryOutput { totalRepos: number; cappedRepos: number; collectionsSummary: NetworkSlicesSliceGetSyncSummary["CollectionSummary"][]; wouldBeCapped: boolean; appliedLimit: number; } export interface NetworkSlicesSliceGetSyncSummaryCollectionSummary { collection: string; estimatedRepos: number; isExternal: boolean; } export interface NetworkSlicesSlice { /** Name of the slice */ name: string; /** Primary domain namespace for this slice (e.g. social.grain) */ domain: string; /** When the slice was created */ createdAt: string; } export type NetworkSlicesSliceSortFields = "name" | "domain" | "createdAt"; export interface NetworkSlicesSliceGetJobStatusParams { jobId: string; } export type NetworkSlicesSliceGetJobStatusOutput = NetworkSlicesSliceGetJobStatus["JobStatus"]; export interface NetworkSlicesSliceGetJobStatusJobStatus { /** UUID of the job */ jobId: string; /** Current status of the job */ status: string; /** When the job was created */ createdAt: string; /** When the job started executing */ startedAt?: string; /** When the job completed */ completedAt?: string; /** Job result if completed successfully */ result?: NetworkSlicesSliceGetJobStatus["SyncJobResult"]; /** Error message if job failed */ error?: string; /** Number of times the job has been retried */ retryCount: number; } export interface NetworkSlicesSliceGetJobStatusSyncJobResult { /** Whether the sync job completed successfully */ success: boolean; /** Total number of records synced */ totalRecords: number; /** List of collection NSIDs that were synced */ collectionsSynced: string[]; /** Number of repositories processed */ reposProcessed: number; /** Human-readable message about the job completion */ message: string; } export interface NetworkSlicesSliceGetActorsInput { slice: string; limit?: number; cursor?: string; where?: unknown; } export interface NetworkSlicesSliceGetActorsOutput { actors: NetworkSlicesSliceGetActors["Actor"][]; cursor?: string; } export interface NetworkSlicesSliceGetActorsActor { /** Decentralized identifier of the actor */ did: string; /** Human-readable handle of the actor */ handle?: string; /** AT-URI of the slice this actor is indexed in */ sliceUri: string; /** When this actor was indexed */ indexedAt: string; } export interface NetworkSlicesSliceClearSliceRecordsInput { slice: string; } export interface NetworkSlicesSliceClearSliceRecordsOutput { message: string; } export interface NetworkSlicesSliceDeleteOAuthClientInput { clientId: string; } export interface NetworkSlicesSliceDeleteOAuthClientOutput { message: string; } export interface NetworkSlicesSliceCreateOAuthClientInput { sliceUri: string; clientName: string; redirectUris: string[]; grantTypes?: string[]; responseTypes?: string[]; scope?: string; clientUri?: string; logoUri?: string; tosUri?: string; policyUri?: string; } export type NetworkSlicesSliceCreateOAuthClientOutput = NetworkSlicesSliceGetOAuthClients["OauthClientDetails"]; export interface NetworkSlicesSliceGetJetstreamLogsParams { slice?: string; limit?: number; } export interface NetworkSlicesSliceGetJetstreamLogsOutput { logs: NetworkSlicesSliceGetJobLogs["LogEntry"][]; } export interface NetworkSlicesSliceGetSliceRecordsInput { slice: string; limit?: number; cursor?: string; where?: unknown; sortBy?: unknown; } export interface NetworkSlicesSliceGetSliceRecordsOutput { records: NetworkSlicesSliceGetSliceRecords["IndexedRecord"][]; cursor?: string; } export interface NetworkSlicesSliceGetSliceRecordsIndexedRecord { /** AT-URI of the record */ uri: string; /** Content identifier of the record */ cid: string; /** DID of the record creator */ did: string; /** NSID of the collection this record belongs to */ collection: string; /** The record value/content */ value: unknown; /** When this record was indexed */ indexedAt: string; } export interface NetworkSlicesSliceStartSyncInput { slice: string; collections?: string[]; externalCollections?: string[]; repos?: string[]; limitPerRepo?: number; skipValidation?: boolean; } export interface NetworkSlicesSliceStartSyncOutput { jobId: string; message: string; } export interface NetworkSlicesSliceGetJobHistoryParams { userDid: string; sliceUri: string; limit?: number; } export type NetworkSlicesSliceGetJobHistoryOutput = NetworkSlicesSliceGetJobStatus["JobStatus"][]; export interface NetworkSlicesSliceStatsParams { slice: string; } export interface NetworkSlicesSliceStatsOutput { collections: string[]; collectionStats: NetworkSlicesSliceStats["CollectionStats"][]; totalLexicons: number; totalRecords: number; totalActors: number; } export interface NetworkSlicesSliceStatsCollectionStats { /** Collection NSID */ collection: string; /** Number of records in this collection */ recordCount: number; /** Number of unique actors with records in this collection */ uniqueActors: number; } export interface NetworkSlicesSliceUpdateOAuthClientInput { clientId: string; clientName?: string; redirectUris?: string[]; scope?: string; clientUri?: string; logoUri?: string; tosUri?: string; policyUri?: string; } export type NetworkSlicesSliceUpdateOAuthClientOutput = NetworkSlicesSliceGetOAuthClients["OauthClientDetails"]; export interface NetworkSlicesSliceGetOAuthClientsParams { slice: string; } export interface NetworkSlicesSliceGetOAuthClientsOutput { clients: NetworkSlicesSliceGetOAuthClients["OauthClientDetails"][]; } export interface NetworkSlicesSliceGetOAuthClientsOauthClientDetails { /** OAuth client ID */ clientId: string; /** OAuth client secret (only returned on creation) */ clientSecret?: string; /** Human-readable name of the OAuth client */ clientName: string; /** Allowed redirect URIs for OAuth flow */ redirectUris: string[]; /** Allowed OAuth grant types */ grantTypes: string[]; /** Allowed OAuth response types */ responseTypes: string[]; /** OAuth scope */ scope?: string; /** URI of the client application */ clientUri?: string; /** URI of the client logo */ logoUri?: string; /** URI of the terms of service */ tosUri?: string; /** URI of the privacy policy */ policyUri?: string; /** When the OAuth client was created */ createdAt: string; /** DID of the user who created this client */ createdByDid: string; } export interface NetworkSlicesLexicon { /** Namespaced identifier for the lexicon */ nsid: string; /** Human-readable description of the lexicon */ description?: string; /** The lexicon schema definitions as JSON */ definitions: string; /** When the lexicon was created */ createdAt: string; /** When the lexicon was last updated */ updatedAt?: string; /** AT-URI reference to the slice this lexicon belongs to */ slice: string; /** Whether this lexicon should be excluded from sync operations */ excludedFromSync?: boolean; } export type NetworkSlicesLexiconSortFields = | "nsid" | "description" | "definitions" | "createdAt" | "updatedAt" | "slice"; export interface NetworkSlicesActorDefsProfileViewBasic { did: string; handle: string; displayName?: string; /** Free-form profile description text. */ description?: string; avatar?: string; } export interface NetworkSlicesActorProfile { displayName?: string; /** Free-form profile description text. */ description?: string; /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ avatar?: BlobRef; createdAt?: string; } export type NetworkSlicesActorProfileSortFields = | "displayName" | "description" | "createdAt"; export interface ComAtprotoLabelDefsLabel { /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */ cid?: string; /** Timestamp when this label was created. */ cts: string; /** Timestamp at which this label expires (no longer applies). */ exp?: string; /** If true, this is a negation label, overwriting a previous label. */ neg?: boolean; /** Signature of dag-cbor encoded label. */ sig?: string; /** DID of the actor who created this label. */ src: string; /** AT URI of the record, repository (account), or other resource that this label applies to. */ uri: string; /** The short string name of the value or type of this label. */ val: string; /** The AT Protocol version of the label object. */ ver?: number; } export interface ComAtprotoLabelDefsSelfLabel { /** The short string name of the value or type of this label. */ val: string; } export interface ComAtprotoLabelDefsSelfLabels { values: ComAtprotoLabelDefs["SelfLabel"][]; } export interface ComAtprotoLabelDefsLabelValueDefinition { /** What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. */ blurs: ComAtprotoLabelDefsBlurs; locales: ComAtprotoLabelDefs["LabelValueDefinitionStrings"][]; /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ severity: ComAtprotoLabelDefsSeverity; /** Does the user need to have adult content enabled in order to configure this label? */ adultOnly?: boolean; /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ identifier: string; /** The default setting for this label. */ defaultSetting?: ComAtprotoLabelDefsDefaultSetting; } export interface ComAtprotoLabelDefsLabelValueDefinitionStrings { /** The code of the language these strings are written in. */ lang: string; /** A short human-readable name for the label. */ name: string; /** A longer description of what the label means and why it might be applied. */ description: string; } export interface ComAtprotoRepoStrongRef { cid: string; uri: string; } export interface AppBskyEmbedDefs { readonly AspectRatio: AppBskyEmbedDefsAspectRatio; } export interface AppBskyEmbedRecord { readonly Main: AppBskyEmbedRecordMain; readonly View: AppBskyEmbedRecordView; readonly ViewRecord: AppBskyEmbedRecordViewRecord; readonly ViewBlocked: AppBskyEmbedRecordViewBlocked; readonly ViewDetached: AppBskyEmbedRecordViewDetached; readonly ViewNotFound: AppBskyEmbedRecordViewNotFound; } export interface AppBskyEmbedImages { readonly Main: AppBskyEmbedImagesMain; readonly View: AppBskyEmbedImagesView; readonly Image: AppBskyEmbedImagesImage; readonly ViewImage: AppBskyEmbedImagesViewImage; } export interface AppBskyEmbedRecordWithMedia { readonly Main: AppBskyEmbedRecordWithMediaMain; readonly View: AppBskyEmbedRecordWithMediaView; } export interface AppBskyEmbedVideo { readonly Main: AppBskyEmbedVideoMain; readonly View: AppBskyEmbedVideoView; readonly Caption: AppBskyEmbedVideoCaption; } export interface AppBskyEmbedExternal { readonly Main: AppBskyEmbedExternalMain; readonly View: AppBskyEmbedExternalView; readonly External: AppBskyEmbedExternalExternal; readonly ViewExternal: AppBskyEmbedExternalViewExternal; } export interface AppBskyGraphDefs { readonly Modlist: AppBskyGraphDefsModlist; readonly ListView: AppBskyGraphDefsListView; readonly Curatelist: AppBskyGraphDefsCuratelist; readonly ListPurpose: AppBskyGraphDefsListPurpose; readonly ListItemView: AppBskyGraphDefsListItemView; readonly Relationship: AppBskyGraphDefsRelationship; readonly ListViewBasic: AppBskyGraphDefsListViewBasic; readonly NotFoundActor: AppBskyGraphDefsNotFoundActor; readonly Referencelist: AppBskyGraphDefsReferencelist; readonly ListViewerState: AppBskyGraphDefsListViewerState; readonly StarterPackView: AppBskyGraphDefsStarterPackView; readonly StarterPackViewBasic: AppBskyGraphDefsStarterPackViewBasic; } export interface AppBskyFeedDefs { readonly PostView: AppBskyFeedDefsPostView; readonly ReplyRef: AppBskyFeedDefsReplyRef; readonly ReasonPin: AppBskyFeedDefsReasonPin; readonly BlockedPost: AppBskyFeedDefsBlockedPost; readonly Interaction: AppBskyFeedDefsInteraction; readonly RequestLess: AppBskyFeedDefsRequestLess; readonly RequestMore: AppBskyFeedDefsRequestMore; readonly ViewerState: AppBskyFeedDefsViewerState; readonly FeedViewPost: AppBskyFeedDefsFeedViewPost; readonly NotFoundPost: AppBskyFeedDefsNotFoundPost; readonly ReasonRepost: AppBskyFeedDefsReasonRepost; readonly BlockedAuthor: AppBskyFeedDefsBlockedAuthor; readonly GeneratorView: AppBskyFeedDefsGeneratorView; readonly ThreadContext: AppBskyFeedDefsThreadContext; readonly ThreadViewPost: AppBskyFeedDefsThreadViewPost; readonly ThreadgateView: AppBskyFeedDefsThreadgateView; readonly InteractionLike: AppBskyFeedDefsInteractionLike; readonly InteractionSeen: AppBskyFeedDefsInteractionSeen; readonly ClickthroughItem: AppBskyFeedDefsClickthroughItem; readonly ContentModeVideo: AppBskyFeedDefsContentModeVideo; readonly InteractionQuote: AppBskyFeedDefsInteractionQuote; readonly InteractionReply: AppBskyFeedDefsInteractionReply; readonly InteractionShare: AppBskyFeedDefsInteractionShare; readonly SkeletonFeedPost: AppBskyFeedDefsSkeletonFeedPost; readonly ClickthroughEmbed: AppBskyFeedDefsClickthroughEmbed; readonly InteractionRepost: AppBskyFeedDefsInteractionRepost; readonly SkeletonReasonPin: AppBskyFeedDefsSkeletonReasonPin; readonly ClickthroughAuthor: AppBskyFeedDefsClickthroughAuthor; readonly ClickthroughReposter: AppBskyFeedDefsClickthroughReposter; readonly GeneratorViewerState: AppBskyFeedDefsGeneratorViewerState; readonly SkeletonReasonRepost: AppBskyFeedDefsSkeletonReasonRepost; readonly ContentModeUnspecified: AppBskyFeedDefsContentModeUnspecified; } export interface AppBskyFeedPostgate { readonly Main: AppBskyFeedPostgate; readonly DisableRule: AppBskyFeedPostgateDisableRule; } export interface AppBskyFeedThreadgate { readonly Main: AppBskyFeedThreadgate; readonly ListRule: AppBskyFeedThreadgateListRule; readonly MentionRule: AppBskyFeedThreadgateMentionRule; readonly FollowerRule: AppBskyFeedThreadgateFollowerRule; readonly FollowingRule: AppBskyFeedThreadgateFollowingRule; } export interface AppBskyRichtextFacet { readonly Tag: AppBskyRichtextFacetTag; readonly Link: AppBskyRichtextFacetLink; readonly Main: AppBskyRichtextFacetMain; readonly Mention: AppBskyRichtextFacetMention; readonly ByteSlice: AppBskyRichtextFacetByteSlice; } export interface AppBskyActorDefs { readonly Nux: AppBskyActorDefsNux; readonly MutedWord: AppBskyActorDefsMutedWord; readonly SavedFeed: AppBskyActorDefsSavedFeed; readonly Preferences: AppBskyActorDefsPreferences; readonly ProfileView: AppBskyActorDefsProfileView; readonly ViewerState: AppBskyActorDefsViewerState; readonly FeedViewPref: AppBskyActorDefsFeedViewPref; readonly LabelersPref: AppBskyActorDefsLabelersPref; readonly InterestsPref: AppBskyActorDefsInterestsPref; readonly KnownFollowers: AppBskyActorDefsKnownFollowers; readonly MutedWordsPref: AppBskyActorDefsMutedWordsPref; readonly SavedFeedsPref: AppBskyActorDefsSavedFeedsPref; readonly ThreadViewPref: AppBskyActorDefsThreadViewPref; readonly HiddenPostsPref: AppBskyActorDefsHiddenPostsPref; readonly LabelerPrefItem: AppBskyActorDefsLabelerPrefItem; readonly MutedWordTarget: AppBskyActorDefsMutedWordTarget; readonly AdultContentPref: AppBskyActorDefsAdultContentPref; readonly BskyAppStatePref: AppBskyActorDefsBskyAppStatePref; readonly ContentLabelPref: AppBskyActorDefsContentLabelPref; readonly ProfileViewBasic: AppBskyActorDefsProfileViewBasic; readonly SavedFeedsPrefV2: AppBskyActorDefsSavedFeedsPrefV2; readonly ProfileAssociated: AppBskyActorDefsProfileAssociated; readonly PersonalDetailsPref: AppBskyActorDefsPersonalDetailsPref; readonly ProfileViewDetailed: AppBskyActorDefsProfileViewDetailed; readonly BskyAppProgressGuide: AppBskyActorDefsBskyAppProgressGuide; readonly ProfileAssociatedChat: AppBskyActorDefsProfileAssociatedChat; readonly PostInteractionSettingsPref: AppBskyActorDefsPostInteractionSettingsPref; } export interface AppBskyLabelerDefs { readonly LabelerView: AppBskyLabelerDefsLabelerView; readonly LabelerPolicies: AppBskyLabelerDefsLabelerPolicies; readonly LabelerViewerState: AppBskyLabelerDefsLabelerViewerState; readonly LabelerViewDetailed: AppBskyLabelerDefsLabelerViewDetailed; } export interface NetworkSlicesWaitlistDefs { readonly RequestView: NetworkSlicesWaitlistDefsRequestView; readonly InviteView: NetworkSlicesWaitlistDefsInviteView; } export interface NetworkSlicesSliceDefs { readonly SliceView: NetworkSlicesSliceDefsSliceView; readonly SparklinePoint: NetworkSlicesSliceDefsSparklinePoint; } export interface NetworkSlicesSliceGetSparklines { readonly SparklineEntry: NetworkSlicesSliceGetSparklinesSparklineEntry; } export interface NetworkSlicesSliceGetJobLogs { readonly LogEntry: NetworkSlicesSliceGetJobLogsLogEntry; } export interface NetworkSlicesSliceGetSyncSummary { readonly CollectionSummary: NetworkSlicesSliceGetSyncSummaryCollectionSummary; } export interface NetworkSlicesSliceGetJobStatus { readonly JobStatus: NetworkSlicesSliceGetJobStatusJobStatus; readonly SyncJobResult: NetworkSlicesSliceGetJobStatusSyncJobResult; } export interface NetworkSlicesSliceGetActors { readonly Actor: NetworkSlicesSliceGetActorsActor; } export interface NetworkSlicesSliceGetSliceRecords { readonly IndexedRecord: NetworkSlicesSliceGetSliceRecordsIndexedRecord; } export interface NetworkSlicesSliceStats { readonly CollectionStats: NetworkSlicesSliceStatsCollectionStats; } export interface NetworkSlicesSliceGetOAuthClients { readonly OauthClientDetails: NetworkSlicesSliceGetOAuthClientsOauthClientDetails; } export interface NetworkSlicesActorDefs { readonly ProfileViewBasic: NetworkSlicesActorDefsProfileViewBasic; } export interface ComAtprotoLabelDefs { readonly Label: ComAtprotoLabelDefsLabel; readonly SelfLabel: ComAtprotoLabelDefsSelfLabel; readonly LabelValue: ComAtprotoLabelDefsLabelValue; readonly SelfLabels: ComAtprotoLabelDefsSelfLabels; readonly LabelValueDefinition: ComAtprotoLabelDefsLabelValueDefinition; readonly LabelValueDefinitionStrings: ComAtprotoLabelDefsLabelValueDefinitionStrings; } class FollowGraphBskyAppClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("app.bsky.graph.follow", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("app.bsky.graph.follow", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("app.bsky.graph.follow", params); } async createRecord( record: AppBskyGraphFollow, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "app.bsky.graph.follow", record, useSelfRkey, ); } async updateRecord( rkey: string, record: AppBskyGraphFollow, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "app.bsky.graph.follow", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("app.bsky.graph.follow", rkey); } } class GraphBskyAppClient { readonly follow: FollowGraphBskyAppClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.follow = new FollowGraphBskyAppClient(client); } } class PostgateFeedBskyAppClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("app.bsky.feed.postgate", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("app.bsky.feed.postgate", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("app.bsky.feed.postgate", params); } async createRecord( record: AppBskyFeedPostgate, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "app.bsky.feed.postgate", record, useSelfRkey, ); } async updateRecord( rkey: string, record: AppBskyFeedPostgate, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "app.bsky.feed.postgate", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("app.bsky.feed.postgate", rkey); } } class ThreadgateFeedBskyAppClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("app.bsky.feed.threadgate", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("app.bsky.feed.threadgate", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("app.bsky.feed.threadgate", params); } async createRecord( record: AppBskyFeedThreadgate, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "app.bsky.feed.threadgate", record, useSelfRkey, ); } async updateRecord( rkey: string, record: AppBskyFeedThreadgate, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "app.bsky.feed.threadgate", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("app.bsky.feed.threadgate", rkey); } } class FeedBskyAppClient { readonly postgate: PostgateFeedBskyAppClient; readonly threadgate: ThreadgateFeedBskyAppClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.postgate = new PostgateFeedBskyAppClient(client); this.threadgate = new ThreadgateFeedBskyAppClient(client); } } class ProfileActorBskyAppClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("app.bsky.actor.profile", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("app.bsky.actor.profile", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("app.bsky.actor.profile", params); } async createRecord( record: AppBskyActorProfile, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "app.bsky.actor.profile", record, useSelfRkey, ); } async updateRecord( rkey: string, record: AppBskyActorProfile, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "app.bsky.actor.profile", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("app.bsky.actor.profile", rkey); } } class ActorBskyAppClient { readonly profile: ProfileActorBskyAppClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.profile = new ProfileActorBskyAppClient(client); } } class BskyAppClient { readonly graph: GraphBskyAppClient; readonly feed: FeedBskyAppClient; readonly actor: ActorBskyAppClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.graph = new GraphBskyAppClient(client); this.feed = new FeedBskyAppClient(client); this.actor = new ActorBskyAppClient(client); } } class AppClient { readonly bsky: BskyAppClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.bsky = new BskyAppClient(client); } } class RequestWaitlistSlicesNetworkClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords( "network.slices.waitlist.request", params, ); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord( "network.slices.waitlist.request", params, ); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords( "network.slices.waitlist.request", params, ); } async createRecord( record: NetworkSlicesWaitlistRequest, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "network.slices.waitlist.request", record, useSelfRkey, ); } async updateRecord( rkey: string, record: NetworkSlicesWaitlistRequest, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "network.slices.waitlist.request", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord( "network.slices.waitlist.request", rkey, ); } } class InviteWaitlistSlicesNetworkClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords( "network.slices.waitlist.invite", params, ); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord( "network.slices.waitlist.invite", params, ); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords( "network.slices.waitlist.invite", params, ); } async createRecord( record: NetworkSlicesWaitlistInvite, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "network.slices.waitlist.invite", record, useSelfRkey, ); } async updateRecord( rkey: string, record: NetworkSlicesWaitlistInvite, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "network.slices.waitlist.invite", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord( "network.slices.waitlist.invite", rkey, ); } } class WaitlistSlicesNetworkClient { readonly request: RequestWaitlistSlicesNetworkClient; readonly invite: InviteWaitlistSlicesNetworkClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.request = new RequestWaitlistSlicesNetworkClient(client); this.invite = new InviteWaitlistSlicesNetworkClient(client); } } class SliceSlicesNetworkClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("network.slices.slice", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("network.slices.slice", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("network.slices.slice", params); } async createRecord( record: NetworkSlicesSlice, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "network.slices.slice", record, useSelfRkey, ); } async updateRecord( rkey: string, record: NetworkSlicesSlice, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord("network.slices.slice", rkey, record); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("network.slices.slice", rkey); } async syncUserCollections( input: NetworkSlicesSliceSyncUserCollectionsInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceSyncUserCollectionsOutput >("network.slices.slice.syncUserCollections", "POST", input); } async getSparklines( input: NetworkSlicesSliceGetSparklinesInput, ): Promise { return await this.client.makeRequest( "network.slices.slice.getSparklines", "POST", input, ); } async getJobLogs( params?: NetworkSlicesSliceGetJobLogsParams, ): Promise { return await this.client.makeRequest( "network.slices.slice.getJobLogs", "GET", params, ); } async getJetstreamStatus(): Promise< NetworkSlicesSliceGetJetstreamStatusOutput > { return await this.client.makeRequest< NetworkSlicesSliceGetJetstreamStatusOutput >("network.slices.slice.getJetstreamStatus", "GET", {}); } async getSyncSummary( params?: NetworkSlicesSliceGetSyncSummaryParams, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceGetSyncSummaryOutput >("network.slices.slice.getSyncSummary", "GET", params); } async getJobStatus( params?: NetworkSlicesSliceGetJobStatusParams, ): Promise { return await this.client.makeRequest( "network.slices.slice.getJobStatus", "GET", params, ); } async getActors( input: NetworkSlicesSliceGetActorsInput, ): Promise { return await this.client.makeRequest( "network.slices.slice.getActors", "POST", input, ); } async clearSliceRecords( input: NetworkSlicesSliceClearSliceRecordsInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceClearSliceRecordsOutput >("network.slices.slice.clearSliceRecords", "POST", input); } async deleteOAuthClient( input: NetworkSlicesSliceDeleteOAuthClientInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceDeleteOAuthClientOutput >("network.slices.slice.deleteOAuthClient", "POST", input); } async createOAuthClient( input: NetworkSlicesSliceCreateOAuthClientInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceCreateOAuthClientOutput >("network.slices.slice.createOAuthClient", "POST", input); } async getJetstreamLogs( params?: NetworkSlicesSliceGetJetstreamLogsParams, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceGetJetstreamLogsOutput >("network.slices.slice.getJetstreamLogs", "GET", params); } async getSliceRecords( input: NetworkSlicesSliceGetSliceRecordsInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceGetSliceRecordsOutput >("network.slices.slice.getSliceRecords", "POST", input); } async startSync( input: NetworkSlicesSliceStartSyncInput, ): Promise { return await this.client.makeRequest( "network.slices.slice.startSync", "POST", input, ); } async getJobHistory( params?: NetworkSlicesSliceGetJobHistoryParams, ): Promise { return await this.client.makeRequest( "network.slices.slice.getJobHistory", "GET", params, ); } async stats( params?: NetworkSlicesSliceStatsParams, ): Promise { return await this.client.makeRequest( "network.slices.slice.stats", "GET", params, ); } async updateOAuthClient( input: NetworkSlicesSliceUpdateOAuthClientInput, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceUpdateOAuthClientOutput >("network.slices.slice.updateOAuthClient", "POST", input); } async getOAuthClients( params?: NetworkSlicesSliceGetOAuthClientsParams, ): Promise { return await this.client.makeRequest< NetworkSlicesSliceGetOAuthClientsOutput >("network.slices.slice.getOAuthClients", "GET", params); } } class LexiconSlicesNetworkClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("network.slices.lexicon", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("network.slices.lexicon", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords("network.slices.lexicon", params); } async createRecord( record: NetworkSlicesLexicon, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "network.slices.lexicon", record, useSelfRkey, ); } async updateRecord( rkey: string, record: NetworkSlicesLexicon, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "network.slices.lexicon", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("network.slices.lexicon", rkey); } } class ProfileActorSlicesNetworkClient { private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; } async getRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise> { return await this.client.getRecords("network.slices.actor.profile", params); } async getRecord( params: GetRecordParams, ): Promise> { return await this.client.getRecord("network.slices.actor.profile", params); } async countRecords( params?: { limit?: number; cursor?: string; where?: { [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; orWhere?: { [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: WhereCondition; }; sortBy?: SortField[]; }, ): Promise { return await this.client.countRecords( "network.slices.actor.profile", params, ); } async createRecord( record: NetworkSlicesActorProfile, useSelfRkey?: boolean, ): Promise<{ uri: string; cid: string }> { return await this.client.createRecord( "network.slices.actor.profile", record, useSelfRkey, ); } async updateRecord( rkey: string, record: NetworkSlicesActorProfile, ): Promise<{ uri: string; cid: string }> { return await this.client.updateRecord( "network.slices.actor.profile", rkey, record, ); } async deleteRecord(rkey: string): Promise { return await this.client.deleteRecord("network.slices.actor.profile", rkey); } } class ActorSlicesNetworkClient { readonly profile: ProfileActorSlicesNetworkClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.profile = new ProfileActorSlicesNetworkClient(client); } } class SlicesNetworkClient { readonly waitlist: WaitlistSlicesNetworkClient; readonly slice: SliceSlicesNetworkClient; readonly lexicon: LexiconSlicesNetworkClient; readonly actor: ActorSlicesNetworkClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.waitlist = new WaitlistSlicesNetworkClient(client); this.slice = new SliceSlicesNetworkClient(client); this.lexicon = new LexiconSlicesNetworkClient(client); this.actor = new ActorSlicesNetworkClient(client); } } class NetworkClient { readonly slices: SlicesNetworkClient; private readonly client: SlicesClient; constructor(client: SlicesClient) { this.client = client; this.slices = new SlicesNetworkClient(client); } } export class AtProtoClient extends SlicesClient { readonly app: AppClient; readonly network: NetworkClient; readonly oauth?: OAuthClient | AuthProvider; constructor( baseUrl: string, sliceUri: string, oauthClient?: OAuthClient | AuthProvider, ) { super(baseUrl, sliceUri, oauthClient); this.app = new AppClient(this); this.network = new NetworkClient(this); this.oauth = oauthClient; } }