UNPKG

@atproto/api

Version:

Client library for atproto and Bluesky

1,710 lines (1,709 loc) 588 kB
/** * GENERATED CODE - DO NOT MODIFY */ import { type LexiconDoc, Lexicons, ValidationError, type ValidationResult, } from '@atproto/lexicon' import { type $Typed, is$typed, maybe$typed } from './util.js' export const schemaDict = { AppBskyActorDefs: { lexicon: 1, id: 'app.bsky.actor.defs', defs: { profileViewBasic: { type: 'object', required: ['did', 'handle'], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, displayName: { type: 'string', maxGraphemes: 64, maxLength: 640, }, pronouns: { type: 'string', }, avatar: { type: 'string', format: 'uri', }, associated: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileAssociated', }, viewer: { type: 'ref', ref: 'lex:app.bsky.actor.defs#viewerState', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, createdAt: { type: 'string', format: 'datetime', }, verification: { type: 'ref', ref: 'lex:app.bsky.actor.defs#verificationState', }, status: { type: 'ref', ref: 'lex:app.bsky.actor.defs#statusView', }, debug: { type: 'unknown', description: 'Debug information for internal development', }, }, }, profileView: { type: 'object', required: ['did', 'handle'], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, displayName: { type: 'string', maxGraphemes: 64, maxLength: 640, }, pronouns: { type: 'string', }, description: { type: 'string', maxGraphemes: 256, maxLength: 2560, }, avatar: { type: 'string', format: 'uri', }, associated: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileAssociated', }, indexedAt: { type: 'string', format: 'datetime', }, createdAt: { type: 'string', format: 'datetime', }, viewer: { type: 'ref', ref: 'lex:app.bsky.actor.defs#viewerState', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, verification: { type: 'ref', ref: 'lex:app.bsky.actor.defs#verificationState', }, status: { type: 'ref', ref: 'lex:app.bsky.actor.defs#statusView', }, debug: { type: 'unknown', description: 'Debug information for internal development', }, }, }, profileViewDetailed: { type: 'object', required: ['did', 'handle'], properties: { did: { type: 'string', format: 'did', }, handle: { type: 'string', format: 'handle', }, displayName: { type: 'string', maxGraphemes: 64, maxLength: 640, }, description: { type: 'string', maxGraphemes: 256, maxLength: 2560, }, pronouns: { type: 'string', }, website: { type: 'string', format: 'uri', }, avatar: { type: 'string', format: 'uri', }, banner: { type: 'string', format: 'uri', }, followersCount: { type: 'integer', }, followsCount: { type: 'integer', }, postsCount: { type: 'integer', }, associated: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileAssociated', }, joinedViaStarterPack: { type: 'ref', ref: 'lex:app.bsky.graph.defs#starterPackViewBasic', }, indexedAt: { type: 'string', format: 'datetime', }, createdAt: { type: 'string', format: 'datetime', }, viewer: { type: 'ref', ref: 'lex:app.bsky.actor.defs#viewerState', }, labels: { type: 'array', items: { type: 'ref', ref: 'lex:com.atproto.label.defs#label', }, }, pinnedPost: { type: 'ref', ref: 'lex:com.atproto.repo.strongRef', }, verification: { type: 'ref', ref: 'lex:app.bsky.actor.defs#verificationState', }, status: { type: 'ref', ref: 'lex:app.bsky.actor.defs#statusView', }, debug: { type: 'unknown', description: 'Debug information for internal development', }, }, }, profileAssociated: { type: 'object', properties: { lists: { type: 'integer', }, feedgens: { type: 'integer', }, starterPacks: { type: 'integer', }, labeler: { type: 'boolean', }, chat: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileAssociatedChat', }, activitySubscription: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileAssociatedActivitySubscription', }, }, }, profileAssociatedChat: { type: 'object', required: ['allowIncoming'], properties: { allowIncoming: { type: 'string', knownValues: ['all', 'none', 'following'], }, }, }, profileAssociatedActivitySubscription: { type: 'object', required: ['allowSubscriptions'], properties: { allowSubscriptions: { type: 'string', knownValues: ['followers', 'mutuals', 'none'], }, }, }, viewerState: { type: 'object', description: "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", properties: { muted: { type: 'boolean', }, mutedByList: { type: 'ref', ref: 'lex:app.bsky.graph.defs#listViewBasic', }, blockedBy: { type: 'boolean', }, blocking: { type: 'string', format: 'at-uri', }, blockingByList: { type: 'ref', ref: 'lex:app.bsky.graph.defs#listViewBasic', }, following: { type: 'string', format: 'at-uri', }, followedBy: { type: 'string', format: 'at-uri', }, knownFollowers: { description: 'This property is present only in selected cases, as an optimization.', type: 'ref', ref: 'lex:app.bsky.actor.defs#knownFollowers', }, activitySubscription: { description: 'This property is present only in selected cases, as an optimization.', type: 'ref', ref: 'lex:app.bsky.notification.defs#activitySubscription', }, }, }, knownFollowers: { type: 'object', description: "The subject's followers whom you also follow", required: ['count', 'followers'], properties: { count: { type: 'integer', }, followers: { type: 'array', minLength: 0, maxLength: 5, items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileViewBasic', }, }, }, }, verificationState: { type: 'object', description: 'Represents the verification information about the user this object is attached to.', required: ['verifications', 'verifiedStatus', 'trustedVerifierStatus'], properties: { verifications: { type: 'array', description: 'All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#verificationView', }, }, 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'], }, }, }, verificationView: { type: 'object', description: 'An individual verification for an associated subject.', required: ['issuer', 'uri', 'isValid', 'createdAt'], properties: { issuer: { type: 'string', description: 'The user who issued this verification.', format: 'did', }, uri: { type: 'string', description: 'The AT-URI of the verification record.', format: 'at-uri', }, isValid: { type: 'boolean', description: 'True if the verification passes validation, otherwise false.', }, createdAt: { type: 'string', description: 'Timestamp when the verification was created.', format: 'datetime', }, }, }, preferences: { type: 'array', items: { type: 'union', refs: [ 'lex:app.bsky.actor.defs#adultContentPref', 'lex:app.bsky.actor.defs#contentLabelPref', 'lex:app.bsky.actor.defs#savedFeedsPref', 'lex:app.bsky.actor.defs#savedFeedsPrefV2', 'lex:app.bsky.actor.defs#personalDetailsPref', 'lex:app.bsky.actor.defs#declaredAgePref', 'lex:app.bsky.actor.defs#feedViewPref', 'lex:app.bsky.actor.defs#threadViewPref', 'lex:app.bsky.actor.defs#interestsPref', 'lex:app.bsky.actor.defs#mutedWordsPref', 'lex:app.bsky.actor.defs#hiddenPostsPref', 'lex:app.bsky.actor.defs#bskyAppStatePref', 'lex:app.bsky.actor.defs#labelersPref', 'lex:app.bsky.actor.defs#postInteractionSettingsPref', 'lex:app.bsky.actor.defs#verificationPrefs', ], }, }, adultContentPref: { type: 'object', required: ['enabled'], properties: { enabled: { type: 'boolean', default: false, }, }, }, contentLabelPref: { type: 'object', required: ['label', 'visibility'], properties: { labelerDid: { type: 'string', description: 'Which labeler does this preference apply to? If undefined, applies globally.', format: 'did', }, label: { type: 'string', }, visibility: { type: 'string', knownValues: ['ignore', 'show', 'warn', 'hide'], }, }, }, 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', }, }, }, savedFeedsPrefV2: { type: 'object', required: ['items'], properties: { items: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#savedFeed', }, }, }, }, savedFeedsPref: { type: 'object', required: ['pinned', 'saved'], properties: { pinned: { type: 'array', items: { type: 'string', format: 'at-uri', }, }, saved: { type: 'array', items: { type: 'string', format: 'at-uri', }, }, timelineIndex: { type: 'integer', }, }, }, personalDetailsPref: { type: 'object', properties: { birthDate: { type: 'string', format: 'datetime', description: 'The birth date of account owner.', }, }, }, declaredAgePref: { type: 'object', 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.", 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.', }, }, }, 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.', }, hideRepliesByUnfollowed: { type: 'boolean', description: 'Hide replies in the feed if they are not by followed users.', default: true, }, hideRepliesByLikeCount: { type: 'integer', description: 'Hide replies in the feed if they do not have this number of likes.', }, hideReposts: { type: 'boolean', description: 'Hide reposts in the feed.', }, hideQuotePosts: { type: 'boolean', description: 'Hide quote posts in the feed.', }, }, }, threadViewPref: { type: 'object', properties: { sort: { type: 'string', description: 'Sorting mode for threads.', knownValues: [ 'oldest', 'newest', 'most-likes', 'random', 'hotness', ], }, }, }, interestsPref: { type: 'object', required: ['tags'], properties: { tags: { type: 'array', maxLength: 100, items: { type: 'string', maxLength: 640, maxGraphemes: 64, }, description: "A list of tags which describe the account owner's interests gathered during onboarding.", }, }, }, mutedWordTarget: { type: 'string', knownValues: ['content', 'tag'], maxLength: 640, maxGraphemes: 64, }, mutedWord: { type: 'object', description: 'A word that the account owner has muted.', required: ['value', 'targets'], properties: { id: { type: 'string', }, value: { type: 'string', description: 'The muted word itself.', maxLength: 10000, maxGraphemes: 1000, }, targets: { type: 'array', description: 'The intended targets of the muted word.', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#mutedWordTarget', }, }, actorTarget: { type: 'string', description: 'Groups of users to apply the muted word to. If undefined, applies to all users.', knownValues: ['all', 'exclude-following'], default: 'all', }, expiresAt: { type: 'string', format: 'datetime', description: 'The date and time at which the muted word will expire and no longer be applied.', }, }, }, mutedWordsPref: { type: 'object', required: ['items'], properties: { items: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#mutedWord', }, description: 'A list of words the account owner has muted.', }, }, }, 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.', }, }, }, labelersPref: { type: 'object', required: ['labelers'], properties: { labelers: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#labelerPrefItem', }, }, }, }, labelerPrefItem: { type: 'object', required: ['did'], properties: { did: { type: 'string', format: 'did', }, }, }, bskyAppStatePref: { description: "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", type: 'object', properties: { activeProgressGuide: { type: 'ref', ref: 'lex:app.bsky.actor.defs#bskyAppProgressGuide', }, queuedNudges: { description: 'An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.', type: 'array', maxLength: 1000, items: { type: 'string', maxLength: 100, }, }, nuxs: { description: 'Storage for NUXs the user has encountered.', type: 'array', maxLength: 100, items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#nux', }, }, }, }, bskyAppProgressGuide: { description: 'If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.', type: 'object', required: ['guide'], properties: { guide: { type: 'string', maxLength: 100, }, }, }, nux: { type: 'object', description: 'A new user experiences (NUX) storage object', required: ['id', 'completed'], properties: { id: { type: 'string', maxLength: 100, }, completed: { type: 'boolean', default: false, }, data: { description: 'Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.', type: 'string', maxLength: 3000, maxGraphemes: 300, }, expiresAt: { type: 'string', format: 'datetime', description: 'The date and time at which the NUX will expire and should be considered completed.', }, }, }, verificationPrefs: { type: 'object', description: 'Preferences for how verified accounts appear in the app.', required: [], properties: { hideBadges: { description: 'Hide the blue check badges for verified accounts and trusted verifiers.', type: 'boolean', default: false, }, }, }, postInteractionSettingsPref: { type: 'object', 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.', required: [], properties: { threadgateAllowRules: { 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.', type: 'array', maxLength: 5, items: { type: 'union', refs: [ 'lex:app.bsky.feed.threadgate#mentionRule', 'lex:app.bsky.feed.threadgate#followerRule', 'lex:app.bsky.feed.threadgate#followingRule', 'lex:app.bsky.feed.threadgate#listRule', ], }, }, postgateEmbeddingRules: { 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.', type: 'array', maxLength: 5, items: { type: 'union', refs: ['lex:app.bsky.feed.postgate#disableRule'], }, }, }, }, statusView: { type: 'object', required: ['status', 'record'], properties: { status: { type: 'string', description: 'The status for the account.', knownValues: ['app.bsky.actor.status#live'], }, record: { type: 'unknown', }, embed: { type: 'union', description: 'An optional embed associated with the status.', refs: ['lex:app.bsky.embed.external#view'], }, expiresAt: { type: 'string', description: 'The date when this status will expire. The application might choose to no longer return the status after expiration.', format: 'datetime', }, isActive: { type: 'boolean', description: 'True if the status is not expired, false if it is expired. Only present if expiration was set.', }, }, }, }, }, AppBskyActorGetPreferences: { lexicon: 1, id: 'app.bsky.actor.getPreferences', defs: { main: { type: 'query', description: 'Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.', parameters: { type: 'params', properties: {}, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['preferences'], properties: { preferences: { type: 'ref', ref: 'lex:app.bsky.actor.defs#preferences', }, }, }, }, }, }, }, AppBskyActorGetProfile: { lexicon: 1, id: 'app.bsky.actor.getProfile', defs: { main: { type: 'query', description: 'Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.', parameters: { type: 'params', required: ['actor'], properties: { actor: { type: 'string', format: 'at-identifier', description: 'Handle or DID of account to fetch profile of.', }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, }, }, AppBskyActorGetProfiles: { lexicon: 1, id: 'app.bsky.actor.getProfiles', defs: { main: { type: 'query', description: 'Get detailed profile views of multiple actors.', parameters: { type: 'params', required: ['actors'], properties: { actors: { type: 'array', items: { type: 'string', format: 'at-identifier', }, maxLength: 25, }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['profiles'], properties: { profiles: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, }, }, }, }, }, AppBskyActorGetSuggestions: { lexicon: 1, id: 'app.bsky.actor.getSuggestions', defs: { main: { type: 'query', description: 'Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.', parameters: { type: 'params', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 50, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['actors'], properties: { cursor: { type: 'string', }, actors: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileView', }, }, recId: { type: 'integer', description: 'Snowflake for this recommendation, use when submitting recommendation events.', }, }, }, }, }, }, }, AppBskyActorProfile: { lexicon: 1, id: 'app.bsky.actor.profile', defs: { main: { type: 'record', description: 'A declaration of a Bluesky 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, }, pronouns: { type: 'string', description: 'Free-form pronouns text.', maxGraphemes: 20, maxLength: 200, }, website: { type: 'string', format: 'uri', }, avatar: { type: 'blob', description: "Small image to be displayed next to posts from account. AKA, 'profile picture'", accept: ['image/png', 'image/jpeg'], maxSize: 1000000, }, banner: { type: 'blob', description: 'Larger horizontal image to display behind profile view.', accept: ['image/png', 'image/jpeg'], maxSize: 1000000, }, labels: { type: 'union', description: 'Self-label values, specific to the Bluesky application, on the overall account.', refs: ['lex:com.atproto.label.defs#selfLabels'], }, joinedViaStarterPack: { type: 'ref', ref: 'lex:com.atproto.repo.strongRef', }, pinnedPost: { type: 'ref', ref: 'lex:com.atproto.repo.strongRef', }, createdAt: { type: 'string', format: 'datetime', }, }, }, }, }, }, AppBskyActorPutPreferences: { lexicon: 1, id: 'app.bsky.actor.putPreferences', defs: { main: { type: 'procedure', description: 'Set the private preferences attached to the account.', input: { encoding: 'application/json', schema: { type: 'object', required: ['preferences'], properties: { preferences: { type: 'ref', ref: 'lex:app.bsky.actor.defs#preferences', }, }, }, }, }, }, }, AppBskyActorSearchActors: { lexicon: 1, id: 'app.bsky.actor.searchActors', defs: { main: { type: 'query', description: 'Find actors (profiles) matching search criteria. Does not require auth.', parameters: { type: 'params', properties: { term: { type: 'string', description: "DEPRECATED: use 'q' instead.", }, q: { type: 'string', description: 'Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.', }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 25, }, cursor: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['actors'], properties: { cursor: { type: 'string', }, actors: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileView', }, }, }, }, }, }, }, }, AppBskyActorSearchActorsTypeahead: { lexicon: 1, id: 'app.bsky.actor.searchActorsTypeahead', defs: { main: { type: 'query', description: 'Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.', parameters: { type: 'params', properties: { term: { type: 'string', description: "DEPRECATED: use 'q' instead.", }, q: { type: 'string', description: 'Search query prefix; not a full query string.', }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10, }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['actors'], properties: { actors: { type: 'array', items: { type: 'ref', ref: 'lex:app.bsky.actor.defs#profileViewBasic', }, }, }, }, }, }, }, }, AppBskyActorStatus: { lexicon: 1, id: 'app.bsky.actor.status', defs: { main: { type: 'record', description: 'A declaration of a Bluesky account status.', key: 'literal:self', record: { type: 'object', required: ['status', 'createdAt'], properties: { status: { type: 'string', description: 'The status for the account.', knownValues: ['app.bsky.actor.status#live'], }, embed: { type: 'union', description: 'An optional embed associated with the status.', refs: ['lex:app.bsky.embed.external'], }, durationMinutes: { type: 'integer', description: 'The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.', minimum: 1, }, createdAt: { type: 'string', format: 'datetime', }, }, }, }, live: { type: 'token', description: 'Advertises an account as currently offering live content.', }, }, }, AppBskyAgeassuranceBegin: { lexicon: 1, id: 'app.bsky.ageassurance.begin', defs: { main: { type: 'procedure', description: 'Initiate Age Assurance for an account.', input: { encoding: 'application/json', schema: { type: 'object', required: ['email', 'language', 'countryCode'], properties: { email: { type: 'string', description: "The user's email address to receive Age Assurance instructions.", }, language: { type: 'string', description: "The user's preferred language for communication during the Age Assurance process.", }, countryCode: { type: 'string', description: "An ISO 3166-1 alpha-2 code of the user's location.", }, regionCode: { type: 'string', description: "An optional ISO 3166-2 code of the user's region or state within the country.", }, }, }, }, output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#state', }, }, errors: [ { name: 'InvalidEmail', }, { name: 'DidTooLong', }, { name: 'InvalidInitiation', }, { name: 'RegionNotSupported', }, ], }, }, }, AppBskyAgeassuranceDefs: { lexicon: 1, id: 'app.bsky.ageassurance.defs', defs: { access: { description: "The access level granted based on Age Assurance data we've processed.", type: 'string', knownValues: ['unknown', 'none', 'safe', 'full'], }, status: { type: 'string', description: 'The status of the Age Assurance process.', knownValues: ['unknown', 'pending', 'assured', 'blocked'], }, state: { type: 'object', description: "The user's computed Age Assurance state.", required: ['status', 'access'], properties: { lastInitiatedAt: { type: 'string', format: 'datetime', description: 'The timestamp when this state was last updated.', }, status: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#status', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, stateMetadata: { type: 'object', description: 'Additional metadata needed to compute Age Assurance state client-side.', required: [], properties: { accountCreatedAt: { type: 'string', format: 'datetime', description: 'The account creation timestamp.', }, }, }, config: { type: 'object', description: '', required: ['regions'], properties: { regions: { type: 'array', description: 'The per-region Age Assurance configuration.', items: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#configRegion', }, }, }, }, configRegion: { type: 'object', description: 'The Age Assurance configuration for a specific region.', required: ['countryCode', 'rules'], properties: { countryCode: { type: 'string', description: 'The ISO 3166-1 alpha-2 country code this configuration applies to.', }, regionCode: { type: 'string', description: 'The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.', }, rules: { type: 'array', description: 'The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.', items: { type: 'union', refs: [ 'lex:app.bsky.ageassurance.defs#configRegionRuleDefault', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan', 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan', ], }, }, }, }, configRegionRuleDefault: { type: 'object', description: 'Age Assurance rule that applies by default.', required: ['access'], properties: { access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfDeclaredOverAge: { type: 'object', description: 'Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age.', required: ['age', 'access'], properties: { age: { type: 'integer', description: 'The age threshold as a whole integer.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfDeclaredUnderAge: { type: 'object', description: 'Age Assurance rule that applies if the user has declared themselves under a certain age.', required: ['age', 'access'], properties: { age: { type: 'integer', description: 'The age threshold as a whole integer.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfAssuredOverAge: { type: 'object', description: 'Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age.', required: ['age', 'access'], properties: { age: { type: 'integer', description: 'The age threshold as a whole integer.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfAssuredUnderAge: { type: 'object', description: 'Age Assurance rule that applies if the user has been assured to be under a certain age.', required: ['age', 'access'], properties: { age: { type: 'integer', description: 'The age threshold as a whole integer.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfAccountNewerThan: { type: 'object', description: 'Age Assurance rule that applies if the account is equal-to or newer than a certain date.', required: ['date', 'access'], properties: { date: { type: 'string', format: 'datetime', description: 'The date threshold as a datetime string.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, configRegionRuleIfAccountOlderThan: { type: 'object', description: 'Age Assurance rule that applies if the account is older than a certain date.', required: ['date', 'access'], properties: { date: { type: 'string', format: 'datetime', description: 'The date threshold as a datetime string.', }, access: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#access', }, }, }, event: { type: 'object', description: 'Object used to store Age Assurance data in stash.', required: ['createdAt', 'status', 'access', 'attemptId', 'countryCode'], properties: { createdAt: { type: 'string', format: 'datetime', description: 'The date and time of this write operation.', }, attemptId: { type: 'string', description: 'The unique identifier for this instance of the Age Assurance flow, in UUID format.', }, status: { type: 'string', description: 'The status of the Age Assurance process.', knownValues: ['unknown', 'pending', 'assured', 'blocked'], }, access: { description: "The access level granted based on Age Assurance data we've processed.", type: 'string', knownValues: ['unknown', 'none', 'safe', 'full'], }, countryCode: { type: 'string', description: 'The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow.', }, regionCode: { type: 'string', description: 'The ISO 3166-2 region code provided when beginning the Age Assurance flow.', }, email: { type: 'string', description: 'The email used for Age Assurance.', }, initIp: { type: 'string', description: 'The IP address used when initiating the Age Assurance flow.', }, initUa: { type: 'string', description: 'The user agent used when initiating the Age Assurance flow.', }, completeIp: { type: 'string', description: 'The IP address used when completing the Age Assurance flow.', }, completeUa: { type: 'string', description: 'The user agent used when completing the Age Assurance flow.', }, }, }, }, }, AppBskyAgeassuranceGetConfig: { lexicon: 1, id: 'app.bsky.ageassurance.getConfig', defs: { main: { type: 'query', description: 'Returns Age Assurance configuration for use on the client.', output: { encoding: 'application/json', schema: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#config', }, }, }, }, }, AppBskyAgeassuranceGetState: { lexicon: 1, id: 'app.bsky.ageassurance.getState', defs: { main: { type: 'query', description: 'Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.', parameters: { type: 'params', required: ['countryCode'], properties: { countryCode: { type: 'string', }, regionCode: { type: 'string', }, }, }, output: { encoding: 'application/json', schema: { type: 'object', required: ['state', 'metadata'], properties: { state: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#state', }, metadata: { type: 'ref', ref: 'lex:app.bsky.ageassurance.defs#stateMetadata', }, }, }, }, }, }, }, AppBskyBookmarkCreateBookmark: { lexicon: 1, id: 'app.bsky.bookmark.createBookmark', defs: { main: { type: 'procedure', description: 'Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.', input: { encoding: 'application/json', schema: { type: 'object', required: ['uri', 'cid'], properties: { uri: { type: 'string', format: 'at-uri', }, cid: { type: 'string', format: 'cid', }, }, }, }, errors: [ { name: 'UnsupportedCollection', description: 'The URI to be bookmarked is for an unsupported collection.', }, ], }, }, }, AppBskyBookmarkDefs: { lexicon: 1, id: 'app.bsky.bookmark.defs', defs: { bookmark: { description: 'Object used to store bookmark data in stash.', type: 'object', required: ['subject'], properties: { subject: { description: 'A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported.', type: 'ref', ref: 'lex:com.atproto.repo.strongRef', }, }, }, bookmarkView: { type: 'object', required: ['subject', 'item'], properties: { subject: { description: 'A strong ref to the bookmarked record.', type: 'ref', ref: 'lex:com.atproto.repo.strongRef', }, createdAt: { type: 'string', format: 'datetime', }, item: { type: 'union', refs: [ 'lex:app.bsky.feed.defs#blockedPost', 'lex:app.bsky.feed.defs#notFoundPost', 'lex:app.bsky.feed.defs#postView', ], }, }, }, }, }, AppBskyBookmarkDeleteBookmark: { lexicon: 1, id: 'app.bsky.bookmark.deleteBookmark', defs: { main: { type: 'procedure', description: 'Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.', input: { encoding: 'application/json', schema: { type: 'object', required: ['uri'], properties: { uri: { type: 'string', format: 'at-uri', }, }, }, }, errors: [ { name: