import { Logger } from "../common/logger"; import { AxiosError, AxiosInstance } from "axios"; import type { SetRequired } from "type-fest"; import { Configuration } from './configuration'; import type { AppHostGetEventEventEnum, AppHostGetEventResponse, AppHostPostEventResponse, AppHostUserStateResponse, AssociateDeployment200Response, AssociateDeploymentRequest, AuthorizationUrlResponse, BalanceResponse, BanListResponse, BanResponse, BatchGetTokenMetadata200Response, BestFriendsResponse, BlockListResponse, BuildRequest, BulkCastsResponse, BulkFollowResponse, BulkUsersByAddressResponse, BulkUsersResponse, CastEmbedCrawlResponse, CastResponse, CastsMetricsResponse, CastsResponse, CastsSearchResponse, ChannelListResponse, ChannelMemberInviteListResponse, ChannelMemberListResponse, ChannelMemberRole, ChannelResponse, ChannelResponseBulk, ChannelSearchResponse, Conversation, ConversationSummary, CreateDeploymentRequest, CreateX402Signature200Response, CreateX402SignatureRequest, DeleteDeployment200Response, DeleteDeploymentRequest, DeleteRows200Response, DeleteRowsRequest, DeleteSecretsRequest, DeployErc721201Response, DeployErc721Request, DeployFungibleFactoryEnum, DeployFungibleMetadataNsfwEnum, DeployFungibleNetworkEnum, DeployFungibleResponse, DeployToVercel200Response, DeployToVercelRequest, DeveloperManagedSigner, ErrorRes, ExecuteSql200Response, ExecuteSqlRequest, FarcasterActionReqBodyAction, FeedResponse, FetchAllNotificationsTypeEnum, FetchAuthorizationUrlResponseTypeEnum, FetchBulkCastsSortTypeEnum, FetchBulkChannelsTypeEnum, FetchBulkUsersByEthOrSolAddressAddressTypesEnum, FetchCastMetricsIntervalEnum, FetchCastQuotes200Response, FetchCastQuotesTypeEnum, FetchCastReactionsTypesEnum, FetchFeedEmbedTypesEnum, FetchFeedFeedTypeEnum, FetchFeedFilterTypeEnum, FetchFeedForYouProviderEnum, FetchFrameCatalogCategoriesEnum, FetchFrameCatalogNetworksEnum, FetchFrameCatalogTimeWindowEnum, FetchFungibleTrades200Response, FetchFungibleTradesNetworkEnum, FetchFungibleTradesTimeWindowEnum, FetchRelevantFrames200Response, FetchRelevantFramesNetworksEnum, FetchRelevantFramesTimeWindowEnum, FetchRelevantFungibleOwnersNetworkEnum, FetchRepliesAndRecastsForUserFilterEnum, FetchSubscribedToForFidSubscriptionProviderEnum, FetchSubscribersForFidSubscriptionProviderEnum, FetchSubscriptionsForFidSubscriptionProviderEnum, FetchTrendingChannelsTimeWindowEnum, FetchTrendingFeedProviderEnum, FetchTrendingFeedTimeWindowEnum, FetchTrendingFungibles200Response, FetchTrendingFungiblesNetworkEnum, FetchTrendingFungiblesTimeWindowEnum, FetchUserBalanceNetworksEnum, FetchUserFollowersSortTypeEnum, FetchUserFollowingSortTypeEnum, FetchUserInteractions200Response, FetchUserInteractionsTypeEnum, FetchUserReactionsTypeEnum, FetchUserReciprocalFollowers200Response, FetchUserReciprocalFollowersSortTypeEnum, FetchVerifications200Response, FnameAvailabilityResponse, FollowersResponse, FrameCatalogResponse, FrameNotificationTokens, FramePayTransactionReqBodyTransaction, FungiblesResponseSchema, GetAccountAssociation200Response, GetConversationMessages200Response, GetDeploymentFile200Response, GetDevStatus200Response, GetNotificationCampaignStats200Response, GetTableSchema200Response, GetTokenMetadata200Response, GetWalletBalances200Response, InsertRows200Response, InsertRowsRequest, ListConversations200Response, ListDeploymentFiles200Response, ListDeployments200ResponseInner, ListSecrets200Response, ListTables200Response, LookupCastByHashOrUrlTypeEnum, LookupCastConversationFoldEnum, LookupCastConversationSortTypeEnum, LookupCastConversationTypeEnum, LookupChannelTypeEnum, MintNft200Response, MintNftRequest, MuteListResponse, MuteResponse, NonceResponse, NotificationType, NotificationsResponse, OperationResponse, PostCastReqBodyEmbeds, PostCastResponse, PromptDeploymentStreamRequest, QueryTable200Response, QueryTableRequest, ReactionType, ReactionsCastResponse, ReactionsResponse, RecoverRequest, RegisterSignedKeyForDeveloperManagedAuthAddress200Response, RegisterUserOnChainReqBodyPreRegistrationCallsInner, RegisterUserOnChainReqBodyRegistration, RegisterUserOnChainReqBodySignersInner, RegisterUserOnChainResponse, RegisterUserReqBodyMetadata, RegisterUserReqBodySigner, RegisterUserResponse, RelevantFollowersResponse, RelevantFungibleOwnersResponse, SearchCastsModeEnum, SearchCastsSortTypeEnum, SearchFramesNetworksEnum, SendFrameNotificationsReqBodyFilters, SendFrameNotificationsReqBodyNotification, SendFrameNotificationsResponse, SignedKeyRequestSponsor, Signer, SignerListResponse, SimulateNftMintNetworkEnum, SimulateNftMintResponse, StartApp200Response, StartAppRequest, StorageAllocationsResponse, StorageUsageResponse, SubscribedToResponse, SubscribersResponse, SubscriptionCheckResponse, SubscriptionsResponse, TransactionFrameConfig, TransactionFrameResponse, TransactionSendFungiblesRecipient, TransactionSendFungiblesReqBodyNetworkEnum, TransactionSendFungiblesResponse, TrendingChannelResponse, TrendingTopicsResponse, UpdateRows200Response, UpdateRowsRequest, UpdateUserReqBodyLocation, UpdateUserReqBodyVerifiedAccounts, UploadImage200Response, UploadImageUrlRequest, UpsertSecrets200Response, UpsertSecretsRequest, UserFIDResponse, UserResponse, UserSearchResponse, UsersActiveChannelsResponse, UsersResponse, VercelDeploymentLogs200Response, VercelDeploymentStatus200Response, VerificationChainId, VerificationType, WebhookListResponse, WebhookPatchReqBodyActiveEnum, WebhookResponse, WebhookSubscriptionFilters } from '../api'; export interface NeynarAPIClientOptions { logger?: Logger; axiosInstance?: AxiosInstance; } export declare class NeynarAPIClient { private readonly logger; private config; private readonly apis; constructor(config: Configuration, options?: NeynarAPIClientOptions); static isApiErrorResponse(error: any): error is SetRequired, "response">; /** * Securely communicate and perform actions on behalf of users across different apps. It enables an app to send data or trigger actions in another app on behalf of a mutual user by signing messages using the user\'s Farcaster signer. * * @summary User actions across apps * * @param {object} params * @param {string} params.signerUuid - The signer_uuid of the user on behalf of whom the action is being performed. * @param {string} params.baseUrl - The base URL of the app on which the action is being performed. * @param {FarcasterActionReqBodyAction} params.action * * @returns {Promise<{ [key: string]: any; }>} A promise that resolves to a `{ [key: string]: any; }` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const baseUrl = * const action = * * client.publishFarcasterAction({signerUuid, baseUrl, action}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-farcaster-action) * */ publishFarcasterAction(params: { signerUuid: string; baseUrl: string; action: FarcasterActionReqBodyAction; }): Promise<{ [key: string]: any; }>; /** * Creates a new transaction pay mini app that can be used to collect payments through a mini app * * @summary Create transaction pay mini app * * @param {object} params * @param {FramePayTransactionReqBodyTransaction} params.transaction * @param {TransactionFrameConfig} params.config * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. * * @returns {Promise} A promise that resolves to a `TransactionFrameResponse` object. * * @example * * // Fill in the appropriate values * const transaction = * const config = * const idem = * * client.createTransactionPayFrame({transaction, config, idem}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-transaction-pay-frame) * */ createTransactionPayFrame(params: { transaction: FramePayTransactionReqBodyTransaction; config: TransactionFrameConfig; idem?: string; }): Promise; /** * Returns a list of interactions between two users * * @summary User interactions * * @param {object} params * @param {number[]} params.fids - Comma separated list of two FIDs * @param {Array} params.type [optional] - Comma seperated list of Interaction type to fetch * * @returns {Promise} A promise that resolves to a `FetchUserInteractions200Response` object. * * @example * * // Fill in the appropriate values * const fids = * const type = * * client.fetchUserInteractions({ fids, type }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-interactions) * */ fetchUserInteractions(params: { fids: number[]; type?: Array; }): Promise; /** * Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents. * * @summary Cast conversation summary * * @param {object} params * @param {string} params.identifier - Cast identifier (It's either a URL or a hash)) * @param {number} params.limit [optional] - Number of casts to consider in a summary up to a point of target cast (Default: 20, Maximum: 50) * @param {string} params.prompt [optional] - Additional prompt used to generate a summary * * @returns {Promise} A promise that resolves to a `ConversationSummary` object. * * @example * * // Fill in the appropriate values * const identifier = * const limit = * const prompt = * * client.lookupCastConversationSummary({ identifier, limit, prompt }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary) * */ lookupCastConversationSummary(params: { identifier: string; limit?: number; prompt?: string; }): Promise; /** * Returns event object for app host events. Used if the app host intends to sign the event message instead of using Neynar-hosted signers. * * @summary Generate event * * @param {object} params * @param {string} params.appDomain - The domain of the mini app * @param {number} params.fid - The FID of the user who initiated the event * @param {AppHostGetEventEventEnum} params.event - The type of event * * @returns {Promise} A promise that resolves to a `AppHostGetEventResponse` object. * * @example * * // Fill in the appropriate values * const appDomain = * const fid = * const event = * * client.appHostGetEvent({ appDomain, fid, event }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/app-host-get-event) * */ appHostGetEvent(params: { appDomain: string; fid: number; event: AppHostGetEventEventEnum; }): Promise; /** * Returns the current notification state for a specific user across all mini app domains in this app host. Shows which domains have notifications enabled. * * @summary Enabled notifications * * @param {object} params * @param {number} params.fid - The FID of the user * * @returns {Promise} A promise that resolves to a `AppHostUserStateResponse` object. * * @example * * // Fill in the appropriate values * const fid = * * client.appHostGetUserState({ fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/app-host-get-user-state) * */ appHostGetUserState(params: { fid: number; }): Promise; /** * Post an app_host event to the domain\'s webhook. Events such as enabling or disabling notifications for a user. Provide either a signed message or the signer UUID of an authorized neynar-hosted signers. * * @summary Send event * * @param {object} params * @param {any} params.appHostPostEventReqBody * * @returns {Promise} A promise that resolves to a `AppHostPostEventResponse` object. * * @example * * // Fill in the appropriate values * const appHostPostEventReqBody = * * client.appHostPostEvent({appHostPostEventReqBody}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/app-host-post-event) * */ appHostPostEvent(params: { appHostPostEventReqBody: any; }): Promise; /** * Fetches the status of a developer managed auth address by auth address * * @summary Status by auth address * * @param {object} params * @param {string} params.address - Ethereum address * * @returns {Promise} A promise that resolves to a `RegisterSignedKeyForDeveloperManagedAuthAddress200Response` object. * * @example * * // Fill in the appropriate values * const address = * * client.lookupDeveloperManagedAuthAddress({ address }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-developer-managed-auth-address) * */ lookupDeveloperManagedAuthAddress(params: { address: string; }): Promise; /** * Allow apps to register an Ethereum addresses as authorized \"auth addresses\" for a user\'s Farcaster account, enabling seamless Sign-In With Farcaster (SIWF) across applications without repeated custody wallet authorizations. * * @summary Register Signed Key * * @param {object} params * @param {string} params.address - Ethereum address * @param {number} params.appFid - The unique identifier of a farcaster user or app (unsigned integer) * @param {number} params.deadline - unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) * @param {string} params.signature - Signature generated by the custody address of the app. Signed data includes app_fid, deadline, 32 bytes padded auth address. [Refer guide for more details.](https://docs.neynar.com/docs/auth-address-signature-generation) * @param {string} params.redirectUrl [optional] - Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. * @param {SignedKeyRequestSponsor} params.sponsor [optional] * * @returns {Promise} A promise that resolves to a `RegisterSignedKeyForDeveloperManagedAuthAddress200Response` object. * * @example * * // Fill in the appropriate values * const address = * const appFid = * const deadline = * const signature = * const redirectUrl = * const sponsor = * * client.registerSignedKeyForDeveloperManagedAuthAddress({address, appFid, deadline, signature, redirectUrl, sponsor}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-signed-key-for-developer-managed-auth-address) * */ registerSignedKeyForDeveloperManagedAuthAddress(params: { address: string; appFid: number; deadline: number; signature: string; redirectUrl?: string; sponsor?: SignedKeyRequestSponsor; }): Promise; /** * Deletes a list of FIDs from the app associated with your API key. * * @summary Unban FIDs from app * * @param {object} params * @param {Array} params.fids * * @returns {Promise} A promise that resolves to a `BanResponse` object. * * @example * * // Fill in the appropriate values * const fids = * * client.deleteBans({fids}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans) * */ deleteBans(params: { fids: Array; }): Promise; /** * Fetches all FIDs that your app has banned. * * @summary Banned FIDs of app * * @param {object} params * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `BanListResponse` object. * * @example * * // Fill in the appropriate values * const limit = * * client.fetchBanList({ limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list) * */ fetchBanList(params: { limit?: number; cursor?: string; }): Promise; /** * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. * * @summary Ban FIDs from app * * @param {object} params * @param {Array} params.fids * * @returns {Promise} A promise that resolves to a `BanResponse` object. * * @example * * // Fill in the appropriate values * const fids = * * client.publishBans({fids}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans) * */ publishBans(params: { fids: Array; }): Promise; /** * Deletes a block for a given FID. * * @summary Unblock FID * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {number} params.blockedFid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const blockedFid = * * client.deleteBlock({signerUuid, blockedFid}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock(params: { signerUuid: string; blockedFid: number; }): Promise; /** * Fetches all FIDs that a user has blocked or has been blocked by * * @summary Blocked / Blocked by FIDs * * @param {object} params * @param {number} params.blockerFid [optional] - Providing this will return the users that this user has blocked * @param {number} params.blockedFid [optional] - Providing this will return the users that have blocked this user * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `BlockListResponse` object. * * @example * * // Fill in the appropriate values * const blockerFid = * const blockedFid = * const limit = * * client.fetchBlockList({ blockerFid, blockedFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList(params: { blockerFid?: number; blockedFid?: number; limit?: number; cursor?: string; }): Promise; /** * Adds a block for a given FID. * * @summary Block FID * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {number} params.blockedFid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const blockedFid = * * client.publishBlock({signerUuid, blockedFid}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock(params: { signerUuid: string; blockedFid: number; }): Promise; /** * Delete an existing cast. (In order to delete a cast `signer_uuid` must be approved) * * @summary Delete a cast * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.targetHash * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const targetHash = * * client.deleteCast({signerUuid, targetHash}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-cast) * */ deleteCast(params: { signerUuid: string; targetHash: string; }): Promise; /** * Fetch multiple casts using their respective hashes. * * @summary Bulk fetch casts * * @param {object} params * @param {string[]} params.casts - Hashes of the cast to be retrived (Comma separated, no spaces) * @param {number} params.viewerFid [optional] - adds viewer_context to cast object to show whether viewer has liked or recasted the cast. * @param {FetchBulkCastsSortTypeEnum} params.sortType [optional] - Optional parameter to sort the casts based on different criteria * * @returns {Promise} A promise that resolves to a `CastsResponse` object. * * @example * * // Fill in the appropriate values * const casts = * const viewerFid = * const sortType = * * client.fetchBulkCasts({ casts, viewerFid, sortType }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-casts) * */ fetchBulkCasts(params: { casts: string[]; viewerFid?: number; sortType?: FetchBulkCastsSortTypeEnum; }): Promise; /** * Fetch casts that quote a given cast * * @summary Cast Quotes * * @param {object} params * @param {string} params.identifier - Cast identifier (It's either a URL or a hash) * @param {FetchCastQuotesTypeEnum} params.type - The query param accepted by the API. Sent along with identifier param. url - Cast identifier is a url hash - Cast identifier is a hash * @param {number} params.viewerFid [optional] * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FetchCastQuotes200Response` object. * * @example * * // Fill in the appropriate values * const identifier = * const type = * const viewerFid = * const limit = * * client.fetchCastQuotes({ identifier, type, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-quotes) * */ fetchCastQuotes(params: { identifier: string; type: FetchCastQuotesTypeEnum; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Crawls the given URL and returns metadata useful when embedding the URL in a cast. * * @summary Embedded URL metadata * * @param {object} params * @param {string} params.url - URL to crawl metadata of * * @returns {Promise} A promise that resolves to a `CastEmbedCrawlResponse` object. * * @example * * // Fill in the appropriate values * const url = * * client.fetchEmbeddedUrlMetadata({ url }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-embedded-url-metadata) * */ fetchEmbeddedUrlMetadata(params: { url: string; }): Promise; /** * Gets information about an individual cast by passing in a Farcaster web URL or cast hash * * @summary By hash or URL * * @param {object} params * @param {string} params.identifier - Cast identifier (It's either a URL or a hash) * @param {LookupCastByHashOrUrlTypeEnum} params.type - The query param accepted by the API. Sent along with identifier param. url - Cast identifier is a url hash - Cast identifier is a hash * @param {number} params.viewerFid [optional] - adds viewer_context to cast object to show whether viewer has liked or recasted the cast. * * @returns {Promise} A promise that resolves to a `CastResponse` object. * * @example * * // Fill in the appropriate values * const identifier = * const type = * const viewerFid = * * client.lookupCastByHashOrUrl({ identifier, type, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-by-hash-or-url) * */ lookupCastByHashOrUrl(params: { identifier: string; type: LookupCastByHashOrUrlTypeEnum; viewerFid?: number; }): Promise; /** * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. * * @summary Conversation for a cast * * @param {object} params * @param {string} params.identifier - Cast identifier (It's either a URL or a hash) * @param {LookupCastConversationTypeEnum} params.type - The query param accepted by the API. Sent along with identifier param. url - Cast identifier is a url hash - Cast identifier is a hash * @param {number | null} params.replyDepth [optional] - The depth of replies in the conversation that will be returned (default 2) * @param {boolean | null} params.includeChronologicalParentCasts [optional] - Include all parent casts in chronological order * @param {number} params.viewerFid [optional] - Providing this will return a conversation that respects this user's mutes and blocks and includes `viewer_context`. * @param {LookupCastConversationSortTypeEnum} params.sortType [optional] - Sort type for the ordering of descendants. Default is `chron` * @param {LookupCastConversationFoldEnum} params.fold [optional] - Show conversation above or below the fold. Lower quality responses are hidden below the fold. Not passing in a value shows the full conversation without any folding. * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 50) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `Conversation` object. * * @example * * // Fill in the appropriate values * const identifier = * const type = * const replyDepth = * const includeChronologicalParentCasts = * const viewerFid = * const sortType = * const fold = * const limit = * * client.lookupCastConversation({ identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation) * */ lookupCastConversation(params: { identifier: string; type: LookupCastConversationTypeEnum; replyDepth?: number | null; includeChronologicalParentCasts?: boolean | null; viewerFid?: number; sortType?: LookupCastConversationSortTypeEnum; fold?: LookupCastConversationFoldEnum; limit?: number; cursor?: string; }): Promise; /** * Posts a cast or cast reply. Works with mentions and embeds. (In order to post a cast `signer_uuid` must be approved) * * @summary Post a cast * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.text [optional] * @param {Array} params.embeds [optional] * @param {string} params.parent [optional] - parent_url of the channel the cast is in, or hash of the cast * @param {string} params.channelId [optional] - Channel ID of the channel where the cast is to be posted. e.g. neynar, farcaster, warpcast * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. * @param {number} params.parentAuthorFid [optional] - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `PostCastResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const text = * const embeds = * const parent = * const channelId = * const idem = * const parentAuthorFid = * * client.publishCast({signerUuid, text, embeds, parent, channelId, idem, parentAuthorFid}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-cast) * */ publishCast(params: { signerUuid: string; text?: string; embeds?: Array; parent?: string; channelId?: string; idem?: string; parentAuthorFid?: number; }): Promise; /** * Search for casts based on a query string, with optional AND filters * * @summary Search for casts * * @param {object} params * @param {string} params.q - Query string to search for casts. Supported operators: | Operator | Description | | --------- | -------------------------------------------------------------------------------------------------------- | | `+` | Acts as the AND operator. This is the default operator between terms and can usually be omitted. | | `|` | Acts as the OR operator. | | `*` | When used at the end of a term, signifies a prefix query. | | `"` | Wraps several terms into a phrase (for example, `"star wars"`). | | `(`, `)` | Wrap a clause for precedence (for example, `star + (wars | trek)`). | | `~n` | When used after a term (for example, `satr~3`), sets `fuzziness`. When used after a phrase, sets `slop`. | | `-` | Negates the term. | | `before:` | Search for casts before a specific date. (e.g. `before:2025-04-20` or `before:2025-04-20T23:59:59`) | | `after:` | Search for casts after a specific date. (e.g. `after:2025-04-20` or `after:2025-04-20T00:00:00`) | * @param {SearchCastsModeEnum} params.mode [optional] - Choices are: - `literal` - Searches for the words in the query string (default) - `semantic` - Searches for the meaning of the query string - `hybrid` - Combines both literal and semantic results * @param {SearchCastsSortTypeEnum} params.sortType [optional] - Choices are: - `desc_chron` - All casts sorted by time in a descending order (default) - `chron` - All casts sorted by time in ascending order - `algorithmic` - Casts sorted by engagement and time * @param {number} params.authorFid [optional] - Fid of the user whose casts you want to search * @param {number} params.viewerFid [optional] - Providing this will return search results that respects this user's mutes and blocks and includes `viewer_context`. * @param {string} params.parentUrl [optional] - Parent URL of the casts you want to search * @param {string} params.channelId [optional] - Channel ID of the casts you want to search * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * * @returns {Promise} A promise that resolves to a `CastsSearchResponse` object. * * @example * * // Fill in the appropriate values * const q = * const mode = * const sortType = * const authorFid = * const viewerFid = * const parentUrl = * const channelId = * const limit = * * client.searchCasts({ q, mode, sortType, authorFid, viewerFid, parentUrl, channelId, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-casts) * */ searchCasts(params: { q: string; mode?: SearchCastsModeEnum; sortType?: SearchCastsSortTypeEnum; authorFid?: number; viewerFid?: number; parentUrl?: string; channelId?: string; limit?: number; cursor?: string; }): Promise; /** * Returns a list of all channels with their details * * @summary Fetch all channels with their details * * @param {object} params * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 200) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ChannelListResponse` object. * * @example * * // Fill in the appropriate values * const limit = * * client.fetchAllChannels({ limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-all-channels) * */ fetchAllChannels(params: { limit?: number; cursor?: string; }): Promise; /** * Returns details of multiple channels * * @summary Bulk fetch * * @param {object} params * @param {string[]} params.ids - Comma separated list of channel IDs or parent_urls, up to 100 at a time * @param {FetchBulkChannelsTypeEnum} params.type [optional] - Type of identifier being used to query the channels. Defaults to ID. * @param {number} params.viewerFid [optional] - FID of the user viewing the channels. * * @returns {Promise} A promise that resolves to a `ChannelResponseBulk` object. * * @example * * // Fill in the appropriate values * const ids = * const type = * const viewerFid = * * client.fetchBulkChannels({ ids, type, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-channels) * */ fetchBulkChannels(params: { ids: string[]; type?: FetchBulkChannelsTypeEnum; viewerFid?: number; }): Promise; /** * Fetch a list of invites, either in a channel or for a user. If both are provided, open channel invite for that user is returned. * * @summary Open invites * * @param {object} params * @param {string} params.channelId [optional] - Channel ID for the channel being queried * @param {number} params.invitedFid [optional] - FID of the user being invited * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ChannelMemberInviteListResponse` object. * * @example * * // Fill in the appropriate values * const channelId = * const invitedFid = * const limit = * * client.fetchChannelInvites({ channelId, invitedFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-channel-invites) * */ fetchChannelInvites(params: { channelId?: string; invitedFid?: number; limit?: number; cursor?: string; }): Promise; /** * Fetch a list of members in a channel * * @summary Fetch members * * @param {object} params * @param {string} params.channelId - Channel ID for the channel being queried * @param {number} params.fid [optional] - FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ChannelMemberListResponse` object. * * @example * * // Fill in the appropriate values * const channelId = * const fid = * const limit = * * client.fetchChannelMembers({ channelId, fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-channel-members) * */ fetchChannelMembers(params: { channelId: string; fid?: number; limit?: number; cursor?: string; }): Promise; /** * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. * * @summary For channel * * @param {object} params * @param {string} params.id - Channel ID for the channel being queried * @param {number} params.viewerFid [optional] - Providing this will return a list of followers that respects this user's mutes and blocks and includes `viewer_context`. * @param {string} params.cursor [optional] - Pagination cursor. * @param {number} params.limit [optional] - Number of followers to fetch (Default: 25, Maximum: 1000) * * @returns {Promise} A promise that resolves to a `UsersResponse` object. * * @example * * // Fill in the appropriate values * const id = * const viewerFid = * const limit = * * client.fetchFollowersForAChannel({ id, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-followers-for-a-channel) * */ fetchFollowersForAChannel(params: { id: string; viewerFid?: number; cursor?: string; limit?: number; }): Promise; /** * Returns a list of relevant channel followers for a specific FID. This usually shows on a channel as \"X, Y, Z follow this channel\". * * @summary Relevant followers * * @param {object} params * @param {string} params.id - Channel ID being queried * @param {number} params.viewerFid - The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user's mutes and blocks and includes `viewer_context`. * * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object. * * @example * * // Fill in the appropriate values * const id = * const viewerFid = * * client.fetchRelevantFollowersForAChannel({ id, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers-for-a-channel) * */ fetchRelevantFollowersForAChannel(params: { id: string; viewerFid: number; }): Promise; /** * Returns a list of trending channels based on activity * * @summary Channels by activity * * @param {object} params * @param {FetchTrendingChannelsTimeWindowEnum} params.timeWindow [optional] * @param {number} params.limit [optional] - Number of results to fetch (Default: 10, Maximum: 25) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `TrendingChannelResponse` object. * * @example * * // Fill in the appropriate values * const timeWindow = * const limit = * * client.fetchTrendingChannels({ timeWindow, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-channels) * */ fetchTrendingChannels(params: { timeWindow?: FetchTrendingChannelsTimeWindowEnum; limit?: number; cursor?: string; }): Promise; /** * Returns a list of all channels with their details that an FID is a member of. Data may have a delay of up to 1 hour. * * @summary Member of * * @param {object} params * @param {number} params.fid - The FID of the user. * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ChannelMemberListResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * * client.fetchUserChannelMemberships({ fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-channel-memberships) * */ fetchUserChannelMemberships(params: { fid: number; limit?: number; cursor?: string; }): Promise; /** * Returns a list of all channels with their details that a FID follows. * * @summary Following * * @param {object} params * @param {number} params.fid - The FID of the user. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ChannelListResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * * client.fetchUserChannels({ fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-channels) * */ fetchUserChannels(params: { fid: number; limit?: number; cursor?: string; }): Promise; /** * Fetches all channels that a user has casted in, in reverse chronological order. * * @summary Fetch channels that user is active in * * @param {object} params * @param {number} params.fid - The user's FID (identifier) * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `UsersActiveChannelsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * * client.fetchUsersActiveChannels({ fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-users-active-channels) * */ fetchUsersActiveChannels(params: { fid: number; limit?: number; cursor?: string; }): Promise; /** * Follow a channel * * @summary Follow a channel * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.channelId - The unique identifier of a farcaster channel * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const channelId = * * client.followChannel({signerUuid, channelId}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/follow-channel) * */ followChannel(params: { signerUuid: string; channelId: string; }): Promise; /** * Invite a user to a channel * * @summary Invite * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.channelId - The unique identifier of a farcaster channel * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {ChannelMemberRole} params.role * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const channelId = * const fid = * const role = * * client.inviteChannelMember({signerUuid, channelId, fid, role}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/invite-channel-member) * */ inviteChannelMember(params: { signerUuid: string; channelId: string; fid: number; role: ChannelMemberRole; }): Promise; /** * Returns details of a channel * * @summary By ID or parent_url * * @param {object} params * @param {string} params.id - Channel ID for the channel being queried * @param {LookupChannelTypeEnum} params.type [optional] - Type of identifier being used to query the channel. Defaults to ID. * @param {number} params.viewerFid [optional] - FID of the user viewing the channel. * * @returns {Promise} A promise that resolves to a `ChannelResponse` object. * * @example * * // Fill in the appropriate values * const id = * const type = * const viewerFid = * * client.lookupChannel({ id, type, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-channel) * */ lookupChannel(params: { id: string; type?: LookupChannelTypeEnum; viewerFid?: number; }): Promise; /** * Remove a user from a channel or a user\'s invite to a channel role * * @summary Remove user * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.channelId - The unique identifier of a farcaster channel * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {ChannelMemberRole} params.role * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const channelId = * const fid = * const role = * * client.removeChannelMember({signerUuid, channelId, fid, role}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/remove-channel-member) * */ removeChannelMember(params: { signerUuid: string; channelId: string; fid: number; role: ChannelMemberRole; }): Promise; /** * Accept or reject a channel invite * * @summary Accept or reject an invite * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.channelId - The unique identifier of a farcaster channel * @param {ChannelMemberRole} params.role * @param {boolean} params.accept - Accept or reject the invite * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const channelId = * const role = * const accept = * * client.respondChannelInvite({signerUuid, channelId, role, accept}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/respond-channel-invite) * */ respondChannelInvite(params: { signerUuid: string; channelId: string; role: ChannelMemberRole; accept: boolean; }): Promise; /** * Returns a list of channels based on ID or name * * @summary Search by ID or name * * @param {object} params * @param {string} params.q - Channel ID or name for the channel being queried * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 200) * @param {string} params.cursor [optional] - Pagination cursor. * @param {number} params.viewerFid [optional] - FID of the user viewing the channels. * * @returns {Promise} A promise that resolves to a `ChannelSearchResponse` object. * * @example * * // Fill in the appropriate values * const q = * const limit = * const viewerFid = * * client.searchChannels({ q, limit, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-channels) * */ searchChannels(params: { q: string; limit?: number; cursor?: string; viewerFid?: number; }): Promise; /** * Unfollow a channel * * @summary Unfollow a channel * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.channelId - The unique identifier of a farcaster channel * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const channelId = * * client.unfollowChannel({signerUuid, channelId}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/unfollow-channel) * */ unfollowChannel(params: { signerUuid: string; channelId: string; }): Promise; /** * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel * * @summary Chronologically * * @param {object} params * @param {number} params.fid - FID of user whose recent casts you want to fetch * @param {number} params.appFid [optional] - Optionally filter to casts created via a specific app FID, e.g. 9152 for Warpcast * @param {number} params.viewerFid [optional] - FID of the user viewing the feed * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 150) * @param {string} params.cursor [optional] - Pagination cursor * @param {boolean | null} params.includeReplies [optional] - Include reply casts by the author in the response, true by default * @param {string} params.parentUrl [optional] - Parent URL to filter the feed; mutually exclusive with channel_id * @param {string} params.channelId [optional] - Channel ID to filter the feed; mutually exclusive with parent_url * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const appFid = * const viewerFid = * const limit = * const includeReplies = * const parentUrl = * const channelId = * * client.fetchCastsForUser({ fid, appFid, viewerFid, limit, includeReplies, parentUrl, channelId }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-casts-for-user) * */ fetchCastsForUser(params: { fid: number; appFid?: number; viewerFid?: number; limit?: number; cursor?: string; includeReplies?: boolean | null; parentUrl?: string; channelId?: string; }): Promise; /** * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. * * @summary By filters * * @param {object} params * @param {FetchFeedFeedTypeEnum} params.feedType [optional] - Defaults to following (requires FID or address). If set to filter (requires filter_type) * @param {FetchFeedFilterTypeEnum} params.filterType [optional] - Used when feed_type=filter. Options include fids (requires fids), parent_url (requires parent_url), channel_id (requires channel_id), embed_url (requires embed_url), embed_types (requires embed_types), or global_trending. * @param {number} params.fid [optional] - (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type * @param {number[]} params.fids [optional] - Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 100. Requires feed_type and filter_type. * @param {string} params.parentUrl [optional] - Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type. * @param {string} params.channelId [optional] - Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type. * @param {boolean | null} params.membersOnly [optional] - Used when filter_type=channel_id. Only include casts from members of the channel. True by default. * @param {string} params.embedUrl [optional] - Used when filter_type=embed_url. Casts with embedded URLs prefixed by this embed_url param will be returned. We normalize your given URL prefix and prepend 'https://' if no protocol is included. Requires feed_type and filter_type. * @param {Array} params.embedTypes [optional] - Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type. * @param {boolean | null} params.withRecasts [optional] - Include recasts in the response, true by default * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const feedType = * const filterType = * const fid = * const fids = * const parentUrl = * const channelId = * const membersOnly = * const embedUrl = * const embedTypes = * const withRecasts = * const limit = * const viewerFid = * * client.fetchFeed({ feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed) * */ fetchFeed(params: { feedType?: FetchFeedFeedTypeEnum; filterType?: FetchFeedFilterTypeEnum; fid?: number; fids?: number[]; parentUrl?: string; channelId?: string; membersOnly?: boolean | null; embedUrl?: string; embedTypes?: Array; withRecasts?: boolean | null; limit?: number; cursor?: string; viewerFid?: number; }): Promise; /** * Fetch feed based on channel IDs * * @summary By channel IDs * * @param {object} params * @param {string[]} params.channelIds - Comma separated list of up to 10 channel IDs e.g. neynar,farcaster * @param {boolean | null} params.withRecasts [optional] - Include recasts in the response, true by default * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {boolean | null} params.withReplies [optional] - Include replies in the response, false by default * @param {boolean | null} params.membersOnly [optional] - Used when filter_type=channel_id. Only include casts from members of the channel. True by default. * @param {number[]} params.fids [optional] - Comma separated list of FIDs to filter the feed by, up to 10 at a time * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * @param {boolean | null} params.shouldModerate [optional] - If true, only casts that have been liked by the moderator (if one exists) will be returned. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const channelIds = * const withRecasts = * const viewerFid = * const withReplies = * const membersOnly = * const fids = * const limit = * const shouldModerate = * * client.fetchFeedByChannelIds({ channelIds, withRecasts, viewerFid, withReplies, membersOnly, fids, limit, shouldModerate }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-channel-ids) * */ fetchFeedByChannelIds(params: { channelIds: string[]; withRecasts?: boolean | null; viewerFid?: number; withReplies?: boolean | null; membersOnly?: boolean | null; fids?: number[]; limit?: number; cursor?: string; shouldModerate?: boolean | null; }): Promise; /** * Fetch feed based on parent URLs * * @summary By parent URLs * * @param {object} params * @param {string[]} params.parentUrls - Comma separated list of parent_urls * @param {boolean | null} params.withRecasts [optional] - Include recasts in the response, true by default * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {boolean | null} params.withReplies [optional] - Include replies in the response, false by default * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const parentUrls = * const withRecasts = * const viewerFid = * const withReplies = * const limit = * * client.fetchFeedByParentUrls({ parentUrls, withRecasts, viewerFid, withReplies, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-parent-urls) * */ fetchFeedByParentUrls(params: { parentUrls: string[]; withRecasts?: boolean | null; viewerFid?: number; withReplies?: boolean | null; limit?: number; cursor?: string; }): Promise; /** * Fetch feed based on a topic slug. * * @summary By topic * * @param {object} params * @param {string} params.slug - Topic slug to filter casts by. Must be lowercase and contain only alphanumeric characters and underscores. * @param {boolean | null} params.withRecasts [optional] - Include recasts in the response, true by default. * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of results to fetch. (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const slug = * const withRecasts = * const viewerFid = * const limit = * * client.fetchFeedByTopic({ slug, withRecasts, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-topic) * */ fetchFeedByTopic(params: { slug: string; withRecasts?: boolean | null; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Fetch a personalized For You feed for a user * * @summary For you * * @param {object} params * @param {number} params.fid - FID of user whose feed you want to create * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {FetchFeedForYouProviderEnum} params.provider [optional] - The provider of the For You feed. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 50) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const provider = * const limit = * * client.fetchFeedForYou({ fid, viewerFid, provider, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-for-you) * */ fetchFeedForYou(params: { fid: number; viewerFid?: number; provider?: FetchFeedForYouProviderEnum; limit?: number; cursor?: string; }): Promise; /** * Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first * * @summary 10 most popular casts * * @param {object} params * @param {number} params.fid - FID of user whose feed you want to create * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `BulkCastsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * * client.fetchPopularCastsByUser({ fid, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-popular-casts-by-user) * */ fetchPopularCastsByUser(params: { fid: number; viewerFid?: number; }): Promise; /** * Fetch recent replies and recasts for a given user FID; sorted by most recent first * * @summary Replies and recasts * * @param {object} params * @param {number} params.fid - FID of user whose replies and recasts you want to fetch * @param {FetchRepliesAndRecastsForUserFilterEnum} params.filter [optional] - Filter to fetch only replies or recasts * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 50) * @param {string} params.cursor [optional] - Pagination cursor. * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const filter = * const limit = * const viewerFid = * * client.fetchRepliesAndRecastsForUser({ fid, filter, limit, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-replies-and-recasts-for-user) * */ fetchRepliesAndRecastsForUser(params: { fid: number; filter?: FetchRepliesAndRecastsForUserFilterEnum; limit?: number; cursor?: string; viewerFid?: number; }): Promise; /** * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. * * @summary Trending feeds * * @param {object} params * @param {number} params.limit [optional] - Number of results to fetch (Default: 10, Maximum: 10) * @param {string} params.cursor [optional] - Pagination cursor * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {FetchTrendingFeedTimeWindowEnum} params.timeWindow [optional] - Time window for trending casts (7d window for channel feeds only) * @param {string} params.channelId [optional] - Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both. * @param {string} params.parentUrl [optional] - Parent URL to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both. * @param {FetchTrendingFeedProviderEnum} params.provider [optional] - The provider of the trending casts feed. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const limit = * const viewerFid = * const timeWindow = * const channelId = * const parentUrl = * const provider = * * client.fetchTrendingFeed({ limit, viewerFid, timeWindow, channelId, parentUrl, provider }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-feed) * */ fetchTrendingFeed(params: { limit?: number; cursor?: string; viewerFid?: number; timeWindow?: FetchTrendingFeedTimeWindowEnum; channelId?: string; parentUrl?: string; provider?: FetchTrendingFeedProviderEnum; }): Promise; /** * Fetch feed based on who a user is following * * @summary Following * * @param {object} params * @param {number} params.fid - FID of user whose feed you want to create * @param {number} params.viewerFid [optional] - Providing this will return a feed that respects this user's mutes and blocks and includes `viewer_context`. * @param {boolean | null} params.withRecasts [optional] - Include recasts in the response, true by default * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FeedResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const withRecasts = * const limit = * * client.fetchUserFollowingFeed({ fid, viewerFid, withRecasts, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following-feed) * */ fetchUserFollowingFeed(params: { fid: number; viewerFid?: number; withRecasts?: boolean | null; limit?: number; cursor?: string; }): Promise; /** * Check if a given fname is available * * @summary Check fname availability * * @param {object} params * @param {string} params.fname * * @returns {Promise} A promise that resolves to a `FnameAvailabilityResponse` object. * * @example * * // Fill in the appropriate values * const fname = * * client.isFnameAvailable({ fname }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/is-fname-available) * */ isFnameAvailable(params: { fname: string; }): Promise; /** * Fetch a list of suggested users to follow. Used to help users discover new users to follow * * @summary Suggest Follows * * @param {object} params * @param {number | null} params.fid - FID of the user whose following you want to fetch. * @param {number | null} params.viewerFid [optional] - Providing this will return a list of users that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * * @returns {Promise} A promise that resolves to a `UsersResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const limit = * * client.fetchFollowSuggestions({ fid, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-follow-suggestions) * */ fetchFollowSuggestions(params: { fid: number | null; viewerFid?: number | null; limit?: number; }): Promise; /** * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". * * @summary Relevant followers * * @param {object} params * @param {number} params.targetFid - User who's profile you are looking at * @param {number} params.viewerFid - The FID of the user to customize this response for. Providing this will also return a list of followers that respects this user's mutes and blocks and includes `viewer_context`. * * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object. * * @example * * // Fill in the appropriate values * const targetFid = * const viewerFid = * * client.fetchRelevantFollowers({ targetFid, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers) * */ fetchRelevantFollowers(params: { targetFid: number; viewerFid: number; }): Promise; /** * Returns a list of followers for a specific FID. * * @summary Followers * * @param {object} params * @param {number} params.fid - User who's profile you are looking at * @param {number} params.viewerFid [optional] - Providing this will return a list of followers that respects this user's mutes and blocks and includes `viewer_context`. * @param {FetchUserFollowersSortTypeEnum} params.sortType [optional] - Sort type for fetch followers. Default is `desc_chron` * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FollowersResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const sortType = * const limit = * * client.fetchUserFollowers({ fid, viewerFid, sortType, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers) * */ fetchUserFollowers(params: { fid: number; viewerFid?: number; sortType?: FetchUserFollowersSortTypeEnum; limit?: number; cursor?: string; }): Promise; /** * Fetch a list of users who a given user is following. Can optionally include a viewer_fid and sort_type. * * @summary Following * * @param {object} params * @param {number} params.fid - FID of the user whose following you want to fetch. * @param {number} params.viewerFid [optional] - Providing this will return a list of users that respects this user's mutes and blocks and includes `viewer_context`. * @param {FetchUserFollowingSortTypeEnum} params.sortType [optional] - Optional parameter to sort the users based on different criteria. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `FollowersResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const sortType = * const limit = * * client.fetchUserFollowing({ fid, viewerFid, sortType, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following) * */ fetchUserFollowing(params: { fid: number; viewerFid?: number; sortType?: FetchUserFollowingSortTypeEnum; limit?: number; cursor?: string; }): Promise; /** * Returns users who the given FID follows and they follow the FID back (reciprocal following relationship) * * @summary Reciprocal Followers * * @param {object} params * @param {number} params.fid * @param {number} params.viewerFid [optional] * @param {number} params.limit [optional] - (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * @param {FetchUserReciprocalFollowersSortTypeEnum} params.sortType [optional] * * @returns {Promise} A promise that resolves to a `FetchUserReciprocalFollowers200Response` object. * * @example * * // Fill in the appropriate values * const fid = * const viewerFid = * const limit = * const sortType = * * client.fetchUserReciprocalFollowers({ fid, viewerFid, limit, sortType }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reciprocal-followers) * */ fetchUserReciprocalFollowers(params: { fid: number; viewerFid?: number; limit?: number; cursor?: string; sortType?: FetchUserReciprocalFollowersSortTypeEnum; }): Promise; /** * A curated list of featured mini apps * * @summary Mini apps catalog * * @param {object} params * @param {number} params.limit [optional] - Number of results to fetch (Default: 100, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * @param {FetchFrameCatalogTimeWindowEnum} params.timeWindow [optional] - Time window used to calculate the change in trending score for each mini app, used to sort mini app results * @param {Array} params.categories [optional] - Comma separated list of categories to include in the results. Includes all if left blank. Example: categories=games,social OR categories=games&categories=social * @param {Array} params.networks [optional] - List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array. * * @returns {Promise} A promise that resolves to a `FrameCatalogResponse` object. * * @example * * // Fill in the appropriate values * const limit = * const timeWindow = * const categories = * const networks = * * client.fetchFrameCatalog({ limit, timeWindow, categories, networks }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog) * */ fetchFrameCatalog(params: { limit?: number; cursor?: string; timeWindow?: FetchFrameCatalogTimeWindowEnum; categories?: Array; networks?: Array; }): Promise; /** * Returns a list of notifications tokens related to a mini app * * @summary List of mini app notification tokens * * @param {object} params * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {number[]} params.fids [optional] - Comma separated list of FIDs, up to 100 at a time. If you pass in FIDs, you will get back the notification tokens for those FIDs. If you don't pass in FIDs, you will get back all the notification tokens for the mini app. * @param {string} params.cursor [optional] - Pagination cursor * * @returns {Promise} A promise that resolves to a `FrameNotificationTokens` object. * * @example * * // Fill in the appropriate values * const limit = * const fids = * * client.fetchNotificationTokens({ limit, fids }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens) * */ fetchNotificationTokens(params: { limit?: number; fids?: number[]; cursor?: string; }): Promise; /** * Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user * * @summary Relevant mini apps * * @param {object} params * @param {number} params.viewerFid - FID of the user to fetch relevant mini apps for * @param {FetchRelevantFramesTimeWindowEnum} params.timeWindow [optional] - Time window used to limit statistics used to calculate mini app relevance * @param {Array} params.networks [optional] - List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array. * * @returns {Promise} A promise that resolves to a `FetchRelevantFrames200Response` object. * * @example * * // Fill in the appropriate values * const viewerFid = * const timeWindow = * const networks = * * client.fetchRelevantFrames({ viewerFid, timeWindow, networks }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames) * */ fetchRelevantFrames(params: { viewerFid: number; timeWindow?: FetchRelevantFramesTimeWindowEnum; networks?: Array; }): Promise; /** * Retrieve notification delivery and opened stats for notification campaigns * * @summary Get notification campaign stats * * @param {object} params * @param {string} params.campaignId [optional] - An ID of a specific notification campaign to query * @param {number} params.limit [optional] - The number of results to return (Default: 100, Maximum: 1000) * @param {string} params.cursor [optional] - Pagination cursor * * @returns {Promise} A promise that resolves to a `GetNotificationCampaignStats200Response` object. * * @example * * // Fill in the appropriate values * const campaignId = * const limit = * * client.getNotificationCampaignStats({ campaignId, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats) * */ getNotificationCampaignStats(params: { campaignId?: string; limit?: number; cursor?: string; }): Promise; /** * Retrieves details about a transaction pay mini app by ID * * @summary Get transaction pay mini app * * @param {object} params * @param {string} params.id - ID of the transaction mini app to retrieve * * @returns {Promise} A promise that resolves to a `TransactionFrameResponse` object. * * @example * * // Fill in the appropriate values * const id = * * client.getTransactionPayFrame({ id }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame) * */ getTransactionPayFrame(params: { id: string; }): Promise; /** * Send notifications to interactors of a mini app * * @summary Send notifications * * @param {object} params * @param {Array} params.targetFids [optional] - An array of target FIDs to whom the notifications should be sent. Each FID must be a positive integer. Pass an empty array to send notifications to all FIDs with notifications enabled for the mini app. * @param {SendFrameNotificationsReqBodyFilters} params.filters [optional] * @param {SendFrameNotificationsReqBodyNotification} params.notification * * @returns {Promise} A promise that resolves to a `SendFrameNotificationsResponse` object. * * @example * * // Fill in the appropriate values * const targetFids = * const filters = * const notification = * * client.publishFrameNotifications({targetFids, filters, notification}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications) * */ publishFrameNotifications(params: { targetFids?: Array; filters?: SendFrameNotificationsReqBodyFilters; notification: SendFrameNotificationsReqBodyNotification; }): Promise; /** * Search for mini apps based on a query string * * @summary Search mini apps * * @param {object} params * @param {string} params.q - Query string to search for mini apps * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * @param {Array} params.networks [optional] - List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array. * * @returns {Promise} A promise that resolves to a `FrameCatalogResponse` object. * * @example * * // Fill in the appropriate values * const q = * const limit = * const networks = * * client.searchFrames({ q, limit, networks }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames) * */ searchFrames(params: { q: string; limit?: number; cursor?: string; networks?: Array; }): Promise; /** * Nonce to sign a message * * @summary Fetch nonce * * * @returns {Promise} A promise that resolves to a `NonceResponse` object. * * @example * * client.fetchNonce().then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-nonce) * */ fetchNonce(): Promise; /** * Fetches metrics casts matching a query * * @summary Metrics for casts * * @param {object} params * @param {string} params.q - Query string to search for casts * @param {FetchCastMetricsIntervalEnum} params.interval [optional] - Interval of time for which to fetch metrics. Default is 30d. * @param {number} params.authorFid [optional] - Fid of the user whose casts you want to search * @param {string} params.channelId [optional] - Channel ID of the casts you want to search * * @returns {Promise} A promise that resolves to a `CastsMetricsResponse` object. * * @example * * // Fill in the appropriate values * const q = * const interval = * const authorFid = * const channelId = * * client.fetchCastMetrics({ q, interval, authorFid, channelId }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics) * */ fetchCastMetrics(params: { q: string; interval?: FetchCastMetricsIntervalEnum; authorFid?: number; channelId?: string; }): Promise; /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * * @summary Unmute FID * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {number} params.mutedFid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `MuteResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const mutedFid = * * client.deleteMute({fid, mutedFid}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute(params: { fid: number; mutedFid: number; }): Promise; /** * Fetches all FIDs that a user has muted. * * @summary Muted FIDs of user * * @param {object} params * @param {number} params.fid - The user's FID (identifier) * @param {number} params.limit [optional] - Number of results to fetch (Default: 20, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `MuteListResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * * client.fetchMuteList({ fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList(params: { fid: number; limit?: number; cursor?: string; }): Promise; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * * @summary Mute FID * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {number} params.mutedFid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `MuteResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const mutedFid = * * client.publishMute({fid, mutedFid}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute(params: { fid: number; mutedFid: number; }): Promise; /** * Returns a list of notifications for a specific FID. * * @summary For user * * @param {object} params * @param {number} params.fid - FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks. * @param {Array} params.type [optional] - Notification type to fetch. Comma separated values of follows, recasts, likes, mentions, replies. * @param {number} params.limit [optional] - Number of results to fetch (Default: 15, Maximum: 25) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `NotificationsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const type = * const limit = * * client.fetchAllNotifications({ fid, type, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-all-notifications) * */ fetchAllNotifications(params: { fid: number; type?: Array; limit?: number; cursor?: string; }): Promise; /** * Returns a list of notifications for a user in specific channels * * @summary For user by channel * * @param {object} params * @param {number} params.fid - FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks. * @param {string[]} params.channelIds - Comma separated channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) * @param {number} params.limit [optional] - Number of results to fetch (Default: 15, Maximum: 25) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `NotificationsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const channelIds = * const limit = * * client.fetchChannelNotificationsForUser({ fid, channelIds, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-channel-notifications-for-user) * */ fetchChannelNotificationsForUser(params: { fid: number; channelIds: string[]; limit?: number; cursor?: string; }): Promise; /** * Returns a list of notifications for a user in specific parent_urls * * @summary For user by parent_urls * * @param {object} params * @param {number} params.fid - FID of the user you you want to fetch notifications for. The response will respect this user's mutes and blocks. * @param {string[]} params.parentUrls - Comma separated parent_urls * @param {number} params.limit [optional] - Number of results to fetch (Default: 15, Maximum: 25) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `NotificationsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const parentUrls = * const limit = * * client.fetchNotificationsByParentUrlForUser({ fid, parentUrls, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notifications-by-parent-url-for-user) * */ fetchNotificationsByParentUrlForUser(params: { fid: number; parentUrls: string[]; limit?: number; cursor?: string; }): Promise; /** * Mark notifications as seen. You can choose one of two authorization methods, either: 1. Provide a valid signer_uuid in the request body (Most common) 2. Provide a valid, signed \"Bearer\" token in the request\'s `Authorization` header similar to the approach described [here](https://docs.farcaster.xyz/reference/warpcast/api#authentication) * * @summary Mark as seen * * @param {object} params * @param {string} params.signerUuid [optional] - The UUID of a signer with at least one write permission. Required unless a valid Authorization Bearer token is provided in the header. * @param {NotificationType} params.type [optional] * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const type = * * client.markNotificationsAsSeen({signerUuid, type}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/mark-notifications-as-seen) * */ markNotificationsAsSeen(params: { signerUuid?: string; type?: NotificationType; }): Promise; /** * Fetch metadata for multiple tokens in a single request. Provide comma-separated networks and addresses in the same order. Maximum 100 tokens per request. * * @summary Batch get token metadata * * @param {object} params * @param {string[]} params.networks - Comma-separated list of blockchain networks. Each value must be a valid network (ethereum, optimism, base, arbitrum). * @param {string[]} params.addresses - Comma-separated list of token contract addresses corresponding to each network * * @returns {Promise} A promise that resolves to a `BatchGetTokenMetadata200Response` object. * * @example * * // Fill in the appropriate values * const networks = * const addresses = * * client.batchGetTokenMetadata({ networks, addresses }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/batch-get-token-metadata) * */ batchGetTokenMetadata(params: { networks: string[]; addresses: string[]; }): Promise; /** * Create a signature for a given x402 resource using the specified wallet. * * @summary Create x402 signature * * @param {object} params * @param {string} params.xApiKey * @param {CreateX402SignatureRequest} params.createX402SignatureRequest * * @returns {Promise} A promise that resolves to a `CreateX402Signature200Response` object. * * @example * * // Fill in the appropriate values * const xApiKey = * const createX402SignatureRequest = * * client.createX402Signature({ xApiKey, createX402SignatureRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-x402-signature) * */ createX402Signature(params: { xApiKey: string; createX402SignatureRequest: CreateX402SignatureRequest; }): Promise; /** * Deploy a new ERC-721A (series) NFT collection. * * @summary Deploy ERC-721 collection * * @param {object} params * @param {DeployErc721Request} params.deployErc721Request * * @returns {Promise} A promise that resolves to a `DeployErc721201Response` object. * * @example * * // Fill in the appropriate values * const deployErc721Request = * * client.deployErc721({ deployErc721Request }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-erc721) * */ deployErc721(params: { deployErc721Request: DeployErc721Request; }): Promise; /** * Creates a new token. This is an allowlisted API, reach out if you want access. * * @summary Deploy fungible * * @param {object} params * @param {string} params.owner - Ethereum address of the one who is creating the token * @param {string} params.symbol - Symbol/Ticker for the token * @param {string} params.name - Name of the token * @param {File | null} params.metadataMedia [optional] - Media file associated with the token. Supported formats are image/jpeg, image/gif and image/png * @param {string} params.metadataDescription [optional] - Description of the token * @param {DeployFungibleMetadataNsfwEnum} params.metadataNsfw [optional] - Indicates if the token is NSFW (Not Safe For Work). * @param {string} params.metadataWebsiteLink [optional] - Website link related to the token * @param {string} params.metadataTwitter [optional] - Twitter profile link * @param {string} params.metadataDiscord [optional] - Discord server link * @param {string} params.metadataTelegram [optional] - Telegram link * @param {DeployFungibleNetworkEnum} params.network [optional] - Network/Chain name * @param {DeployFungibleFactoryEnum} params.factory [optional] - Factory name - wow -> [wow.xyz](https://wow.xyz) - clanker -> [clanker.world](https://www.clanker.world) * * @returns {Promise} A promise that resolves to a `DeployFungibleResponse` object. * * @example * * // Fill in the appropriate values * const owner = * const symbol = * const name = * const metadataMedia = * const metadataDescription = * const metadataNsfw = * const metadataWebsiteLink = * const metadataTwitter = * const metadataDiscord = * const metadataTelegram = * const network = * const factory = * * client.deployFungible({ owner, symbol, name, metadataMedia, metadataDescription, metadataNsfw, metadataWebsiteLink, metadataTwitter, metadataDiscord, metadataTelegram, network, factory }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible) * */ deployFungible(params: { owner: string; symbol: string; name: string; metadataMedia?: File | null; metadataDescription?: string; metadataNsfw?: DeployFungibleMetadataNsfwEnum; metadataWebsiteLink?: string; metadataTwitter?: string; metadataDiscord?: string; metadataTelegram?: string; network?: DeployFungibleNetworkEnum; factory?: DeployFungibleFactoryEnum; }): Promise; /** * Get recent trades for a specific fungible within a timeframe. Returns trades ordered by timestamp (most recent first). * * @summary Get fungible trades * * @param {object} params * @param {FetchFungibleTradesNetworkEnum} params.network * @param {string} params.address - Contract address * @param {FetchFungibleTradesTimeWindowEnum} params.timeWindow [optional] - Time window for trades e.g. "1h", "6h", "12h", "24h", "7d" * @param {number | null} params.minAmountUsd [optional] - Minimum USD amount to filter trades * * @returns {Promise} A promise that resolves to a `FetchFungibleTrades200Response` object. * * @example * * // Fill in the appropriate values * const network = * const address = * const timeWindow = * const minAmountUsd = * * client.fetchFungibleTrades({ network, address, timeWindow, minAmountUsd }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-fungible-trades) * */ fetchFungibleTrades(params: { network: FetchFungibleTradesNetworkEnum; address: string; timeWindow?: FetchFungibleTradesTimeWindowEnum; minAmountUsd?: number | null; }): Promise; /** * Fetch details for fungible assets identified by fungible identifiers. * * @summary Fetch fungibles * * @param {object} params * @param {string} params.fungibles - Comma-separated fungible identifiers * @param {number | null} params.viewerFid [optional] - Optional FID of the viewer to personalize cast count filtering * * @returns {Promise} A promise that resolves to a `FungiblesResponseSchema` object. * * @example * * // Fill in the appropriate values * const fungibles = * const viewerFid = * * client.fetchFungibles({ fungibles, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-fungibles) * */ fetchFungibles(params: { fungibles: string; viewerFid?: number | null; }): Promise; /** * Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\". * * @summary Relevant owners * * @param {object} params * @param {string} params.contractAddress - Contract address of the fungible asset (Ethereum or Solana) * @param {FetchRelevantFungibleOwnersNetworkEnum} params.network - Network of the fungible asset. * @param {number} params.viewerFid [optional] - If you provide a viewer_fid, the response will include token holders from the user's network, respecting their mutes and blocks and including viewer_context; if not provided, the response will show top token holders across the network—both sets can be combined to generate a longer list if desired. * * @returns {Promise} A promise that resolves to a `RelevantFungibleOwnersResponse` object. * * @example * * // Fill in the appropriate values * const contractAddress = * const network = * const viewerFid = * * client.fetchRelevantFungibleOwners({ contractAddress, network, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners) * */ fetchRelevantFungibleOwners(params: { contractAddress: string; network: FetchRelevantFungibleOwnersNetworkEnum; viewerFid?: number; }): Promise; /** * Fetch trending fungibles based on buy activity from watched addresses. Returns fungibles ranked by USD buy volume and buy count within the specified time window. * * @summary Trending fungibles * * @param {object} params * @param {FetchTrendingFungiblesNetworkEnum} params.network * @param {FetchTrendingFungiblesTimeWindowEnum} params.timeWindow [optional] - Time window for trending calculations e.g. "1h", "6h", "12h", "24h", "7d" * * @returns {Promise} A promise that resolves to a `FetchTrendingFungibles200Response` object. * * @example * * // Fill in the appropriate values * const network = * const timeWindow = * * client.fetchTrendingFungibles({ network, timeWindow }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-fungibles) * */ fetchTrendingFungibles(params: { network: FetchTrendingFungiblesNetworkEnum; timeWindow?: FetchTrendingFungiblesTimeWindowEnum; }): Promise; /** * Fetches the token balances of a user given their FID * * @summary Token balance * * @param {object} params * @param {number} params.fid - FID of the user to fetch * @param {Array} params.networks - Comma separated list of networks to fetch balances for * * @returns {Promise} A promise that resolves to a `BalanceResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const networks = * * client.fetchUserBalance({ fid, networks }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance) * */ fetchUserBalance(params: { fid: number; networks: Array; }): Promise; /** * Fetch metadata for a specific token including price, market data, and basic information. Data is fetched from onchain-indexer with fallback to third-party providers. * * @summary Get token metadata * * @param {object} params * @param {string[]} params.networks - Comma-separated list of blockchain networks. Each value must be a valid network (ethereum, optimism, base, arbitrum). * @param {string[]} params.addresses - Comma-separated list of token contract addresses corresponding to each network * * @returns {Promise} A promise that resolves to a `GetTokenMetadata200Response` object. * * @example * * // Fill in the appropriate values * const networks = * const addresses = * * client.getTokenMetadata({ networks, addresses }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-token-metadata) * */ getTokenMetadata(params: { networks: string[]; addresses: string[]; }): Promise; /** * Fetch all token balances for a wallet address across multiple networks. Results are paginated. * * @summary Get wallet token balances * * @param {object} params * @param {string[]} params.networks - Comma-separated list of networks to query. Each value must be a valid network (ethereum, optimism, base, arbitrum). * @param {string} params.address - Ethereum address * @param {number} params.limit [optional] - Number of results to return (max 100) (Default: 50, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `GetWalletBalances200Response` object. * * @example * * // Fill in the appropriate values * const networks = * const address = * const limit = * * client.getWalletBalances({ networks, address, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-wallet-balances) * */ getWalletBalances(params: { networks: string[]; address: string; limit?: number; cursor?: string; }): Promise; /** * Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one. * * @summary Mint NFT(s) * * @param {object} params * @param {MintNftRequest} params.mintNftRequest * * @returns {Promise} A promise that resolves to a `MintNft200Response` object. * * @example * * // Fill in the appropriate values * const mintNftRequest = * * client.mintNft({ mintNftRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft) * */ mintNft(params: { mintNftRequest: MintNftRequest; }): Promise; /** * Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction. Requires x-wallet-id header. * * @summary Register Farcaster account onchain * * @param {object} params * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) Pre-registration calls must be idempotent when using idempotency keys. 2) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 3) This should be a unique identifier for each request. 4) Recommended format is a 16-character string generated by the developer at the time of making this request. * @param {Array} params.preRegistrationCalls [optional] * @param {RegisterUserOnChainReqBodyRegistration} params.registration * @param {number} params.storageUnits [optional] * @param {Array} params.signers [optional] * * @returns {Promise} A promise that resolves to a `RegisterUserOnChainResponse` object. * * @example * * // Fill in the appropriate values * const idem = * const preRegistrationCalls = * const registration = * const storageUnits = * const signers = * * client.registerAccountOnchain({idem, preRegistrationCalls, registration, storageUnits, signers}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain) * */ registerAccountOnchain(params: { idem?: string; preRegistrationCalls?: Array; registration: RegisterUserOnChainReqBodyRegistration; storageUnits?: number; signers?: Array; }): Promise; /** * Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address. * * @summary Send fungibles * * @param {object} params * @param {TransactionSendFungiblesReqBodyNetworkEnum} params.network * @param {string} params.fungibleContractAddress [optional] - Contract address of the fungible token to send. If not provided, the default is the native token of the network. * @param {Array} params.recipients * * @returns {Promise} A promise that resolves to a `TransactionSendFungiblesResponse` object. * * @example * * // Fill in the appropriate values * const network = * const fungibleContractAddress = * const recipients = * * client.sendFungiblesToUsers({network, fungibleContractAddress, recipients}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users) * */ sendFungiblesToUsers(params: { network: TransactionSendFungiblesReqBodyNetworkEnum; fungibleContractAddress?: string; recipients: Array; }): Promise; /** * Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting. * * @summary Simulate NFT mint calldata * * @param {object} params * @param {string} params.recipients - JSON array of recipients (same structure as POST). * @param {string} params.nftContractAddress - Ethereum address * @param {SimulateNftMintNetworkEnum} params.network - Network to mint on. * * @returns {Promise} A promise that resolves to a `SimulateNftMintResponse` object. * * @example * * // Fill in the appropriate values * const recipients = * const nftContractAddress = * const network = * * client.simulateNftMint({ recipients, nftContractAddress, network }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint) * */ simulateNftMint(params: { recipients: string; nftContractAddress: string; network: SimulateNftMintNetworkEnum; }): Promise; /** * Delete a reaction (like or recast) to a cast (In order to delete a reaction `signer_uuid` must be approved) * * @summary Delete reaction * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {ReactionType} params.reactionType * @param {string} params.target - Target cast hash (hex string starting with 0x) OR a valid URL. * @param {number} params.targetAuthorFid [optional] - The unique identifier of a farcaster user or app (unsigned integer) * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const reactionType = * const target = * const targetAuthorFid = * const idem = * * client.deleteReaction({signerUuid, reactionType, target, targetAuthorFid, idem}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-reaction) * */ deleteReaction(params: { signerUuid: string; reactionType: ReactionType; target: string; targetAuthorFid?: number; idem?: string; }): Promise; /** * Fetches reactions for a given cast * * @summary Reactions for cast * * @param {object} params * @param {string} params.hash * @param {Array} params.types - Customize which reaction types the request should search for. This is a comma-separated string that can include the following values: 'likes' and 'recasts'. By default api returns both. To select multiple types, use a comma-separated list of these values. * @param {number} params.viewerFid [optional] - Providing this will return a list of reactions that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ReactionsCastResponse` object. * * @example * * // Fill in the appropriate values * const hash = * const types = * const viewerFid = * const limit = * * client.fetchCastReactions({ hash, types, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-reactions) * */ fetchCastReactions(params: { hash: string; types: Array; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Fetches reactions for a given user * * @summary Reactions for user * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {FetchUserReactionsTypeEnum} params.type - Type of reaction to fetch (likes or recasts or all) * @param {number} params.viewerFid [optional] - Providing this will return a list of reactions that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `ReactionsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const type = * const viewerFid = * const limit = * * client.fetchUserReactions({ fid, type, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reactions) * */ fetchUserReactions(params: { fid: number; type: FetchUserReactionsTypeEnum; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Post a reaction (like or recast) to a given cast (In order to post a reaction `signer_uuid` must be approved) * * @summary Post a reaction * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {ReactionType} params.reactionType * @param {string} params.target - Target cast hash (hex string starting with 0x) OR a valid URL. * @param {number} params.targetAuthorFid [optional] - The unique identifier of a farcaster user or app (unsigned integer) * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const reactionType = * const target = * const targetAuthorFid = * const idem = * * client.publishReaction({signerUuid, reactionType, target, targetAuthorFid, idem}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-reaction) * */ publishReaction(params: { signerUuid: string; reactionType: ReactionType; target: string; targetAuthorFid?: number; idem?: string; }): Promise; /** * Creates a signer and returns the signer status. **Note**: While tesing please reuse the signer, it costs money to approve a signer. * * @summary Create signer * * * @returns {Promise} A promise that resolves to a `Signer` object. * * @example * * client.createSigner().then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-signer) * */ createSigner(): Promise; /** * Fetch authorization url (Fetched authorized url useful for SIWN login operation) * * @summary Fetch authorization url * * @param {object} params * @param {string} params.clientId * @param {FetchAuthorizationUrlResponseTypeEnum} params.responseType * * @returns {Promise} A promise that resolves to a `AuthorizationUrlResponse` object. * * @example * * // Fill in the appropriate values * const clientId = * const responseType = * * client.fetchAuthorizationUrl({ clientId, responseType }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-authorization-url) * */ fetchAuthorizationUrl(params: { clientId: string; responseType: FetchAuthorizationUrlResponseTypeEnum; }): Promise; /** * Fetches a list of signers for a custody address * * @summary List signers * * @param {object} params * @param {string} params.message - A Sign-In with Ethereum (SIWE) message that the user's Ethereum wallet signs. This message includes details such as the domain, address, statement, URI, nonce, and other relevant information following the EIP-4361 standard. It should be structured and URL-encoded. * @param {string} params.signature - The digital signature produced by signing the provided SIWE message with the user's Ethereum private key. This signature is used to verify the authenticity of the message and the identity of the signer. * * @returns {Promise} A promise that resolves to a `SignerListResponse` object. * * @example * * // Fill in the appropriate values * const message = * const signature = * * client.fetchSigners({ message, signature }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-signers) * */ fetchSigners(params: { message: string; signature: string; }): Promise; /** * Fetches the status of a developer managed signer by public key * * @summary Status by public key * * @param {object} params * @param {string} params.publicKey - Ed25519 public key * * @returns {Promise} A promise that resolves to a `DeveloperManagedSigner` object. * * @example * * // Fill in the appropriate values * const publicKey = * * client.lookupDeveloperManagedSigner({ publicKey }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-developer-managed-signer) * */ lookupDeveloperManagedSigner(params: { publicKey: string; }): Promise; /** * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) * * @summary Status * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * * @returns {Promise} A promise that resolves to a `Signer` object. * * @example * * // Fill in the appropriate values * const signerUuid = * * client.lookupSigner({ signerUuid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-signer) * */ lookupSigner(params: { signerUuid: string; }): Promise; /** * Publish a message to farcaster. The message must be signed by a signer managed by the developer. Use the @farcaster/core library to construct and sign the message. Use the Message.toJSON method on the signed message and pass the JSON in the body of this POST request. * * @summary Publish message * * @param {object} params * @param {object} params.body * * @returns {Promise} A promise that resolves to a `object` object. * * @example * * // Fill in the appropriate values * const body = * * client.publishMessageToFarcaster({ body }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-message-to-farcaster) * */ publishMessageToFarcaster(params: { body: object; }): Promise; /** * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. * * @summary Register Signed Key * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.signature - Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer's public key * @param {number} params.appFid - The unique identifier of a farcaster user or app (unsigned integer) * @param {number} params.deadline - unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) * @param {string} params.redirectUrl [optional] - Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. * @param {SignedKeyRequestSponsor} params.sponsor [optional] * * @returns {Promise} A promise that resolves to a `Signer` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const signature = * const appFid = * const deadline = * const redirectUrl = * const sponsor = * * client.registerSignedKey({signerUuid, signature, appFid, deadline, redirectUrl, sponsor}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-signed-key) * */ registerSignedKey(params: { signerUuid: string; signature: string; appFid: number; deadline: number; redirectUrl?: string; sponsor?: SignedKeyRequestSponsor; }): Promise; /** * Registers an signed key and returns the developer managed signer status with an approval url. * * @summary Register Signed Key * * @param {object} params * @param {string} params.publicKey - Ed25519 public key * @param {string} params.signature - Signature generated by the custody address of the app. Signed data includes app_fid, deadline, signer's public key * @param {number} params.appFid - The unique identifier of a farcaster user or app (unsigned integer) * @param {number} params.deadline - unix timestamp in seconds that controls how long the signed key request is valid for. (24 hours from now is recommended) * @param {string} params.redirectUrl [optional] - Url to redirect to after the signer is approved. **Note** : This should only be used when requesting a signer from a native mobile application. * @param {SignedKeyRequestSponsor} params.sponsor [optional] * * @returns {Promise} A promise that resolves to a `DeveloperManagedSigner` object. * * @example * * // Fill in the appropriate values * const publicKey = * const signature = * const appFid = * const deadline = * const redirectUrl = * const sponsor = * * client.registerSignedKeyForDeveloperManagedSigner({publicKey, signature, appFid, deadline, redirectUrl, sponsor}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-signed-key-for-developer-managed-signer) * */ registerSignedKeyForDeveloperManagedSigner(params: { publicKey: string; signature: string; appFid: number; deadline: number; redirectUrl?: string; sponsor?: SignedKeyRequestSponsor; }): Promise; /** * This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header. * * @summary Buy storage * * @param {object} params * @param {number} params.fid * @param {number} params.units [optional] - Number of storage units to buy. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. * @param {string} params.idem [optional] - An Idempotency key is a unique identifier for the request. **Note:** 1) This is used to prevent duplicate requests. Use the same idem key on retry attempts. 2) This should be a unique identifier for each request. 3) Recommended format is a 16-character string generated by the developer at the time of making this request. * * @returns {Promise} A promise that resolves to a `StorageAllocationsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const units = * const idem = * * client.buyStorage({fid, units, idem}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage) * */ buyStorage(params: { fid: number; units?: number; idem?: string; }): Promise; /** * Fetches storage allocations for a given user * * @summary Allocation of user * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `StorageAllocationsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * * client.lookupUserStorageAllocations({ fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations) * */ lookupUserStorageAllocations(params: { fid: number; }): Promise; /** * Fetches storage usage for a given user * * @summary Usage of user * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * * @returns {Promise} A promise that resolves to a `StorageUsageResponse` object. * * @example * * // Fill in the appropriate values * const fid = * * client.lookupUserStorageUsage({ fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage) * */ lookupUserStorageUsage(params: { fid: number; }): Promise; /** * Associates a generated miniapp with a Farcaster account using a JFS-signed domain association. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Set account association * * @param {object} params * @param {AssociateDeploymentRequest} params.associateDeploymentRequest * * @returns {Promise} A promise that resolves to a `AssociateDeployment200Response` object. * * @example * * // Fill in the appropriate values * const associateDeploymentRequest = * * client.associateDeployment({ associateDeploymentRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/associate-deployment) * */ associateDeployment(params: { associateDeploymentRequest: AssociateDeploymentRequest; }): Promise; /** * Runs Next.js build process for the generated app. If build fails, automatically calls a build-fixer agent to resolve errors. Streams build output and agent responses via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Build generated app with automatic error fixing * * @param {object} params * @param {BuildRequest} params.buildRequest * * @returns {Promise} A promise that resolves to a `void` object. * * @example * * // Fill in the appropriate values * const buildRequest = * * client.build({ buildRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/build) * */ build(params: { buildRequest: BuildRequest; }): Promise; /** * Creates and deploys an instance of the miniapp generator for a user. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Create a miniapp generator deployment * * @param {object} params * @param {CreateDeploymentRequest} params.createDeploymentRequest * * @returns {Promise} A promise that resolves to a `ListDeployments200ResponseInner` object. * * @example * * // Fill in the appropriate values * const createDeploymentRequest = * * client.createDeployment({ createDeploymentRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-deployment) * */ createDeployment(params: { createDeploymentRequest: CreateDeploymentRequest; }): Promise; /** * Deletes a specific miniapp generator deployment or all deployments for a FID. If deployment_id or name is provided, deletes single deployment. If only FID is provided, deletes all deployments for that FID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Delete deployment(s) * * @param {object} params * @param {DeleteDeploymentRequest} params.deleteDeploymentRequest * * @returns {Promise} A promise that resolves to a `DeleteDeployment200Response` object. * * @example * * // Fill in the appropriate values * const deleteDeploymentRequest = * * client.deleteDeployment({ deleteDeploymentRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-deployment) * */ deleteDeployment(params: { deleteDeploymentRequest: DeleteDeploymentRequest; }): Promise; /** * Deletes rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk deletes. * * @summary Delete rows from table * * @param {object} params * @param {string} params.tableName * @param {DeleteRowsRequest} params.deleteRowsRequest * * @returns {Promise} A promise that resolves to a `DeleteRows200Response` object. * * @example * * // Fill in the appropriate values * const tableName = * const deleteRowsRequest = * * client.deleteRows({ tableName, deleteRowsRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-rows) * */ deleteRows(params: { tableName: string; deleteRowsRequest: DeleteRowsRequest; }): Promise; /** * Deletes environment variables (secrets) from a deployment. * * @summary Delete deployment secrets * * @param {object} params * @param {DeleteSecretsRequest} params.deleteSecretsRequest * * @returns {Promise} A promise that resolves to a `UpsertSecrets200Response` object. * * @example * * // Fill in the appropriate values * const deleteSecretsRequest = * * client.deleteSecrets({ deleteSecretsRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-secrets) * */ deleteSecrets(params: { deleteSecretsRequest: DeleteSecretsRequest; }): Promise; /** * Publishes the generated miniapp to Vercel via GitHub. Creates a GitHub repository, pushes code, creates a Vercel project linked to GitHub, and triggers deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Deploy miniapp to Vercel * * @param {object} params * @param {DeployToVercelRequest} params.deployToVercelRequest * * @returns {Promise} A promise that resolves to a `DeployToVercel200Response` object. * * @example * * // Fill in the appropriate values * const deployToVercelRequest = * * client.deployToVercel({ deployToVercelRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-to-vercel) * */ deployToVercel(params: { deployToVercelRequest: DeployToVercelRequest; }): Promise; /** * Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required. * * @summary Execute raw SQL query (admin only) * * @param {object} params * @param {ExecuteSqlRequest} params.executeSqlRequest * * @returns {Promise} A promise that resolves to a `ExecuteSql200Response` object. * * @example * * // Fill in the appropriate values * const executeSqlRequest = * * client.executeSql({ executeSqlRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/execute-sql) * */ executeSql(params: { executeSqlRequest: ExecuteSqlRequest; }): Promise; /** * Retrieves the account-association.json file from a miniapp deployment, which contains the JFS-signed domain association. Requires API key authentication. * * @summary Get account association of a miniapp * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID * @param {string} params.namespace [optional] - Kubernetes namespace name * @param {string} params.name [optional] - Kubernetes deployment name * * @returns {Promise} A promise that resolves to a `GetAccountAssociation200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const namespace = * const name = * * client.getAccountAssociation({ deploymentId, namespace, name }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-account-association) * */ getAccountAssociation(params: { deploymentId?: string; namespace?: string; name?: string; }): Promise; /** * Retrieves all messages in a specific conversation. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get messages in a conversation * * @param {object} params * @param {string} params.conversationId - Conversation ID * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user; if not provided, namespace must be provided * @param {string} params.name [optional] - Kubernetes deployment name. Required if deployment_id not provided. * @param {string} params.namespace [optional] - Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {boolean | null} params.includeDeleted [optional] - Include deleted messages in the response. Defaults to false. * * @returns {Promise} A promise that resolves to a `GetConversationMessages200Response` object. * * @example * * // Fill in the appropriate values * const conversationId = * const deploymentId = * const fid = * const name = * const namespace = * const includeDeleted = * * client.getConversationMessages({ conversationId, deploymentId, fid, name, namespace, includeDeleted }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-conversation-messages) * */ getConversationMessages(params: { conversationId: string; deploymentId?: string; fid?: number | null; name?: string; namespace?: string; includeDeleted?: boolean | null; }): Promise; /** * Fetches info about a miniapp generator deployment by its deployment_id or name and creator\'s Farcaster ID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get deployment info * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user; if not provided, namespace must be provided * @param {string} params.name [optional] - Kubernetes deployment name. Required if deployment_id not provided. * @param {string} params.namespace [optional] - Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * * @returns {Promise} A promise that resolves to a `ListDeployments200ResponseInner` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * const name = * const namespace = * * client.getDeployment({ deploymentId, fid, name, namespace }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment) * */ getDeployment(params: { deploymentId?: string; fid?: number | null; name?: string; namespace?: string; }): Promise; /** * Retrieves the contents of a specific file from the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get deployment file contents * * @param {object} params * @param {string} params.filePath - File path relative to gen/ * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user; if not provided, namespace must be provided * @param {string} params.name [optional] - Kubernetes deployment name. Required if deployment_id not provided. * @param {string} params.namespace [optional] - Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * * @returns {Promise} A promise that resolves to a `GetDeploymentFile200Response` object. * * @example * * // Fill in the appropriate values * const filePath = * const deploymentId = * const fid = * const name = * const namespace = * * client.getDeploymentFile({ filePath, deploymentId, fid, name, namespace }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment-file) * */ getDeploymentFile(params: { filePath: string; deploymentId?: string; fid?: number | null; name?: string; namespace?: string; }): Promise; /** * Retrieves the dev-status.json file from a miniapp deployment, which tracks the progress of app development phases. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get dev status of a miniapp * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID * @param {string} params.namespace [optional] - Kubernetes namespace name * @param {string} params.name [optional] - Kubernetes deployment name * * @returns {Promise} A promise that resolves to a `GetDevStatus200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const namespace = * const name = * * client.getDevStatus({ deploymentId, namespace, name }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-dev-status) * */ getDevStatus(params: { deploymentId?: string; namespace?: string; name?: string; }): Promise; /** * Retrieves the complete schema for a table including columns, indexes, and foreign keys. * * @summary Get table schema * * @param {object} params * @param {string} params.tableName * @param {string} params.deploymentId - Deployment ID (UUID) * @param {number | null} params.fid [optional] - Farcaster ID of the user. Required for non-admin users. * * @returns {Promise} A promise that resolves to a `GetTableSchema200Response` object. * * @example * * // Fill in the appropriate values * const tableName = * const deploymentId = * const fid = * * client.getTableSchema({ tableName, deploymentId, fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-table-schema) * */ getTableSchema(params: { tableName: string; deploymentId: string; fid?: number | null; }): Promise; /** * Inserts one or more rows into the specified table. Returns the inserted rows with generated values. * * @summary Insert rows into table * * @param {object} params * @param {string} params.tableName * @param {InsertRowsRequest} params.insertRowsRequest * * @returns {Promise} A promise that resolves to a `InsertRows200Response` object. * * @example * * // Fill in the appropriate values * const tableName = * const insertRowsRequest = * * client.insertRows({ tableName, insertRowsRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/insert-rows) * */ insertRows(params: { tableName: string; insertRowsRequest: InsertRowsRequest; }): Promise; /** * Lists all conversations for a specific deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary List conversations for a deployment * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID (UUID). If provided, filters conversations to this deployment only. * @param {number | null} params.fid [optional] - Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all conversations. * @param {string} params.name [optional] - Kubernetes deployment name. If provided, filters conversations to this deployment only. * @param {boolean | null} params.includeDeleted [optional] - Include deleted conversations in the response. Defaults to false. * * @returns {Promise} A promise that resolves to a `ListConversations200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * const name = * const includeDeleted = * * client.listConversations({ deploymentId, fid, name, includeDeleted }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-conversations) * */ listConversations(params: { deploymentId?: string; fid?: number | null; name?: string; includeDeleted?: boolean | null; }): Promise; /** * Lists files in a directory of the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary List deployment files * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user; if not provided, namespace must be provided * @param {string} params.name [optional] - Kubernetes deployment name. Required if deployment_id not provided. * @param {string} params.namespace [optional] - Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {string} params.directory [optional] - Directory path relative to gen/ (defaults to root) * * @returns {Promise} A promise that resolves to a `ListDeploymentFiles200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * const name = * const namespace = * const directory = * * client.listDeploymentFiles({ deploymentId, fid, name, namespace, directory }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployment-files) * */ listDeploymentFiles(params: { deploymentId?: string; fid?: number | null; name?: string; namespace?: string; directory?: string; }): Promise; /** * Lists all miniapp generator deployments for a user. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary List deployments * * @param {object} params * @param {number | null} params.fid [optional] - Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all deployments. * @param {number} params.limit [optional] - Maximum number of deployments to return. Defaults to 50, max 1000. (Default: 50, Maximum: 1000) * @param {number | null} params.offset [optional] - Number of deployments to skip for pagination. Defaults to 0. * @param {boolean | null} params.includeDeleted [optional] - Include deleted deployments in the response. Defaults to false. * * @returns {Promise>} A promise that resolves to a `Array` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * const offset = * const includeDeleted = * * client.listDeployments({ fid, limit, offset, includeDeleted }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployments) * */ listDeployments(params: { fid?: number | null; limit?: number; offset?: number | null; includeDeleted?: boolean | null; }): Promise>; /** * Retrieves all secrets for a deployment. * * @summary List deployment secrets * * @param {object} params * @param {string} params.deploymentId - Deployment ID to list secrets for * @param {string} params.key [optional] - Optional filter by environment variable name * * @returns {Promise} A promise that resolves to a `ListSecrets200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const key = * * client.listSecrets({ deploymentId, key }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-secrets) * */ listSecrets(params: { deploymentId: string; key?: string; }): Promise; /** * Lists all tables and views in the deployment database, excluding system tables. * * @summary List all tables in deployment database * * @param {object} params * @param {string} params.deploymentId - Deployment ID (UUID) * @param {number | null} params.fid [optional] - Farcaster ID of the user. Required for non-admin users. * * @returns {Promise} A promise that resolves to a `ListTables200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * * client.listTables({ deploymentId, fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-tables) * */ listTables(params: { deploymentId: string; fid?: number | null; }): Promise; /** * Sends a prompt to a specific miniapp generator deployment and returns a streaming response using Server-Sent Events. The response is a continuous stream of Server-Sent Events, not a single JSON payload. Each event contains a JSON object with type, message, and other fields specific to the message type. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Prompt a deployment with streaming response * * @param {object} params * @param {PromptDeploymentStreamRequest} params.promptDeploymentStreamRequest * * @returns {Promise} A promise that resolves to a `void` object. * * @example * * // Fill in the appropriate values * const promptDeploymentStreamRequest = * * client.promptDeploymentStream({ promptDeploymentStreamRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/prompt-deployment-stream) * */ promptDeploymentStream(params: { promptDeploymentStreamRequest: PromptDeploymentStreamRequest; }): Promise; /** * Query data from a table with pagination and sorting. * * @summary Query table data * * @param {object} params * @param {QueryTableRequest} params.queryTableRequest * * @returns {Promise} A promise that resolves to a `QueryTable200Response` object. * * @example * * // Fill in the appropriate values * const queryTableRequest = * * client.queryTable({ queryTableRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/query-table) * */ queryTable(params: { queryTableRequest: QueryTableRequest; }): Promise; /** * Attempts to recover a broken dev server. Phase 1: reads dev server error logs and sends them to an AI agent for fixing, then waits for HMR to auto-rebuild. Phase 2: if HMR fails, falls back to a full npm build with AI retry loop. Streams progress events via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Recover dev server with two-phase strategy * * @param {object} params * @param {RecoverRequest} params.recoverRequest * * @returns {Promise} A promise that resolves to a `void` object. * * @example * * // Fill in the appropriate values * const recoverRequest = * * client.recover({ recoverRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/recover) * */ recover(params: { recoverRequest: RecoverRequest; }): Promise; /** * Starts the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Start generated miniapp * * @param {object} params * @param {StartAppRequest} params.startAppRequest * * @returns {Promise} A promise that resolves to a `StartApp200Response` object. * * @example * * // Fill in the appropriate values * const startAppRequest = * * client.startApp({ startAppRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/start-app) * */ startApp(params: { startAppRequest: StartAppRequest; }): Promise; /** * Stops the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Stop generated miniapp * * @param {object} params * @param {StartAppRequest} params.startAppRequest * * @returns {Promise} A promise that resolves to a `StartApp200Response` object. * * @example * * // Fill in the appropriate values * const startAppRequest = * * client.stopApp({ startAppRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/stop-app) * */ stopApp(params: { startAppRequest: StartAppRequest; }): Promise; /** * Updates rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk updates. * * @summary Update rows in table * * @param {object} params * @param {string} params.tableName * @param {UpdateRowsRequest} params.updateRowsRequest * * @returns {Promise} A promise that resolves to a `UpdateRows200Response` object. * * @example * * // Fill in the appropriate values * const tableName = * const updateRowsRequest = * * client.updateRows({ tableName, updateRowsRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/update-rows) * */ updateRows(params: { tableName: string; updateRowsRequest: UpdateRowsRequest; }): Promise; /** * Uploads an image file to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Upload image to deployment * * @param {object} params * @param {UploadImageUrlRequest} params.uploadImageUrlRequest * * @returns {Promise} A promise that resolves to a `UploadImage200Response` object. * * @example * * // Fill in the appropriate values * const uploadImageUrlRequest = * * client.uploadImage({ uploadImageUrlRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upload-image) * */ uploadImage(params: { uploadImageUrlRequest: UploadImageUrlRequest; }): Promise; /** * Downloads an image from the provided URL and saves it to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Upload image from URL to deployment * * @param {object} params * @param {UploadImageUrlRequest} params.uploadImageUrlRequest * * @returns {Promise} A promise that resolves to a `UploadImage200Response` object. * * @example * * // Fill in the appropriate values * const uploadImageUrlRequest = * * client.uploadImageUrl({ uploadImageUrlRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upload-image-url) * */ uploadImageUrl(params: { uploadImageUrlRequest: UploadImageUrlRequest; }): Promise; /** * Upsert secrets for a deployment. * * @summary Upsert deployment secrets * * @param {object} params * @param {UpsertSecretsRequest} params.upsertSecretsRequest * * @returns {Promise} A promise that resolves to a `UpsertSecrets200Response` object. * * @example * * // Fill in the appropriate values * const upsertSecretsRequest = * * client.upsertSecrets({ upsertSecretsRequest }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upsert-secrets) * */ upsertSecrets(params: { upsertSecretsRequest: UpsertSecretsRequest; }): Promise; /** * Retrieves the build logs for a Vercel deployment. Useful for debugging failed deployments. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get Vercel deployment build logs * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user * @param {string} params.namespace [optional] - K8s Namespace name * @param {string} params.name [optional] - Deployment name used to identify the Vercel project. Required if deployment_id not provided. * @param {number} params.limit [optional] - Maximum number of log events to return. Defaults to 100. * * @returns {Promise} A promise that resolves to a `VercelDeploymentLogs200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * const namespace = * const name = * const limit = * * client.vercelDeploymentLogs({ deploymentId, fid, namespace, name, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/vercel-deployment-logs) * */ vercelDeploymentLogs(params: { deploymentId?: string; fid?: number | null; namespace?: string; name?: string; limit?: number; }): Promise; /** * Retrieves the status of a Vercel deployment for a miniapp. Looks up the Vercel project ID from the deployment and queries Vercel API for deployment status. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * * @summary Get Vercel deployment status * * @param {object} params * @param {string} params.deploymentId [optional] - Deployment ID (UUID). Required if name not provided. * @param {number | null} params.fid [optional] - Farcaster ID of the user; if not provided, namespace must be provided * @param {string} params.namespace [optional] - K8s Namespace name * @param {string} params.name [optional] - Deployment name used to identify the Vercel project. Required if deployment_id not provided. * * @returns {Promise} A promise that resolves to a `VercelDeploymentStatus200Response` object. * * @example * * // Fill in the appropriate values * const deploymentId = * const fid = * const namespace = * const name = * * client.vercelDeploymentStatus({ deploymentId, fid, namespace, name }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/vercel-deployment-status) * */ vercelDeploymentStatus(params: { deploymentId?: string; fid?: number | null; namespace?: string; name?: string; }): Promise; /** * Fetch what FIDs and contracts a FID is subscribed to. * * @summary Subscribed to * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {FetchSubscribedToForFidSubscriptionProviderEnum} params.subscriptionProvider - The provider of the subscription. * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `SubscribedToResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const subscriptionProvider = * const viewerFid = * * client.fetchSubscribedToForFid({ fid, subscriptionProvider, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-subscribed-to-for-fid) * */ fetchSubscribedToForFid(params: { fid: number; subscriptionProvider: FetchSubscribedToForFidSubscriptionProviderEnum; viewerFid?: number; }): Promise; /** * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. * * @summary Subscribers of a user * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {FetchSubscribersForFidSubscriptionProviderEnum} params.subscriptionProvider - The provider of the subscription. * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `SubscribersResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const subscriptionProvider = * const viewerFid = * * client.fetchSubscribersForFid({ fid, subscriptionProvider, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-subscribers-for-fid) * */ fetchSubscribersForFid(params: { fid: number; subscriptionProvider: FetchSubscribersForFidSubscriptionProviderEnum; viewerFid?: number; }): Promise; /** * Check if a wallet address is subscribed to a given STP (Hypersub) contract. * * @summary Hypersub subscription check * * @param {object} params * @param {string[]} params.addresses - Comma separated list of Ethereum addresses, up to 350 at a time * @param {string} params.contractAddress - Ethereum address of the STP contract * @param {string} params.chainId - Chain ID of the STP contract * * @returns {Promise} A promise that resolves to a `SubscriptionCheckResponse` object. * * @example * * // Fill in the appropriate values * const addresses = * const contractAddress = * const chainId = * * client.fetchSubscriptionCheck({ addresses, contractAddress, chainId }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-subscription-check) * */ fetchSubscriptionCheck(params: { addresses: string[]; contractAddress: string; chainId: string; }): Promise; /** * Fetch created subscriptions for a given FID\'s. * * @summary Subscriptions created by FID * * @param {object} params * @param {number} params.fid - The unique identifier of a farcaster user or app (unsigned integer) * @param {FetchSubscriptionsForFidSubscriptionProviderEnum} params.subscriptionProvider - The provider of the subscription. * * @returns {Promise} A promise that resolves to a `SubscriptionsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const subscriptionProvider = * * client.fetchSubscriptionsForFid({ fid, subscriptionProvider }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-subscriptions-for-fid) * */ fetchSubscriptionsForFid(params: { fid: number; subscriptionProvider: FetchSubscriptionsForFidSubscriptionProviderEnum; }): Promise; /** * Returns a list of trending topics for casts. * * @summary Fetch trending topics * * @param {object} params * @param {number} params.limit [optional] - Number of topics to fetch. (Default: 10, Maximum: 25) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `TrendingTopicsResponse` object. * * @example * * // Fill in the appropriate values * const limit = * * client.listTrendingTopics({ limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-trending-topics) * */ listTrendingTopics(params: { limit?: number; cursor?: string; }): Promise; /** * Removes verification for an eth address for the user (In order to delete verification `signer_uuid` must be approved) * * @summary Delete verification * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.address - Ethereum address * @param {string} params.blockHash * @param {string} params.ethSignature * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const address = * const blockHash = * const ethSignature = * * client.deleteVerification({signerUuid, address, blockHash, ethSignature}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-verification) * */ deleteVerification(params: { signerUuid: string; address: string; blockHash: string; ethSignature: string; }): Promise; /** * Fetches information about multiple users based on FIDs * * @summary By FIDs * * @param {object} params * @param {number[]} params.fids - Comma separated list of FIDs, up to 100 at a time * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `BulkUsersResponse` object. * * @example * * // Fill in the appropriate values * const fids = * const viewerFid = * * client.fetchBulkUsers({ fids, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users) * */ fetchBulkUsers(params: { fids: number[]; viewerFid?: number; }): Promise; /** * Fetches all users based on multiple Ethereum or Solana addresses. Each farcaster user has a custody Ethereum address and optionally verified Ethereum or Solana addresses. This endpoint returns all users that have any of the given addresses as their custody or verified Ethereum or Solana addresses. A custody address can be associated with only 1 farcaster user at a time but a verified address can be associated with multiple users. You can pass in Ethereum and Solana addresses, comma separated, in the same request. The response will contain users associated with the given addresses. * * @summary By Eth or Sol addresses * * @param {object} params * @param {string[]} params.addresses - Comma separated list of Ethereum or Solana addresses, up to 350 at a time * @param {Array} params.addressTypes [optional] - Customize which address types the request should search for. This is a comma-separated string that can include the following values: 'custody_address' and 'verified_address'. By default api returns both. To select multiple types, use a comma-separated list of these values. * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `BulkUsersByAddressResponse` object. * * @example * * // Fill in the appropriate values * const addresses = * const addressTypes = * const viewerFid = * * client.fetchBulkUsersByEthOrSolAddress({ addresses, addressTypes, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users-by-eth-or-sol-address) * */ fetchBulkUsersByEthOrSolAddress(params: { addresses: string[]; addressTypes?: Array; viewerFid?: number; }): Promise; /** * Fetches a list of users given a location * * @summary By location * * @param {object} params * @param {number | null} params.latitude - Latitude of the location * @param {number | null} params.longitude - Longitude of the location * @param {number} params.viewerFid [optional] - FID of the user viewing the feed. Providing this will return a list of users that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of results to fetch (Default: 25, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * * @returns {Promise} A promise that resolves to a `UsersResponse` object. * * @example * * // Fill in the appropriate values * const latitude = * const longitude = * const viewerFid = * const limit = * * client.fetchUsersByLocation({ latitude, longitude, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-users-by-location) * */ fetchUsersByLocation(params: { latitude: number | null; longitude: number | null; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Fetch all Ethereum and Solana verified addresses for a Farcaster user. Use this endpoint to identify which wallets are associated with which Farcaster applications for the specified user. * * @summary Fetch verifications * * @param {object} params * @param {number | null} params.fid - FID of the user whose verifications to fetch * * @returns {Promise} A promise that resolves to a `FetchVerifications200Response` object. * * @example * * // Fill in the appropriate values * const fid = * * client.fetchVerifications({ fid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-verifications) * */ fetchVerifications(params: { fid: number | null; }): Promise; /** * Follow a user (In order to follow a user `signer_uuid` must be approved) * * @summary Follow user * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {Array} params.targetFids * * @returns {Promise} A promise that resolves to a `BulkFollowResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const targetFids = * * client.followUser({signerUuid, targetFids}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/follow-user) * */ followUser(params: { signerUuid: string; targetFids: Array; }): Promise; /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-account). * * @summary Fetch fresh FID * * @param {object} params * * @returns {Promise} A promise that resolves to a `UserFIDResponse` object. * * @example * * // Fill in the appropriate values * * client.getFreshAccountFID().then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ getFreshAccountFID(): Promise; /** * Returns the best friends of a user ranked by mutual affinity score based on interactions with each other. * * @summary Best friends * * @param {object} params * @param {number} params.fid - The FID of the user * @param {number} params.limit [optional] - Number of results to fetch (Default: 3, Maximum: 100) * @param {string} params.cursor [optional] - Pagination cursor * * @returns {Promise} A promise that resolves to a `BestFriendsResponse` object. * * @example * * // Fill in the appropriate values * const fid = * const limit = * * client.getUserBestFriends({ fid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-user-best-friends) * */ getUserBestFriends(params: { fid: number; limit?: number; cursor?: string; }): Promise; /** * Lookup a user by custody-address * * @summary By custody-address * * @param {object} params * @param {string} params.custodyAddress - Custody Address associated with mnemonic * * @returns {Promise} A promise that resolves to a `UserResponse` object. * * @example * * // Fill in the appropriate values * const custodyAddress = * * client.lookupUserByCustodyAddress({ custodyAddress }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-by-custody-address) * */ lookupUserByCustodyAddress(params: { custodyAddress: string; }): Promise; /** * Fetches a single hydrated user object given a username * * @summary By username * * @param {object} params * @param {string} params.username - Username of the user to fetch * @param {number} params.viewerFid [optional] * * @returns {Promise} A promise that resolves to a `UserResponse` object. * * @example * * // Fill in the appropriate values * const username = * const viewerFid = * * client.lookupUserByUsername({ username, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-by-username) * */ lookupUserByUsername(params: { username: string; viewerFid?: number; }): Promise; /** * Fetches the users who have verified the specified X (Twitter) username * * @summary By X username * * @param {object} params * @param {string} params.xUsername - X (Twitter) username to search for, without the @ symbol * @param {number} params.viewerFid [optional] - FID of the viewer for contextual information like follows and blocks * * @returns {Promise} A promise that resolves to a `BulkUsersResponse` object. * * @example * * // Fill in the appropriate values * const xUsername = * const viewerFid = * * client.lookupUsersByXUsername({ xUsername, viewerFid }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-users-by-x-username) * */ lookupUsersByXUsername(params: { xUsername: string; viewerFid?: number; }): Promise; /** * Adds verification for an eth address or contract for the user (In order to add verification `signer_uuid` must be approved) * * @summary Add verification * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.address - Ethereum address * @param {string} params.blockHash * @param {string} params.ethSignature * @param {VerificationType} params.verificationType [optional] * @param {VerificationChainId} params.chainId [optional] * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const address = * const blockHash = * const ethSignature = * const verificationType = * const chainId = * * client.publishVerification({signerUuid, address, blockHash, ethSignature, verificationType, chainId}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-verification) * */ publishVerification(params: { signerUuid: string; address: string; blockHash: string; ethSignature: string; verificationType?: VerificationType; chainId?: VerificationChainId; }): Promise; /** * Register account on farcaster. Optionally provide x-wallet-id header to use your own wallet. **Note:** This API must be called within 10 minutes of the fetch FID API call (i.e., /v2/farcaster/user/fid). Otherwise, Neynar will assign this FID to another available user. * * @summary Register new account * * @param {object} params * @param {RegisterUserReqBodySigner} params.signer [optional] * @param {string} params.signature * @param {number} params.fid * @param {string} params.requestedUserCustodyAddress * @param {number} params.deadline * @param {string} params.fname [optional] * @param {RegisterUserReqBodyMetadata} params.metadata [optional] * * @returns {Promise} A promise that resolves to a `RegisterUserResponse` object. * * @example * * // Fill in the appropriate values * const signer = * const signature = * const fid = * const requestedUserCustodyAddress = * const deadline = * const fname = * const metadata = * * client.registerAccount({signer, signature, fid, requestedUserCustodyAddress, deadline, fname, metadata}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account) * */ registerAccount(params: { signer?: RegisterUserReqBodySigner; signature: string; fid: number; requestedUserCustodyAddress: string; deadline: number; fname?: string; metadata?: RegisterUserReqBodyMetadata; }): Promise; /** * Search for Usernames * * @summary Search for Usernames * * @param {object} params * @param {string} params.q * @param {number} params.viewerFid [optional] - Providing this will return search results that respects this user's mutes and blocks and includes `viewer_context`. * @param {number} params.limit [optional] - Number of users to fetch (Default: 5, Maximum: 10) * @param {string} params.cursor [optional] - Pagination cursor. * * @returns {Promise} A promise that resolves to a `UserSearchResponse` object. * * @example * * // Fill in the appropriate values * const q = * const viewerFid = * const limit = * * client.searchUser({ q, viewerFid, limit }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-user) * */ searchUser(params: { q: string; viewerFid?: number; limit?: number; cursor?: string; }): Promise; /** * Unfollow a user (In order to unfollow a user `signer_uuid` must be approved) * * @summary Unfollow user * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {Array} params.targetFids * * @returns {Promise} A promise that resolves to a `BulkFollowResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const targetFids = * * client.unfollowUser({signerUuid, targetFids}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/unfollow-user) * */ unfollowUser(params: { signerUuid: string; targetFids: Array; }): Promise; /** * Update user profile (In order to update user\'s profile `signer_uuid` must be approved) * * @summary Update user profile * * @param {object} params * @param {string} params.signerUuid - UUID of the signer. `signer_uuid` is paired with API key, can't use a `uuid` made with a different API key. * @param {string} params.bio [optional] * @param {string} params.pfpUrl [optional] * @param {string} params.url [optional] * @param {string} params.username [optional] * @param {string} params.displayName [optional] * @param {UpdateUserReqBodyLocation} params.location [optional] * @param {string} params.banner [optional] - Requires pro subscription. * @param {string} params.primaryEthAddress [optional] - Must be one of the verified addresses. * @param {string} params.primarySolAddress [optional] - Must be one of the verified addresses. * @param {UpdateUserReqBodyVerifiedAccounts} params.verifiedAccounts [optional] * * @returns {Promise} A promise that resolves to a `OperationResponse` object. * * @example * * // Fill in the appropriate values * const signerUuid = * const bio = * const pfpUrl = * const url = * const username = * const displayName = * const location = * const banner = * const primaryEthAddress = * const primarySolAddress = * const verifiedAccounts = * * client.updateUser({signerUuid, bio, pfpUrl, url, username, displayName, location, banner, primaryEthAddress, primarySolAddress, verifiedAccounts}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/update-user) * */ updateUser(params: { signerUuid: string; bio?: string; pfpUrl?: string; url?: string; username?: string; displayName?: string; location?: UpdateUserReqBodyLocation; banner?: string; primaryEthAddress?: string; primarySolAddress?: string; verifiedAccounts?: UpdateUserReqBodyVerifiedAccounts; }): Promise; /** * Delete a webhook * * @summary Delete a webhook * * @param {object} params * @param {string} params.webhookId * * @returns {Promise} A promise that resolves to a `WebhookResponse` object. * * @example * * // Fill in the appropriate values * const webhookId = * * client.deleteWebhook({webhookId}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-webhook) * */ deleteWebhook(params: { webhookId: string; }): Promise; /** * Fetch a list of webhooks associated to a user * * @summary Associated webhooks of user * * * @returns {Promise} A promise that resolves to a `WebhookListResponse` object. * * @example * * client.fetchWebhooks().then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-webhooks) * */ fetchWebhooks(): Promise; /** * Fetch a webhook * * @summary Fetch a webhook * * @param {object} params * @param {string} params.webhookId * * @returns {Promise} A promise that resolves to a `WebhookResponse` object. * * @example * * // Fill in the appropriate values * const webhookId = * * client.lookupWebhook({ webhookId }).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-webhook) * */ lookupWebhook(params: { webhookId: string; }): Promise; /** * Create a webhook * * @summary Create a webhook * * @param {object} params * @param {string} params.name * @param {string} params.url * @param {WebhookSubscriptionFilters} params.subscription [optional] * * @returns {Promise} A promise that resolves to a `WebhookResponse` object. * * @example * * // Fill in the appropriate values * const name = * const url = * const subscription = * * client.publishWebhook({name, url, subscription}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-webhook) * */ publishWebhook(params: { name: string; url: string; subscription?: WebhookSubscriptionFilters; }): Promise; /** * Update a webhook * * @summary Update a webhook * * @param {object} params * @param {string} params.name * @param {string} params.url * @param {WebhookSubscriptionFilters} params.subscription [optional] * @param {string} params.webhookId * * @returns {Promise} A promise that resolves to a `WebhookResponse` object. * * @example * * // Fill in the appropriate values * const name = * const url = * const subscription = * const webhookId = * * client.updateWebhook({name, url, subscription, webhookId}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/update-webhook) * */ updateWebhook(params: { name: string; url: string; subscription?: WebhookSubscriptionFilters; webhookId: string; }): Promise; /** * Update webhook active status * * @summary Update webhook status * * @param {object} params * @param {string} params.webhookId * @param {WebhookPatchReqBodyActiveEnum} params.active * * @returns {Promise} A promise that resolves to a `WebhookResponse` object. * * @example * * // Fill in the appropriate values * const webhookId = * const active = * * client.updateWebhookActiveStatus({webhookId, active}).then(response => { * console.log('response:', response); * }); * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/update-webhook-active-status) * */ updateWebhookActiveStatus(params: { webhookId: string; active: WebhookPatchReqBodyActiveEnum; }): Promise; /** * Creates a signer and registers a signed key for the signer. * It returns a Signer which includes `signer_approval_url` that can be used to create a QR Code for the user to scan and approve the signer. * * @param {Object} [options] - Optional parameters for the request. * @param {string} [options.farcasterDeveloperMnemonic] - mnemonic of the farcaster developer account * @param {number} [options.deadline] - (Optional) Unix timestamp in seconds that controls how long the signed key * request is valid for. A 24-hour duration from now is recommended. * * @returns {Promise} A promise that resolves to a `Signer` object, * that includes signer_approval_url. * * @example * * // Fill in the appropriate values * * const farcasterDeveloperMnemonic = * const deadline = * * client.createSignerAndRegisterSignedKey({ farcasterDeveloperMnemonic, deadline: 1693927665 }).then(response => { * console.log('Signer', response); * }); */ createSignerAndRegisterSignedKey(params: { farcasterDeveloperMnemonic: string; deadline?: number; }): Promise; }