This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add get mentions and replies api
- Loading branch information
1 parent
edd782d
commit 27b1e17
Showing
5 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
CHANGELOG.md | ||
dist | ||
example/.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Address, Hash } from 'viem' | ||
|
||
export type Notification = { | ||
hash: Hash | ||
parentHash: Hash | null | ||
parentUrl: string | null | ||
parentAuthor: { | ||
fid: string | null | ||
} | ||
author: { | ||
fid: number | ||
custodyAddress: Address | ||
username: string | ||
displayName: string | ||
pfp: { | ||
url: string | ||
} | ||
profile: { | ||
bio: { | ||
text: string | ||
mentions: [] // Known bug - this is always empty | ||
} | ||
} | ||
followerCount: number | ||
followingCount: number | ||
verifications: Address[] | ||
activeStatus: 'active' | 'inactive' | ||
} | ||
text: string | ||
timestamp: string | ||
embeds: { url: string }[] | ||
type: 'cast-mention' | 'cast-reply' | ||
reactions: { | ||
count: number | ||
fids: number[] | ||
} | ||
recasts: { | ||
count: number | ||
fids: number[] | ||
} | ||
recasters: string[] | ||
replies: { | ||
count: number | ||
} | ||
threadHash: Hash | null | ||
} | ||
|
||
export type NotificationWithViewerContext = Notification & { | ||
viewerContext: { | ||
liked: boolean | ||
recasted: boolean | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './Signer' | ||
export * from './Cast' | ||
export * from './Notification' | ||
export * from './User' |