Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Nov 14, 2024
1 parent 7e43464 commit 7b7a95c
Show file tree
Hide file tree
Showing 864 changed files with 1,882 additions and 2,509 deletions.
190 changes: 98 additions & 92 deletions packages/api/src/client/index.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13576,4 +13576,4 @@ export const ids = {
ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember',
ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers',
ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember',
}
} as const
50 changes: 25 additions & 25 deletions packages/api/src/client/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import * as AppBskyGraphDefs from '../graph/defs'
Expand All @@ -12,6 +12,7 @@ import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
export const id = 'app.bsky.actor.defs'

export interface ProfileViewBasic {
$type?: 'app.bsky.actor.defs#profileViewBasic'
did: string
handle: string
displayName?: string
Expand All @@ -20,7 +21,6 @@ export interface ProfileViewBasic {
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
createdAt?: string
[k: string]: unknown
}

export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & {
Expand All @@ -37,6 +37,7 @@ export function validateProfileViewBasic(v: unknown) {
}

export interface ProfileView {
$type?: 'app.bsky.actor.defs#profileView'
did: string
handle: string
displayName?: string
Expand All @@ -47,7 +48,6 @@ export interface ProfileView {
createdAt?: string
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
[k: string]: unknown
}

export function isProfileView(
Expand All @@ -64,6 +64,7 @@ export function validateProfileView(v: unknown) {
}

export interface ProfileViewDetailed {
$type?: 'app.bsky.actor.defs#profileViewDetailed'
did: string
handle: string
displayName?: string
Expand All @@ -80,7 +81,6 @@ export interface ProfileViewDetailed {
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
pinnedPost?: ComAtprotoRepoStrongRef.Main
[k: string]: unknown
}

export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & {
Expand All @@ -97,12 +97,12 @@ export function validateProfileViewDetailed(v: unknown) {
}

export interface ProfileAssociated {
$type?: 'app.bsky.actor.defs#profileAssociated'
lists?: number
feedgens?: number
starterPacks?: number
labeler?: boolean
chat?: ProfileAssociatedChat
[k: string]: unknown
}

export function isProfileAssociated(v: unknown): v is ProfileAssociated & {
Expand All @@ -119,8 +119,8 @@ export function validateProfileAssociated(v: unknown) {
}

export interface ProfileAssociatedChat {
$type?: 'app.bsky.actor.defs#profileAssociatedChat'
allowIncoming: 'all' | 'none' | 'following' | (string & {})
[k: string]: unknown
}

export function isProfileAssociatedChat(
Expand All @@ -140,6 +140,7 @@ export function validateProfileAssociatedChat(v: unknown) {

/** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */
export interface ViewerState {
$type?: 'app.bsky.actor.defs#viewerState'
muted?: boolean
mutedByList?: AppBskyGraphDefs.ListViewBasic
blockedBy?: boolean
Expand All @@ -148,7 +149,6 @@ export interface ViewerState {
following?: string
followedBy?: string
knownFollowers?: KnownFollowers
[k: string]: unknown
}

export function isViewerState(
Expand All @@ -166,9 +166,9 @@ export function validateViewerState(v: unknown) {

/** The subject's followers whom you also follow */
export interface KnownFollowers {
$type?: 'app.bsky.actor.defs#knownFollowers'
count: number
followers: ProfileViewBasic[]
[k: string]: unknown
}

export function isKnownFollowers(v: unknown): v is KnownFollowers & {
Expand Down Expand Up @@ -201,8 +201,8 @@ export type Preferences = (
)[]

export interface AdultContentPref {
$type?: 'app.bsky.actor.defs#adultContentPref'
enabled: boolean
[k: string]: unknown
}

export function isAdultContentPref(v: unknown): v is AdultContentPref & {
Expand All @@ -219,11 +219,11 @@ export function validateAdultContentPref(v: unknown) {
}

export interface ContentLabelPref {
$type?: 'app.bsky.actor.defs#contentLabelPref'
/** Which labeler does this preference apply to? If undefined, applies globally. */
labelerDid?: string
label: string
visibility: 'ignore' | 'show' | 'warn' | 'hide' | (string & {})
[k: string]: unknown
}

export function isContentLabelPref(v: unknown): v is ContentLabelPref & {
Expand All @@ -240,11 +240,11 @@ export function validateContentLabelPref(v: unknown) {
}

export interface SavedFeed {
$type?: 'app.bsky.actor.defs#savedFeed'
id: string
type: 'feed' | 'list' | 'timeline' | (string & {})
value: string
pinned: boolean
[k: string]: unknown
}

export function isSavedFeed(
Expand All @@ -258,8 +258,8 @@ export function validateSavedFeed(v: unknown) {
}

export interface SavedFeedsPrefV2 {
$type?: 'app.bsky.actor.defs#savedFeedsPrefV2'
items: SavedFeed[]
[k: string]: unknown
}

export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & {
Expand All @@ -276,10 +276,10 @@ export function validateSavedFeedsPrefV2(v: unknown) {
}

export interface SavedFeedsPref {
$type?: 'app.bsky.actor.defs#savedFeedsPref'
pinned: string[]
saved: string[]
timelineIndex?: number
[k: string]: unknown
}

export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & {
Expand All @@ -296,9 +296,9 @@ export function validateSavedFeedsPref(v: unknown) {
}

export interface PersonalDetailsPref {
$type?: 'app.bsky.actor.defs#personalDetailsPref'
/** The birth date of account owner. */
birthDate?: string
[k: string]: unknown
}

export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & {
Expand All @@ -315,6 +315,7 @@ export function validatePersonalDetailsPref(v: unknown) {
}

export interface FeedViewPref {
$type?: 'app.bsky.actor.defs#feedViewPref'
/** The URI of the feed, or an identifier which describes the feed. */
feed: string
/** Hide replies in the feed. */
Expand All @@ -327,7 +328,6 @@ export interface FeedViewPref {
hideReposts?: boolean
/** Hide quote posts in the feed. */
hideQuotePosts?: boolean
[k: string]: unknown
}

export function isFeedViewPref(
Expand All @@ -344,11 +344,11 @@ export function validateFeedViewPref(v: unknown) {
}

export interface ThreadViewPref {
$type?: 'app.bsky.actor.defs#threadViewPref'
/** Sorting mode for threads. */
sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {})
/** Show followed users at the top of all replies. */
prioritizeFollowedUsers?: boolean
[k: string]: unknown
}

export function isThreadViewPref(v: unknown): v is ThreadViewPref & {
Expand All @@ -365,9 +365,9 @@ export function validateThreadViewPref(v: unknown) {
}

export interface InterestsPref {
$type?: 'app.bsky.actor.defs#interestsPref'
/** A list of tags which describe the account owner's interests gathered during onboarding. */
tags: string[]
[k: string]: unknown
}

export function isInterestsPref(v: unknown): v is InterestsPref & {
Expand All @@ -387,6 +387,7 @@ export type MutedWordTarget = 'content' | 'tag' | (string & {})

/** A word that the account owner has muted. */
export interface MutedWord {
$type?: 'app.bsky.actor.defs#mutedWord'
id?: string
/** The muted word itself. */
value: string
Expand All @@ -396,7 +397,6 @@ export interface MutedWord {
actorTarget: 'all' | 'exclude-following' | (string & {})
/** The date and time at which the muted word will expire and no longer be applied. */
expiresAt?: string
[k: string]: unknown
}

export function isMutedWord(
Expand All @@ -410,9 +410,9 @@ export function validateMutedWord(v: unknown) {
}

export interface MutedWordsPref {
$type?: 'app.bsky.actor.defs#mutedWordsPref'
/** A list of words the account owner has muted. */
items: MutedWord[]
[k: string]: unknown
}

export function isMutedWordsPref(v: unknown): v is MutedWordsPref & {
Expand All @@ -429,9 +429,9 @@ export function validateMutedWordsPref(v: unknown) {
}

export interface HiddenPostsPref {
$type?: 'app.bsky.actor.defs#hiddenPostsPref'
/** A list of URIs of posts the account owner has hidden. */
items: string[]
[k: string]: unknown
}

export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & {
Expand All @@ -448,8 +448,8 @@ export function validateHiddenPostsPref(v: unknown) {
}

export interface LabelersPref {
$type?: 'app.bsky.actor.defs#labelersPref'
labelers: LabelerPrefItem[]
[k: string]: unknown
}

export function isLabelersPref(
Expand All @@ -466,8 +466,8 @@ export function validateLabelersPref(v: unknown) {
}

export interface LabelerPrefItem {
$type?: 'app.bsky.actor.defs#labelerPrefItem'
did: string
[k: string]: unknown
}

export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & {
Expand All @@ -485,12 +485,12 @@ export function validateLabelerPrefItem(v: unknown) {

/** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. */
export interface BskyAppStatePref {
$type?: 'app.bsky.actor.defs#bskyAppStatePref'
activeProgressGuide?: BskyAppProgressGuide
/** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */
queuedNudges?: string[]
/** Storage for NUXs the user has encountered. */
nuxs?: Nux[]
[k: string]: unknown
}

export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & {
Expand All @@ -508,8 +508,8 @@ export function validateBskyAppStatePref(v: unknown) {

/** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. */
export interface BskyAppProgressGuide {
$type?: 'app.bsky.actor.defs#bskyAppProgressGuide'
guide: string
[k: string]: unknown
}

export function isBskyAppProgressGuide(
Expand All @@ -529,13 +529,13 @@ export function validateBskyAppProgressGuide(v: unknown) {

/** A new user experiences (NUX) storage object */
export interface Nux {
$type?: 'app.bsky.actor.defs#nux'
id: string
completed: boolean
/** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */
data?: string
/** The date and time at which the NUX will expire and should be considered completed. */
expiresAt?: string
[k: string]: unknown
}

export function isNux(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as AppBskyActorDefs from './defs'

Expand All @@ -16,7 +16,6 @@ export type InputSchema = undefined

export interface OutputSchema {
preferences: AppBskyActorDefs.Preferences
[k: string]: unknown
}

export interface CallOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/actor/getProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as AppBskyActorDefs from './defs'

Expand Down
3 changes: 1 addition & 2 deletions packages/api/src/client/types/app/bsky/actor/getProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as AppBskyActorDefs from './defs'

Expand All @@ -18,7 +18,6 @@ export type InputSchema = undefined

export interface OutputSchema {
profiles: AppBskyActorDefs.ProfileViewDetailed[]
[k: string]: unknown
}

export interface CallOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as AppBskyActorDefs from './defs'

Expand All @@ -20,7 +20,6 @@ export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
actors: AppBskyActorDefs.ProfileView[]
[k: string]: unknown
}

export interface CallOptions {
Expand Down
3 changes: 2 additions & 1 deletion packages/api/src/client/types/app/bsky/actor/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { $Type, is$typed } from '../../../../util'
import { $Type, is$typed, OmitKey } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'

export const id = 'app.bsky.actor.profile'

export interface Record {
$type?: 'app.bsky.actor.profile' | 'app.bsky.actor.profile#main'
displayName?: string
/** Free-form profile description text. */
description?: string
Expand Down
Loading

0 comments on commit 7b7a95c

Please sign in to comment.