Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Dec 18, 2024
1 parent fecc0eb commit 6e398be
Show file tree
Hide file tree
Showing 289 changed files with 3,360 additions and 4,052 deletions.
60 changes: 45 additions & 15 deletions packages/api/src/client/types/app/bsky/actor/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export interface ProfileViewBasic {
[k: string]: unknown
}

export function isProfileViewBasic(v: unknown): v is ProfileViewBasic & {
export function isProfileViewBasic(
v: unknown,
): v is ProfileViewBasic & {
$type: $Type<'app.bsky.actor.defs', 'profileViewBasic'>
} {
return is$typed(v, id, 'profileViewBasic')
Expand Down Expand Up @@ -83,7 +85,9 @@ export interface ProfileViewDetailed {
[k: string]: unknown
}

export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed & {
export function isProfileViewDetailed(
v: unknown,
): v is ProfileViewDetailed & {
$type: $Type<'app.bsky.actor.defs', 'profileViewDetailed'>
} {
return is$typed(v, id, 'profileViewDetailed')
Expand All @@ -105,7 +109,9 @@ export interface ProfileAssociated {
[k: string]: unknown
}

export function isProfileAssociated(v: unknown): v is ProfileAssociated & {
export function isProfileAssociated(
v: unknown,
): v is ProfileAssociated & {
$type: $Type<'app.bsky.actor.defs', 'profileAssociated'>
} {
return is$typed(v, id, 'profileAssociated')
Expand Down Expand Up @@ -171,7 +177,9 @@ export interface KnownFollowers {
[k: string]: unknown
}

export function isKnownFollowers(v: unknown): v is KnownFollowers & {
export function isKnownFollowers(
v: unknown,
): v is KnownFollowers & {
$type: $Type<'app.bsky.actor.defs', 'knownFollowers'>
} {
return is$typed(v, id, 'knownFollowers')
Expand Down Expand Up @@ -205,7 +213,9 @@ export interface AdultContentPref {
[k: string]: unknown
}

export function isAdultContentPref(v: unknown): v is AdultContentPref & {
export function isAdultContentPref(
v: unknown,
): v is AdultContentPref & {
$type: $Type<'app.bsky.actor.defs', 'adultContentPref'>
} {
return is$typed(v, id, 'adultContentPref')
Expand All @@ -226,7 +236,9 @@ export interface ContentLabelPref {
[k: string]: unknown
}

export function isContentLabelPref(v: unknown): v is ContentLabelPref & {
export function isContentLabelPref(
v: unknown,
): v is ContentLabelPref & {
$type: $Type<'app.bsky.actor.defs', 'contentLabelPref'>
} {
return is$typed(v, id, 'contentLabelPref')
Expand Down Expand Up @@ -262,7 +274,9 @@ export interface SavedFeedsPrefV2 {
[k: string]: unknown
}

export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 & {
export function isSavedFeedsPrefV2(
v: unknown,
): v is SavedFeedsPrefV2 & {
$type: $Type<'app.bsky.actor.defs', 'savedFeedsPrefV2'>
} {
return is$typed(v, id, 'savedFeedsPrefV2')
Expand All @@ -282,7 +296,9 @@ export interface SavedFeedsPref {
[k: string]: unknown
}

export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref & {
export function isSavedFeedsPref(
v: unknown,
): v is SavedFeedsPref & {
$type: $Type<'app.bsky.actor.defs', 'savedFeedsPref'>
} {
return is$typed(v, id, 'savedFeedsPref')
Expand All @@ -301,7 +317,9 @@ export interface PersonalDetailsPref {
[k: string]: unknown
}

export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref & {
export function isPersonalDetailsPref(
v: unknown,
): v is PersonalDetailsPref & {
$type: $Type<'app.bsky.actor.defs', 'personalDetailsPref'>
} {
return is$typed(v, id, 'personalDetailsPref')
Expand Down Expand Up @@ -357,7 +375,9 @@ export interface ThreadViewPref {
[k: string]: unknown
}

export function isThreadViewPref(v: unknown): v is ThreadViewPref & {
export function isThreadViewPref(
v: unknown,
): v is ThreadViewPref & {
$type: $Type<'app.bsky.actor.defs', 'threadViewPref'>
} {
return is$typed(v, id, 'threadViewPref')
Expand All @@ -376,7 +396,9 @@ export interface InterestsPref {
[k: string]: unknown
}

export function isInterestsPref(v: unknown): v is InterestsPref & {
export function isInterestsPref(
v: unknown,
): v is InterestsPref & {
$type: $Type<'app.bsky.actor.defs', 'interestsPref'>
} {
return is$typed(v, id, 'interestsPref')
Expand Down Expand Up @@ -421,7 +443,9 @@ export interface MutedWordsPref {
[k: string]: unknown
}

export function isMutedWordsPref(v: unknown): v is MutedWordsPref & {
export function isMutedWordsPref(
v: unknown,
): v is MutedWordsPref & {
$type: $Type<'app.bsky.actor.defs', 'mutedWordsPref'>
} {
return is$typed(v, id, 'mutedWordsPref')
Expand All @@ -440,7 +464,9 @@ export interface HiddenPostsPref {
[k: string]: unknown
}

export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref & {
export function isHiddenPostsPref(
v: unknown,
): v is HiddenPostsPref & {
$type: $Type<'app.bsky.actor.defs', 'hiddenPostsPref'>
} {
return is$typed(v, id, 'hiddenPostsPref')
Expand Down Expand Up @@ -476,7 +502,9 @@ export interface LabelerPrefItem {
[k: string]: unknown
}

export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem & {
export function isLabelerPrefItem(
v: unknown,
): v is LabelerPrefItem & {
$type: $Type<'app.bsky.actor.defs', 'labelerPrefItem'>
} {
return is$typed(v, id, 'labelerPrefItem')
Expand All @@ -499,7 +527,9 @@ export interface BskyAppStatePref {
[k: string]: unknown
}

export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref & {
export function isBskyAppStatePref(
v: unknown,
): v is BskyAppStatePref & {
$type: $Type<'app.bsky.actor.defs', 'bskyAppStatePref'>
} {
return is$typed(v, id, 'bskyAppStatePref')
Expand Down
4 changes: 3 additions & 1 deletion packages/api/src/client/types/app/bsky/embed/external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export interface ViewExternal {
[k: string]: unknown
}

export function isViewExternal(v: unknown): v is ViewExternal & {
export function isViewExternal(
v: unknown,
): v is ViewExternal & {
$type: $Type<'app.bsky.embed.external', 'viewExternal'>
} {
return is$typed(v, id, 'viewExternal')
Expand Down
8 changes: 6 additions & 2 deletions packages/api/src/client/types/app/bsky/embed/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export interface ViewNotFound {
[k: string]: unknown
}

export function isViewNotFound(v: unknown): v is ViewNotFound & {
export function isViewNotFound(
v: unknown,
): v is ViewNotFound & {
$type: $Type<'app.bsky.embed.record', 'viewNotFound'>
} {
return is$typed(v, id, 'viewNotFound')
Expand Down Expand Up @@ -138,7 +140,9 @@ export interface ViewDetached {
[k: string]: unknown
}

export function isViewDetached(v: unknown): v is ViewDetached & {
export function isViewDetached(
v: unknown,
): v is ViewDetached & {
$type: $Type<'app.bsky.embed.record', 'viewDetached'>
} {
return is$typed(v, id, 'viewDetached')
Expand Down
24 changes: 18 additions & 6 deletions packages/api/src/client/types/app/bsky/feed/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export interface ThreadViewPost {
[k: string]: unknown
}

export function isThreadViewPost(v: unknown): v is ThreadViewPost & {
export function isThreadViewPost(
v: unknown,
): v is ThreadViewPost & {
$type: $Type<'app.bsky.feed.defs', 'threadViewPost'>
} {
return is$typed(v, id, 'threadViewPost')
Expand Down Expand Up @@ -228,7 +230,9 @@ export interface BlockedAuthor {
[k: string]: unknown
}

export function isBlockedAuthor(v: unknown): v is BlockedAuthor & {
export function isBlockedAuthor(
v: unknown,
): v is BlockedAuthor & {
$type: $Type<'app.bsky.feed.defs', 'blockedAuthor'>
} {
return is$typed(v, id, 'blockedAuthor')
Expand Down Expand Up @@ -258,7 +262,9 @@ export interface GeneratorView {
[k: string]: unknown
}

export function isGeneratorView(v: unknown): v is GeneratorView & {
export function isGeneratorView(
v: unknown,
): v is GeneratorView & {
$type: $Type<'app.bsky.feed.defs', 'generatorView'>
} {
return is$typed(v, id, 'generatorView')
Expand Down Expand Up @@ -302,7 +308,9 @@ export interface SkeletonFeedPost {
[k: string]: unknown
}

export function isSkeletonFeedPost(v: unknown): v is SkeletonFeedPost & {
export function isSkeletonFeedPost(
v: unknown,
): v is SkeletonFeedPost & {
$type: $Type<'app.bsky.feed.defs', 'skeletonFeedPost'>
} {
return is$typed(v, id, 'skeletonFeedPost')
Expand Down Expand Up @@ -339,7 +347,9 @@ export interface SkeletonReasonPin {
[k: string]: unknown
}

export function isSkeletonReasonPin(v: unknown): v is SkeletonReasonPin & {
export function isSkeletonReasonPin(
v: unknown,
): v is SkeletonReasonPin & {
$type: $Type<'app.bsky.feed.defs', 'skeletonReasonPin'>
} {
return is$typed(v, id, 'skeletonReasonPin')
Expand All @@ -360,7 +370,9 @@ export interface ThreadgateView {
[k: string]: unknown
}

export function isThreadgateView(v: unknown): v is ThreadgateView & {
export function isThreadgateView(
v: unknown,
): v is ThreadgateView & {
$type: $Type<'app.bsky.feed.defs', 'threadgateView'>
} {
return is$typed(v, id, 'threadgateView')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export interface Links {
[k: string]: unknown
}

export function isLinks(v: unknown): v is Links & {
export function isLinks(
v: unknown,
): v is Links & {
$type: $Type<'app.bsky.feed.describeFeedGenerator', 'links'>
} {
return is$typed(v, id, 'links')
Expand Down
4 changes: 3 additions & 1 deletion packages/api/src/client/types/app/bsky/feed/postgate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export interface DisableRule {
[k: string]: unknown
}

export function isDisableRule(v: unknown): v is DisableRule & {
export function isDisableRule(
v: unknown,
): v is DisableRule & {
$type: $Type<'app.bsky.feed.postgate', 'disableRule'>
} {
return is$typed(v, id, 'disableRule')
Expand Down
8 changes: 6 additions & 2 deletions packages/api/src/client/types/app/bsky/feed/threadgate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export interface MentionRule {
[k: string]: unknown
}

export function isMentionRule(v: unknown): v is MentionRule & {
export function isMentionRule(
v: unknown,
): v is MentionRule & {
$type: $Type<'app.bsky.feed.threadgate', 'mentionRule'>
} {
return is$typed(v, id, 'mentionRule')
Expand All @@ -56,7 +58,9 @@ export interface FollowingRule {
[k: string]: unknown
}

export function isFollowingRule(v: unknown): v is FollowingRule & {
export function isFollowingRule(
v: unknown,
): v is FollowingRule & {
$type: $Type<'app.bsky.feed.threadgate', 'followingRule'>
} {
return is$typed(v, id, 'followingRule')
Expand Down
16 changes: 12 additions & 4 deletions packages/api/src/client/types/app/bsky/graph/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export interface ListViewBasic {
[k: string]: unknown
}

export function isListViewBasic(v: unknown): v is ListViewBasic & {
export function isListViewBasic(
v: unknown,
): v is ListViewBasic & {
$type: $Type<'app.bsky.graph.defs', 'listViewBasic'>
} {
return is$typed(v, id, 'listViewBasic')
Expand Down Expand Up @@ -98,7 +100,9 @@ export interface StarterPackView {
[k: string]: unknown
}

export function isStarterPackView(v: unknown): v is StarterPackView & {
export function isStarterPackView(
v: unknown,
): v is StarterPackView & {
$type: $Type<'app.bsky.graph.defs', 'starterPackView'>
} {
return is$typed(v, id, 'starterPackView')
Expand Down Expand Up @@ -158,7 +162,9 @@ export interface ListViewerState {
[k: string]: unknown
}

export function isListViewerState(v: unknown): v is ListViewerState & {
export function isListViewerState(
v: unknown,
): v is ListViewerState & {
$type: $Type<'app.bsky.graph.defs', 'listViewerState'>
} {
return is$typed(v, id, 'listViewerState')
Expand All @@ -178,7 +184,9 @@ export interface NotFoundActor {
[k: string]: unknown
}

export function isNotFoundActor(v: unknown): v is NotFoundActor & {
export function isNotFoundActor(
v: unknown,
): v is NotFoundActor & {
$type: $Type<'app.bsky.graph.defs', 'notFoundActor'>
} {
return is$typed(v, id, 'notFoundActor')
Expand Down
12 changes: 9 additions & 3 deletions packages/api/src/client/types/app/bsky/labeler/defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export interface LabelerViewDetailed {
[k: string]: unknown
}

export function isLabelerViewDetailed(v: unknown): v is LabelerViewDetailed & {
export function isLabelerViewDetailed(
v: unknown,
): v is LabelerViewDetailed & {
$type: $Type<'app.bsky.labeler.defs', 'labelerViewDetailed'>
} {
return is$typed(v, id, 'labelerViewDetailed')
Expand All @@ -64,7 +66,9 @@ export interface LabelerViewerState {
[k: string]: unknown
}

export function isLabelerViewerState(v: unknown): v is LabelerViewerState & {
export function isLabelerViewerState(
v: unknown,
): v is LabelerViewerState & {
$type: $Type<'app.bsky.labeler.defs', 'labelerViewerState'>
} {
return is$typed(v, id, 'labelerViewerState')
Expand All @@ -85,7 +89,9 @@ export interface LabelerPolicies {
[k: string]: unknown
}

export function isLabelerPolicies(v: unknown): v is LabelerPolicies & {
export function isLabelerPolicies(
v: unknown,
): v is LabelerPolicies & {
$type: $Type<'app.bsky.labeler.defs', 'labelerPolicies'>
} {
return is$typed(v, id, 'labelerPolicies')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export interface Notification {
[k: string]: unknown
}

export function isNotification(v: unknown): v is Notification & {
export function isNotification(
v: unknown,
): v is Notification & {
$type: $Type<'app.bsky.notification.listNotifications', 'notification'>
} {
return is$typed(v, id, 'notification')
Expand Down
Loading

0 comments on commit 6e398be

Please sign in to comment.