diff --git a/lib/types/farcaster-types.js b/lib/types/farcaster-types.js --- a/lib/types/farcaster-types.js +++ b/lib/types/farcaster-types.js @@ -13,3 +13,17 @@ +type: 'farcaster_data', +fid: string, }; + +export type FarcasterUser = { + +fid: number, + +viewerContext: { + +following: boolean, + }, + ... +}; + +export type FarcasterChannel = { + +id: string, + +name: string, + ... +}; diff --git a/lib/utils/neynar-client.js b/lib/utils/neynar-client.js --- a/lib/utils/neynar-client.js +++ b/lib/utils/neynar-client.js @@ -3,14 +3,10 @@ import invariant from 'invariant'; import { getMessageForException } from './errors.js'; - -type FarcasterUser = { - +fid: number, - +viewerContext: { - +following: boolean, - }, - ... -}; +import type { + FarcasterChannel, + FarcasterUser, +} from '../types/farcaster-types.js'; type FetchFollowersResponse = { +result: { @@ -21,12 +17,6 @@ }, }; -type FarcasterChannel = { - +id: string, - +name: string, - ... -}; - type FetchFollowedFarcasterChannelsResponse = { +channels: $ReadOnlyArray, +next: {