diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index a2ceaea6..787bdb61 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -37,8 +37,6 @@ import { UsersActiveChannelsResponse, NeynarFrame, DeleteFrameResponse, - NeynarFrameUpdateRequest, - NeynarFrameCreationRequest, UserFIDResponse, RegisterUserResponse, DeveloperManagedSigner, @@ -85,6 +83,8 @@ import { FarcasterActionReqBodyAction, UpdateUserReqBodyLocation, PostCastReqBodyEmbeds, + NeynarFrameUpdateReqBody, + NeynarFrameCreationReqBody, } from "./v2/openapi-farcaster"; import { @@ -773,7 +773,7 @@ export class NeynarAPIClient { } /** - * Retrieves information status of a signer by passing in a signer_uuid + * Retrieves information status of a signer by passing in a signerUuid * * @param {string} signerUuid - The unique identifier (UUID) of the signer to be fetched. * @@ -786,7 +786,7 @@ export class NeynarAPIClient { * console.log('Signer Details:', response); // Outputs the details of the signer * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/signer). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/lookup-signer). */ public async lookupSigner(signerUuid: string): Promise { return await this.clients.v2.lookupSigner(signerUuid); @@ -869,7 +869,7 @@ export class NeynarAPIClient { * console.log('Developer Managed Signer Status:', response); * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/developer-managed-signer). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/lookup-developer-managed-signer). */ public async lookupDeveloperManagedSigner( publicKey: string @@ -1064,37 +1064,6 @@ export class NeynarAPIClient { return await this.clients.v2.fetchPowerUsersLite(); } - /** - * Retrieves a list of active users, where "active" is determined by the Warpcast active algorithm. - * The information about active users is updated every 12 hours. This method is ideal for identifying - * users who are currently engaging with the platform. - * - * @param {Object} [options] - Optional parameters to customize the request. - * @param {number} [options.limit] - Number of results to retrieve, with a default of 25 and a maximum of 150. - * @param {string} [options.cursor] - Pagination cursor for fetching specific subsets of results. - * Omit this parameter for the initial request. - * - * @returns {Promise} A promise that resolves to a `UsersResponse` object, - * containing a list of active users and any relevant pagination information. - * - * @example - * // Example: Fetch a list of active users with a limit and pagination cursor - * client.fetchActiveUsers({ - * limit: 50, - * // cursor: "nextPageCursor" // Omit this parameter for the initial request - * }).then(response => { - * console.log('Active Users:', response); - * }); - * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/active-users). - */ - public async fetchActiveUsers(options?: { - limit?: number; - cursor?: string; - }): Promise { - return await this.clients.v2.fetchActiveUsers(options); - } - /** * Removes verification for an eth address for the user. * (In order to delete verification signer_uuid must be approved) @@ -1525,25 +1494,25 @@ export class NeynarAPIClient { return await this.clients.v2.lookupUserByUsernameV2(username, options); } - /** + /** * Retrieves users by their location, specified by latitude and longitude coordinates. - * + * * @param {number} latitude - The latitude coordinate of the location. * @param {number} longitude - The longitude coordinate of the location. * @param {Object} [options] - Optional parameters to tailor the request. * @param {number} [options.viewerFid] - The FID of the user viewing this information, used for providing contextual data specific to the viewer. * @param {number} [options.limit] - The number of users to fetch per request. Defaults to 25 with a maximum of 100. * @param {string} [options.cursor] - Pagination cursor for fetching specific subsets of results. - * - * @returns {Promise} A promise that resolves to a `UsersResponse` object, + * + * @returns {Promise} A promise that resolves to a `UsersResponse` object, * containing information about the users at the specified location. - * + * * @example * // Example: Fetch users by location with viewer fid * client.fetchUsersByLocation(37.7749, -122.4194, {viewerFid: 3}).then(response => { * console.log('Users by Location:', response); * }); - * + * * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/user-by-location). */ public async fetchUsersByLocation( @@ -1555,7 +1524,11 @@ export class NeynarAPIClient { cursor?: string; } ): Promise { - return await this.clients.v2.fetchUsersByLocation(latitude, longitude, options); + return await this.clients.v2.fetchUsersByLocation( + latitude, + longitude, + options + ); } // ------------ Cast ------------ @@ -3237,7 +3210,7 @@ export class NeynarAPIClient { * Creates a new frame with a list of pages. This method enables developers to add new frames * to their content offerings, identified by the provided API key. * - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - The request object containing the details for the new frame. + * @param {NeynarFrameCreationReqBody} neynarFrameCreationRequest - The request object containing the details for the new frame. * * @returns {Promise} A promise that resolves to the newly created frame object. * @@ -3254,7 +3227,7 @@ export class NeynarAPIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/publish-neynar-frame). */ public async publishNeynarFrame( - neynarFrameCreationRequest: NeynarFrameCreationRequest + neynarFrameCreationRequest: NeynarFrameCreationReqBody ): Promise { return await this.clients.v2.publishNeynarFrame(neynarFrameCreationRequest); } @@ -3263,7 +3236,7 @@ export class NeynarAPIClient { * Updates an existing frame with new content or properties, assuming the frame was created by the developer, * as identified by the provided API key. This method allows for modifying frames post-creation. * - * @param {NeynarFrameUpdateRequest} neynarFrame - The new content or properties for the frame being updated. + * @param {NeynarFrameUpdateReqBody} neynarFrame - The new content or properties for the frame being updated. * * @returns {Promise} A promise that resolves to a `NeynarFrame` object, * reflecting the updated state of the frame. @@ -3281,7 +3254,7 @@ export class NeynarAPIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/update-neynar-frame). */ public async updateNeynarFrame( - neynarFrame: NeynarFrameUpdateRequest + neynarFrame: NeynarFrameUpdateReqBody ): Promise { return await this.clients.v2.updateNeynarFrame(neynarFrame); } diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index ae4c8e08..e1abfce7 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -44,12 +44,8 @@ import { FrameApi, FrameActionReqBody, FrameAction, - ValidateFrameRequest, ValidateFrameActionResponse, UsersResponse, - DeleteNeynarFrameRequest, - NeynarFrameUpdateRequest, - NeynarFrameCreationRequest, DeveloperManagedSigner, WebhookApi, WebhookResponse, @@ -98,9 +94,7 @@ import { NotificationType, EmbedType, ChannelMemberRole, - RespondChannelInviteRequest, CastConversationSortType, - RemoveChannelMemberRequest, ChannelMemberListResponse, ChannelFollowReqBody, FollowersResponse, @@ -110,6 +104,13 @@ import { UpdateUserReqBodyLocation, PostCastReqBodyEmbeds, PostCastReqBody, + ValidateFrameActionReqBody, + DeleteFrameReqBody, + NeynarFrameUpdateReqBody, + NeynarFrameCreationReqBody, + InviteChannelMemberReqBody, + RemoveChannelMemberReqBody, + RespondChannelInviteReqBody, } from "./openapi-farcaster"; import axios, { AxiosError, AxiosInstance } from "axios"; import { silentLogger, Logger } from "../common/logger"; @@ -360,10 +361,10 @@ export class NeynarV2APIClient { * console.log('Signer Details:', response); // Outputs the details of the signer * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/signer). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/lookup-signer). */ public async lookupSigner(signerUuid: string): Promise { - const response = await this.apis.signer.signer(signerUuid); + const response = await this.apis.signer.lookupSigner(signerUuid); return response.data; } @@ -452,12 +453,14 @@ export class NeynarV2APIClient { * console.log('Developer Managed Signer Status:', response); * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/developer-managed-signer). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/lookup-developer-managed-signer). */ public async lookupDeveloperManagedSigner( publicKey: string ): Promise { - const response = await this.apis.signer.developerManagedSigner(publicKey); + const response = await this.apis.signer.lookupDeveloperManagedSigner( + publicKey + ); return response.data; } @@ -542,10 +545,10 @@ export class NeynarV2APIClient { * * Note: Ensure the message is properly signed using a developer-managed signer before publishing. * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/publish-message). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/publish-message-to-farcaster). */ public async publishMessageToFarcaster(message: object) { - const response = await this.apis.signer.publishMessage(message); + const response = await this.apis.signer.publishMessageToFarcaster(message); return response.data; } @@ -567,7 +570,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/get-fresh-fid). */ public async getFreshAccountFID() { - const response = await this.apis.user.getFreshFid(); + const response = await this.apis.user.getFreshAccountFID(); return response.data; } @@ -609,7 +612,7 @@ export class NeynarV2APIClient { deadline, fname: options?.fname, }; - const response = await this.apis.user.registerUser(registerUserReqBody); + const response = await this.apis.user.registerAccount(registerUserReqBody); return response.data; } @@ -639,7 +642,7 @@ export class NeynarV2APIClient { cursor?: string; viewerFid?: number; }): Promise { - const response = await this.apis.user.powerUsers( + const response = await this.apis.user.fetchPowerUsers( options?.viewerFid, options?.limit, options?.cursor @@ -664,42 +667,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Farcaster documentation](https://docs.neynar.com/reference/user-power-lite). */ public async fetchPowerUsersLite(): Promise { - const response = await this.apis.user.userPowerLite(); - return response.data; - } - - /** - * Retrieves a list of active users, where "active" is determined by the Warpcast active algorithm. - * The information about active users is updated every 12 hours. This method is ideal for identifying - * users who are currently engaging with the platform. - * - * @param {Object} [options] - Optional parameters to customize the request. - * @param {number} [options.limit] - Number of results to retrieve, with a default of 25 and a maximum of 150. - * @param {string} [options.cursor] - Pagination cursor for fetching specific subsets of results. - * Omit this parameter for the initial request. - * - * @returns {Promise} A promise that resolves to a `UsersResponse` object, - * containing a list of active users and any relevant pagination information. - * - * @example - * // Example: Fetch a list of active users with a limit and pagination cursor - * client.fetchActiveUsers({ - * limit: 50, - * // cursor: "nextPageCursor" // Omit this parameter for the initial request - * }).then(response => { - * console.log('Active Users:', response); - * }); - * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/active-users). - */ - public async fetchActiveUsers(options?: { - limit?: number; - cursor?: string; - }): Promise { - const response = await this.apis.user.activeUsers( - options?.limit, - options?.cursor - ); + const response = await this.apis.user.fetchPowerUsersLite(); return response.data; } @@ -730,7 +698,7 @@ export class NeynarV2APIClient { address, }; - const response = await this.apis.user.farcasterUserVerificationDelete( + const response = await this.apis.user.deleteVerification( removeVerificationReqBody ); return response.data; @@ -769,7 +737,7 @@ export class NeynarV2APIClient { eth_signature: ethSignature, }; - const response = await this.apis.user.farcasterUserVerificationPost( + const response = await this.apis.user.publishVerification( addVerificationReqBody ); return response.data; @@ -919,7 +887,10 @@ export class NeynarV2APIClient { if (fids.length > 100) throw new Error("Maximum number of fids allowed is 100"); const _fids = fids.join(","); - const response = await this.apis.user.userBulk(_fids, options?.viewerFid); + const response = await this.apis.user.fetchBulkUsers( + _fids, + options?.viewerFid + ); return response.data; } @@ -966,7 +937,7 @@ export class NeynarV2APIClient { const _addresses = addresses.join(","); const _addressTypes = options?.addressTypes && options?.addressTypes.join(","); - const response = await this.apis.user.userBulkByAddress( + const response = await this.apis.user.fetchBulkUsersByEthereumAddress( _addresses, _addressTypes, options?.viewerFid @@ -1000,7 +971,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.user.userSearch( + const response = await this.apis.user.searchUser( q, viewerFid, options?.limit, @@ -1058,7 +1029,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.user.userByUsernameV2( + const response = await this.apis.user.lookupUserByUsername( username, options?.viewerFid ); @@ -1067,23 +1038,23 @@ export class NeynarV2APIClient { /** * Retrieves users by their location, specified by latitude and longitude coordinates. - * + * * @param {number} latitude - The latitude coordinate of the location. * @param {number} longitude - The longitude coordinate of the location. * @param {Object} [options] - Optional parameters to tailor the request. * @param {number} [options.viewerFid] - The FID of the user viewing this information, used for providing contextual data specific to the viewer. * @param {number} [options.limit] - The number of users to fetch per request. Defaults to 25 with a maximum of 100. * @param {string} [options.cursor] - Pagination cursor for fetching specific subsets of results. - * - * @returns {Promise} A promise that resolves to a `UsersResponse` object, + * + * @returns {Promise} A promise that resolves to a `UsersResponse` object, * containing information about the users at the specified location. - * + * * @example * // Example: Fetch users by location with viewer fid * client.fetchUsersByLocation(37.7749, -122.4194, {viewerFid: 3}).then(response => { * console.log('Users by Location:', response); * }); - * + * * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/user-by-location). */ public async fetchUsersByLocation( @@ -1140,7 +1111,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.cast.cast( + const response = await this.apis.cast.lookupCastByHashOrWarpcastUrl( castHashOrUrl, type, options?.viewerFid @@ -1185,7 +1156,7 @@ export class NeynarV2APIClient { } ): Promise { const _castsHashes = castsHashes.join(","); - const response = await this.apis.cast.casts( + const response = await this.apis.cast.fetchBulkCasts( _castsHashes, options?.viewerFid, options?.sortType @@ -1282,7 +1253,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.cast.castConversation( + const response = await this.apis.cast.lookupCastConversation( castHashOrUrl, type, options?.replyDepth, @@ -1333,7 +1304,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.cast.castSearch( + const response = await this.apis.cast.searchCasts( q, options?.authorFid, options?.viewerFid, @@ -1397,7 +1368,7 @@ export class NeynarV2APIClient { idem: options?.idem, parent_author_fid: options?.parent_author_fid, }; - const response = await this.apis.cast.postCast(postCastReqBody); + const response = await this.apis.cast.publishCast(postCastReqBody); return response.data.cast; } @@ -1462,7 +1433,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.cast.composerList( + const response = await this.apis.cast.fetchComposerActions( list, options?.limit, options?.cursor @@ -1522,7 +1493,7 @@ export class NeynarV2APIClient { ): Promise { const _fids = options?.fids?.join(","); - const response = await this.apis.feed.feed( + const response = await this.apis.feed.fetchFeed( feedType, options?.filterType, options?.fid, @@ -1578,7 +1549,7 @@ export class NeynarV2APIClient { } ): Promise { const _channelIds = channelIds.join(","); - const response = await this.apis.feed.feedChannels( + const response = await this.apis.feed.fetchFeedByChannelIds( _channelIds, options?.withRecasts, options?.viewerFid, @@ -1624,7 +1595,7 @@ export class NeynarV2APIClient { } ): Promise { const _parentUrls = parentUrls.join(","); - const response = await this.apis.feed.feedParentUrls( + const response = await this.apis.feed.fetchFeedByParentUrls( _parentUrls, options?.withRecasts, options?.viewerFid, @@ -1670,7 +1641,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.feed.feedFollowing( + const response = await this.apis.feed.fetchUserFollowingFeed( fid, options?.viewerFid, options?.withRecasts, @@ -1728,7 +1699,7 @@ export class NeynarV2APIClient { providerMetadata?: string; } ): Promise { - const response = await this.apis.feed.feedForYou( + const response = await this.apis.feed.fetchFeedForYou( fid, options?.viewerFid, options?.provider, @@ -1765,7 +1736,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.feed.feedUserPopular( + const response = await this.apis.feed.fetchPopularCastsByUser( fid, options?.viewerFid ); @@ -1815,7 +1786,7 @@ export class NeynarV2APIClient { channelId?: string; } ): Promise { - const response = await this.apis.feed.feedUserCasts( + const response = await this.apis.feed.fetchCastsForUser( fid, options?.viewerFid, options?.limit, @@ -1858,7 +1829,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.feed.feedUserRepliesRecasts( + const response = await this.apis.feed.fetchRepliesAndRecastsForUser( fid, options?.filter, options?.limit, @@ -1894,7 +1865,7 @@ export class NeynarV2APIClient { cursor?: string; viewerFid?: number; }) { - const response = await this.apis.feed.feedFrames( + const response = await this.apis.feed.fetchFramesOnlyFeed( options?.limit, options?.viewerFid, options?.cursor @@ -1945,7 +1916,7 @@ export class NeynarV2APIClient { provider?: FeedTrendingProvider; providerMetadata?: string; }) { - const response = await this.apis.feed.feedTrending( + const response = await this.apis.feed.fetchTrendingFeed( options?.limit, options?.cursor, options?.viewerFid, @@ -2001,7 +1972,7 @@ export class NeynarV2APIClient { target: castHash, idem: options?.idem, }; - const response = await this.apis.reaction.postReaction(body); + const response = await this.apis.reaction.publishReaction(body); return response.data; } @@ -2082,7 +2053,7 @@ export class NeynarV2APIClient { type: ReactionsType, options?: { limit?: number; cursor?: string; viewerFid?: number } ): Promise { - const response = await this.apis.reaction.reactionsUser( + const response = await this.apis.reaction.fetchUserReactions( fid, type, options?.viewerFid, @@ -2119,14 +2090,14 @@ export class NeynarV2APIClient { * console.log('Cast Reactions:', response); // Outputs the casts reactions * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/reactions-cast). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/fetch-cast-reactions). */ public async fetchReactionsForCast( hash: string, types: ReactionsType, options?: { limit?: number; cursor?: string; viewerFid?: number } ): Promise { - const response = await this.apis.reaction.reactionsCast( + const response = await this.apis.reaction.fetchCastReactions( hash, types, options?.viewerFid, @@ -2170,7 +2141,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.notifications.notifications( + const response = await this.apis.notifications.fetchAllNotifications( fid, options?.type, options?.priorityMode, @@ -2212,12 +2183,13 @@ export class NeynarV2APIClient { options?: { priorityMode?: boolean; cursor?: string } ): Promise { const _channelIds = channelIds.join(","); - const response = await this.apis.notifications.notificationsChannel( - fid, - _channelIds, - options?.priorityMode, - options?.cursor - ); + const response = + await this.apis.notifications.fetchChannelNotificationsForUser( + fid, + _channelIds, + options?.priorityMode, + options?.cursor + ); return response.data; } @@ -2250,12 +2222,13 @@ export class NeynarV2APIClient { options?: { priorityMode?: boolean; cursor?: string } ) { const _parentUrls = parentUrls.join(","); - const response = await this.apis.notifications.notificationsParentUrl( - fid, - _parentUrls, - options?.priorityMode, - options?.cursor - ); + const response = + await this.apis.notifications.fetchNotificationsByParentUrlForUser( + fid, + _parentUrls, + options?.priorityMode, + options?.cursor + ); return response.data; } @@ -2321,7 +2294,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.channel.userChannels( + const response = await this.apis.channel.fetchUserChannels( fid, options?.limit, options?.cursor @@ -2357,7 +2330,7 @@ export class NeynarV2APIClient { } ): Promise { const _ids = ids.join(","); - const response = await this.apis.channel.channelDetailsBulk( + const response = await this.apis.channel.fetchBulkChannels( _ids, options?.type, options?.viewerFid @@ -2394,7 +2367,7 @@ export class NeynarV2APIClient { type?: ChannelType; } ): Promise { - const response = await this.apis.channel.channelDetails( + const response = await this.apis.channel.lookupChannel( id, options?.type, options?.viewerFid @@ -2428,7 +2401,7 @@ export class NeynarV2APIClient { cursor?: string; } ) { - const response = await this.apis.channel.activeChannels( + const response = await this.apis.channel.fetchUsersActiveChannels( fid, options?.limit, options?.cursor @@ -2477,7 +2450,7 @@ export class NeynarV2APIClient { limit?: number; } ): Promise { - const response = await this.apis.channel.channelUsers( + const response = await this.apis.channel.fetchActiveUsersInSingleChannel( id, hasRootCastAuthors, options?.hasCastLikers, @@ -2580,7 +2553,7 @@ export class NeynarV2APIClient { limit?: number; cursor?: string; }): Promise { - const response = await this.apis.channel.listAllChannels( + const response = await this.apis.channel.fetchAllChannels( options?.limit, options?.cursor ); @@ -2616,7 +2589,7 @@ export class NeynarV2APIClient { limit?: number; cursor?: string; }) { - const response = await this.apis.channel.listChannelInvites( + const response = await this.apis.channel.fetchChannelInvites( options?.channelId, options?.invitedFid, options?.limit, @@ -2660,7 +2633,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.channel.listChannelMembers( + const response = await this.apis.channel.fetchChannelMembers( channelId, options?.fid, options?.limit, @@ -2732,7 +2705,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.channel.trendingChannels( + const response = await this.apis.channel.fetchTrendingChannels( timeWindow, options?.limit, options?.cursor @@ -2770,7 +2743,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.channel.channelFollowers( + const response = await this.apis.channel.fetchFollowersForAChannel( id, options?.viewerFid, options?.cursor, @@ -2802,7 +2775,7 @@ export class NeynarV2APIClient { id: string, viewerFid: number ): Promise { - const response = await this.apis.channel.relevantChannelFollowers( + const response = await this.apis.channel.fetchRelevantFollowersForAChannel( id, viewerFid ); @@ -2843,7 +2816,7 @@ export class NeynarV2APIClient { fid: number, role: ChannelMemberRole ): Promise { - const inviteChannelMemberRequest: RemoveChannelMemberRequest = { + const inviteChannelMemberRequest: InviteChannelMemberReqBody = { signer_uuid: signerUuid, channel_id: channelId, fid: fid, @@ -2888,7 +2861,7 @@ export class NeynarV2APIClient { fid: number, role: ChannelMemberRole ): Promise { - const inviteChannelMemberRequest: RemoveChannelMemberRequest = { + const inviteChannelMemberRequest: RemoveChannelMemberReqBody = { signer_uuid: signerUuid, channel_id: channelId, fid: fid, @@ -2934,7 +2907,7 @@ export class NeynarV2APIClient { role: ChannelMemberRole, accept: boolean ): Promise { - const respondChannelInviteRequest: RespondChannelInviteRequest = { + const respondChannelInviteRequest: RespondChannelInviteReqBody = { signer_uuid: signerUuid, channel_id: channelId, role: role, @@ -2970,7 +2943,7 @@ export class NeynarV2APIClient { targetFid: number, viewerFid: number ): Promise { - const response = await this.apis.follows.relevantFollowers( + const response = await this.apis.follows.fetchRelevantFollowers( targetFid, viewerFid ); @@ -3007,7 +2980,7 @@ export class NeynarV2APIClient { sortType?: FollowSortType; } ): Promise { - const response = await this.apis.follows.followersV2( + const response = await this.apis.follows.fetchUserFollowers( fid, options?.viewerFid, options?.sortType, @@ -3038,7 +3011,7 @@ export class NeynarV2APIClient { * console.log('User Follows:', response); * }); * - * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/following-v2). + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/fetch-user-following). */ public async fetchUserFollowingV2( fid: number, @@ -3049,7 +3022,7 @@ export class NeynarV2APIClient { sortType?: FollowSortType; } ): Promise { - const response = await this.apis.follows.followingV2( + const response = await this.apis.follows.fetchUserFollowing( fid, options?.viewerFid, options?.sortType, @@ -3093,7 +3066,7 @@ export class NeynarV2APIClient { cursor?: string; } ): Promise { - const response = await this.apis.channel.userChannelMemberships( + const response = await this.apis.channel.fetchUserChannelMemberships( fid, options?.limit, options?.cursor @@ -3122,7 +3095,7 @@ export class NeynarV2APIClient { public async lookupUserStorageAllocations( fid: number ): Promise { - const response = await this.apis.storage.storageAllocations(fid); + const response = await this.apis.storage.lookupUserStorageAllocations(fid); return response.data; } @@ -3145,7 +3118,7 @@ export class NeynarV2APIClient { public async lookupUserStorageUsage( fid: number ): Promise { - const response = await this.apis.storage.storageUsage(fid); + const response = await this.apis.storage.lookupUserStorageUsage(fid); return response.data; } @@ -3208,7 +3181,7 @@ export class NeynarV2APIClient { public async isFnameAvailable( fname: string ): Promise { - const response = await this.apis.fname.fnameAvailability(fname); + const response = await this.apis.fname.isFnameAvailable(fname); return response.data; } @@ -3250,7 +3223,7 @@ export class NeynarV2APIClient { * Creates a new frame with a list of pages. This method enables developers to add new frames * to their content offerings, identified by the provided API key. * - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest - The request object containing the details for the new frame. + * @param {NeynarFrameCreationReqBody} neynarFrameCreationRequest - The request object containing the details for the new frame. * * @returns {Promise} A promise that resolves to the newly created frame object. * @@ -3267,7 +3240,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/publish-neynar-frame). */ public async publishNeynarFrame( - neynarFrameCreationRequest: NeynarFrameCreationRequest + neynarFrameCreationRequest: NeynarFrameCreationReqBody ) { const response = await this.apis.frame.publishNeynarFrame( neynarFrameCreationRequest @@ -3279,7 +3252,7 @@ export class NeynarV2APIClient { * Updates an existing frame with new content or properties, assuming the frame was created by the developer, * as identified by the provided API key. This method allows for modifying frames post-creation. * - * @param {NeynarFrameUpdateRequest} neynarFrame - The new content or properties for the frame being updated. + * @param {NeynarFrameUpdateReqBody} neynarFrame - The new content or properties for the frame being updated. * * @returns {Promise} A promise that resolves to a `NeynarFrame` object, * reflecting the updated state of the frame. @@ -3297,7 +3270,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/update-neynar-frame). */ public async updateNeynarFrame( - neynarFrameUpdateRequest: NeynarFrameUpdateRequest + neynarFrameUpdateRequest: NeynarFrameUpdateReqBody ) { const response = await this.apis.frame.updateNeynarFrame( neynarFrameUpdateRequest @@ -3324,7 +3297,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/delete-neynar-frame). */ public async deleteNeynarFrame(uuid: string) { - const deleteNeynarFrameRequest: DeleteNeynarFrameRequest = { + const deleteNeynarFrameRequest: DeleteFrameReqBody = { uuid, }; const response = await this.apis.frame.deleteNeynarFrame( @@ -3436,7 +3409,7 @@ export class NeynarV2APIClient { }), }; - const response = await this.apis.frame.postFrameDeveloperManagedAction( + const response = await this.apis.frame.postFrameActionDeveloperManaged( body ); return response.data; @@ -3475,7 +3448,7 @@ export class NeynarV2APIClient { channelFollowContext?: boolean; } ): Promise { - const reqBody: ValidateFrameRequest = { + const reqBody: ValidateFrameActionReqBody = { message_bytes_in_hex: messageBytesInHex, ...(typeof options?.castReactionContext !== "undefined" && { cast_reaction_context: options?.castReactionContext, @@ -3491,7 +3464,7 @@ export class NeynarV2APIClient { }), }; - const response = await this.apis.frame.validateFrame(reqBody); + const response = await this.apis.frame.validateFrameAction(reqBody); return response.data; } @@ -3511,7 +3484,7 @@ export class NeynarV2APIClient { * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/validate-frame-list). */ public async fetchValidateFrameList(): Promise { - const response = await this.apis.frame.validateFrameList(); + const response = await this.apis.frame.fetchValidateFrameList(); return response.data; } @@ -3551,7 +3524,7 @@ export class NeynarV2APIClient { stop: string, options?: { aggregateWindow?: ValidateFrameAggregateWindow } ): Promise { - const response = await this.apis.frame.validateFrameAnalytics( + const response = await this.apis.frame.fetchValidateFrameAnalytics( frameUrl, analyticsType, start, @@ -3792,7 +3765,7 @@ export class NeynarV2APIClient { fid: number, options?: { limit?: number; cursor: string } ): Promise { - const response = await this.apis.mute.muteList( + const response = await this.apis.mute.fetchMuteList( fid, options?.limit, options?.cursor @@ -3825,7 +3798,7 @@ export class NeynarV2APIClient { fid, muted_fid: mutedFid, }; - const response = await this.apis.mute.addMute(addMuteBody); + const response = await this.apis.mute.publishMute(addMuteBody); return response.data; } @@ -3971,7 +3944,7 @@ export class NeynarV2APIClient { limit?: number; cursor: string; }): Promise { - const response = await this.apis.ban.banList( + const response = await this.apis.ban.fetchBanList( options?.limit, options?.cursor ); @@ -3998,7 +3971,7 @@ export class NeynarV2APIClient { const addBanBody = { fids, }; - const response = await this.apis.ban.addBan(addBanBody); + const response = await this.apis.ban.publishBans(addBanBody); return response.data; } @@ -4021,7 +3994,7 @@ export class NeynarV2APIClient { const deleteBanBody = { fids, }; - const response = await this.apis.ban.deleteBan(deleteBanBody); + const response = await this.apis.ban.deleteBans(deleteBanBody); return response.data; } @@ -4052,7 +4025,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.subscribers.subscribers( + const response = await this.apis.subscribers.fetchSubscribersForFid( fid, subscriptionProvider, options?.viewerFid @@ -4085,7 +4058,7 @@ export class NeynarV2APIClient { viewerFid?: number; } ): Promise { - const response = await this.apis.subscribers.subscribedTo( + const response = await this.apis.subscribers.fetchSubscribedToForFid( fid, subscriptionProvider, options?.viewerFid @@ -4114,7 +4087,7 @@ export class NeynarV2APIClient { fid: number, subscriptionProvider: SubscriptionProvider ): Promise { - const response = await this.apis.subscribers.subscriptionsCreated( + const response = await this.apis.subscribers.fetchSubscriptionsForFid( fid, subscriptionProvider ); @@ -4147,7 +4120,7 @@ export class NeynarV2APIClient { ): Promise<{ [key: string]: SubscriptionStatus }> { const finishedAddresses = addresses.join(","); - const response = await this.apis.stp.subscriptionCheck( + const response = await this.apis.stp.fetchSubscriptionCheck( finishedAddresses, contractAddress, chainId diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 3eb5f0b5..9282d423 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -89,8 +89,8 @@ models/conversation.ts models/dehydrated-channel.ts models/dehydrated-follower.ts models/delete-cast-req-body.ts +models/delete-frame-req-body.ts models/delete-frame-response.ts -models/delete-neynar-frame-request.ts models/developer-managed-signer.ts models/embed-cast-deep.ts models/embed-cast.ts @@ -108,10 +108,11 @@ models/embed.ts models/error-res.ts models/farcaster-action-req-body-action.ts models/farcaster-action-req-body.ts -models/feed-for-you400-response.ts models/feed-response.ts models/feed-trending-provider.ts models/feed-type.ts +models/fetch-feed-for-you400-response.ts +models/fetch-frame-meta-tags-from-url200-response.ts models/filter-type.ts models/fname-availability-response.ts models/follow-req-body.ts @@ -125,7 +126,6 @@ models/frame-action-req-body.ts models/frame-action.ts models/frame-button-action-type.ts models/frame-developer-managed-action-req-body.ts -models/frame-from-url200-response.ts models/frame-input.ts models/frame-signature-packet-trusted-data.ts models/frame-signature-packet-untrusted-data.ts @@ -147,6 +147,7 @@ models/hydrated-follower.ts models/image-object.ts models/index.ts models/individual-hash-obj.ts +models/invite-channel-member-req-body.ts models/location-address.ts models/location.ts models/mark-notifications-as-seen-req-body.ts @@ -155,9 +156,9 @@ models/mute-record.ts models/mute-req-body.ts models/mute-response.ts models/next-cursor.ts -models/neynar-frame-creation-request.ts +models/neynar-frame-creation-req-body.ts models/neynar-frame-page.ts -models/neynar-frame-update-request.ts +models/neynar-frame-update-req-body.ts models/neynar-frame.ts models/neynar-next-frame-page-mint-url.ts models/neynar-next-frame-page-redirect.ts @@ -203,9 +204,9 @@ models/register-signer-key-req-body.ts models/register-user-req-body.ts models/register-user-response.ts models/relevant-followers-response.ts -models/remove-channel-member-request.ts +models/remove-channel-member-req-body.ts models/remove-verification-req-body.ts -models/respond-channel-invite-request.ts +models/respond-channel-invite-req-body.ts models/searched-user.ts models/signed-key-request-sponsor.ts models/signer.ts @@ -248,9 +249,9 @@ models/user-viewer-context.ts models/user.ts models/users-active-channels-response.ts models/users-response.ts +models/validate-frame-action-req-body.ts models/validate-frame-action-response.ts models/validate-frame-analytics-type.ts -models/validate-frame-request.ts models/validated-frame-action-signer.ts models/validated-frame-action-tapped-button.ts models/validated-frame-action.ts @@ -261,7 +262,6 @@ models/webhook-delete-req-body.ts models/webhook-list-response.ts models/webhook-patch-req-body.ts models/webhook-post-req-body.ts -models/webhook-put-req-body-all-of.ts models/webhook-put-req-body.ts models/webhook-response.ts models/webhook-secret.ts diff --git a/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts index d7d808be..d9c4dc45 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts @@ -36,15 +36,15 @@ import type { ErrorRes } from '../models'; export const BanApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * 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 + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app * @param {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { + deleteBans: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'banReqBody' is not null or undefined - assertParamExists('addBan', 'banReqBody', banReqBody) + assertParamExists('deleteBans', 'banReqBody', banReqBody) const localVarPath = `/farcaster/ban`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -53,7 +53,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -77,12 +77,12 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) /** * Fetches all FIDs that your app has banned. * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - banList: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchBanList: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/farcaster/ban/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -118,15 +118,15 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app + * 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 {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBan: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { + publishBans: async (banReqBody: BanReqBody, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'banReqBody' is not null or undefined - assertParamExists('deleteBan', 'banReqBody', banReqBody) + assertParamExists('publishBans', 'banReqBody', banReqBody) const localVarPath = `/farcaster/ban`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -135,7 +135,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -167,43 +167,43 @@ export const BanApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BanApiAxiosParamCreator(configuration) return { /** - * 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 + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app * @param {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addBan(banReqBody, options); + async deleteBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBans(banReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.addBan']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['BanApi.deleteBans']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Fetches all FIDs that your app has banned. * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.banList(limit, cursor, options); + async fetchBanList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBanList(limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.banList']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['BanApi.fetchBanList']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app + * 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 {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBan(banReqBody, options); + async publishBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishBans(banReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['BanApi.deleteBan']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['BanApi.publishBans']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -217,35 +217,35 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?: const localVarFp = BanApiFp(configuration) return { /** - * 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 + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app * @param {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.addBan(banReqBody, options).then((request) => request(axios, basePath)); + deleteBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteBans(banReqBody, options).then((request) => request(axios, basePath)); }, /** * Fetches all FIDs that your app has banned. * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.banList(limit, cursor, options).then((request) => request(axios, basePath)); + fetchBanList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchBanList(limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app + * 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 {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteBan(banReqBody, options).then((request) => request(axios, basePath)); + publishBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishBans(banReqBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -258,40 +258,40 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?: */ export class BanApi extends BaseAPI { /** - * 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 + * Deletes a list of FIDs from the app associated with your API key. + * @summary Unban FIDs from app * @param {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BanApi */ - public addBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).addBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); + public deleteBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).deleteBans(banReqBody, options).then((request) => request(this.axios, this.basePath)); } /** * Fetches all FIDs that your app has banned. * @summary Banned FIDs of app - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BanApi */ - public banList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).banList(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchBanList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).fetchBanList(limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Deletes a list of FIDs from the app associated with your API key. - * @summary Unban FIDs from app + * 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 {BanReqBody} banReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BanApi */ - public deleteBan(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).deleteBan(banReqBody, options).then((request) => request(this.axios, this.basePath)); + public publishBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig) { + return BanApiFp(this.configuration).publishBans(banReqBody, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts index 7cc008dc..62d13320 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts @@ -54,19 +54,15 @@ import type { PostCastResponse } from '../models'; export const CastApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - cast: async (identifier: string, type: CastParamType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'identifier' is not null or undefined - assertParamExists('cast', 'identifier', identifier) - // verify required parameter 'type' is not null or undefined - assertParamExists('cast', 'type', type) + deleteCast: async (deleteCastReqBody: DeleteCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'deleteCastReqBody' is not null or undefined + assertParamExists('deleteCast', 'deleteCastReqBody', deleteCastReqBody) const localVarPath = `/farcaster/cast`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -75,30 +71,21 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (identifier !== undefined) { - localVarQueryParameter['identifier'] = identifier; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteCastReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -106,26 +93,18 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast 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 {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {FetchBulkCastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria * @param {*} [options] Override http request option. * @throws {RequiredError} */ - castConversation: async (identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'identifier' is not null or undefined - assertParamExists('castConversation', 'identifier', identifier) - // verify required parameter 'type' is not null or undefined - assertParamExists('castConversation', 'type', type) - const localVarPath = `/farcaster/cast/conversation`; + fetchBulkCasts: async (casts: string, viewerFid?: number, sortType?: FetchBulkCastsSortTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'casts' is not null or undefined + assertParamExists('fetchBulkCasts', 'casts', casts) + const localVarPath = `/farcaster/casts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -140,20 +119,8 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (identifier !== undefined) { - localVarQueryParameter['identifier'] = identifier; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; - } - - if (replyDepth !== undefined) { - localVarQueryParameter['reply_depth'] = replyDepth; - } - - if (includeChronologicalParentCasts !== undefined) { - localVarQueryParameter['include_chronological_parent_casts'] = includeChronologicalParentCasts; + if (casts !== undefined) { + localVarQueryParameter['casts'] = casts; } if (viewerFid !== undefined) { @@ -164,18 +131,6 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['sort_type'] = sortType; } - if (fold !== undefined) { - localVarQueryParameter['fold'] = fold; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -188,23 +143,18 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - castSearch: async (q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('castSearch', 'q', q) - const localVarPath = `/farcaster/cast/search`; + fetchComposerActions: async (list: CastComposerType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'list' is not null or undefined + assertParamExists('fetchComposerActions', 'list', list) + const localVarPath = `/farcaster/cast/composer_actions/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -219,28 +169,8 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (authorFid !== undefined) { - localVarQueryParameter['author_fid'] = authorFid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (priorityMode !== undefined) { - localVarQueryParameter['priority_mode'] = priorityMode; + if (list !== undefined) { + localVarQueryParameter['list'] = list; } if (limit !== undefined) { @@ -263,18 +193,20 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria * @param {*} [options] Override http request option. * @throws {RequiredError} */ - casts: async (casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'casts' is not null or undefined - assertParamExists('casts', 'casts', casts) - const localVarPath = `/farcaster/casts`; + lookupCastByHashOrWarpcastUrl: async (identifier: string, type: CastParamType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'identifier' is not null or undefined + assertParamExists('lookupCastByHashOrWarpcastUrl', 'identifier', identifier) + // verify required parameter 'type' is not null or undefined + assertParamExists('lookupCastByHashOrWarpcastUrl', 'type', type) + const localVarPath = `/farcaster/cast`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -289,16 +221,16 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (casts !== undefined) { - localVarQueryParameter['casts'] = casts; + if (identifier !== undefined) { + localVarQueryParameter['identifier'] = identifier; } - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; + if (type !== undefined) { + localVarQueryParameter['type'] = type; } - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; } @@ -313,18 +245,26 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast 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 {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {LookupCastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - composerList: async (list: CastComposerType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'list' is not null or undefined - assertParamExists('composerList', 'list', list) - const localVarPath = `/farcaster/cast/composer_actions/list`; + lookupCastConversation: async (identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: LookupCastConversationFoldEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'identifier' is not null or undefined + assertParamExists('lookupCastConversation', 'identifier', identifier) + // verify required parameter 'type' is not null or undefined + assertParamExists('lookupCastConversation', 'type', type) + const localVarPath = `/farcaster/cast/conversation`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -339,8 +279,32 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (list !== undefined) { - localVarQueryParameter['list'] = list; + if (identifier !== undefined) { + localVarQueryParameter['identifier'] = identifier; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (replyDepth !== undefined) { + localVarQueryParameter['reply_depth'] = replyDepth; + } + + if (includeChronologicalParentCasts !== undefined) { + localVarQueryParameter['include_chronological_parent_casts'] = includeChronologicalParentCasts; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + if (fold !== undefined) { + localVarQueryParameter['fold'] = fold; } if (limit !== undefined) { @@ -363,15 +327,15 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody + * 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 {PostCastReqBody} postCastReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteCast: async (deleteCastReqBody: DeleteCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteCastReqBody' is not null or undefined - assertParamExists('deleteCast', 'deleteCastReqBody', deleteCastReqBody) + publishCast: async (postCastReqBody: PostCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'postCastReqBody' is not null or undefined + assertParamExists('publishCast', 'postCastReqBody', postCastReqBody) const localVarPath = `/farcaster/cast`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -380,7 +344,7 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -394,7 +358,7 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteCastReqBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(postCastReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -402,16 +366,23 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * 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 {PostCastReqBody} postCastReqBody + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postCast: async (postCastReqBody: PostCastReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'postCastReqBody' is not null or undefined - assertParamExists('postCast', 'postCastReqBody', postCastReqBody) - const localVarPath = `/farcaster/cast`; + searchCasts: async (q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('searchCasts', 'q', q) + const localVarPath = `/farcaster/cast/search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -419,21 +390,50 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (q !== undefined) { + localVarQueryParameter['q'] = q; + } + + if (authorFid !== undefined) { + localVarQueryParameter['author_fid'] = authorFid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + if (priorityMode !== undefined) { + localVarQueryParameter['priority_mode'] = priorityMode; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(postCastReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -450,6 +450,49 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) export const CastApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) return { + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCast(deleteCastReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.deleteCast']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {FetchBulkCastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchBulkCasts(casts: string, viewerFid?: number, sortType?: FetchBulkCastsSortTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkCasts(casts, viewerFid, sortType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.fetchBulkCasts']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchComposerActions(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchComposerActions(list, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.fetchComposerActions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Gets information about an individual cast by passing in a Warpcast web URL or cast hash * @summary By hash or URL @@ -459,10 +502,10 @@ export const CastApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cast(identifier, type, viewerFid, options); + async lookupCastByHashOrWarpcastUrl(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupCastByHashOrWarpcastUrl(identifier, type, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.cast']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CastApi.lookupCastByHashOrWarpcastUrl']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -474,16 +517,29 @@ export const CastApiFp = function(configuration?: Configuration) { * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch (default 20, max 50) + * @param {LookupCastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options); + async lookupCastConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: LookupCastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupCastConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CastApi.lookupCastConversation']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishCast(postCastReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.castConversation']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CastApi.publishCast']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -495,83 +551,61 @@ export const CastApiFp = function(configuration?: Configuration) { * @param {string} [parentUrl] Parent URL of the casts you want to search * @param {string} [channelId] Channel ID of the casts you want to search * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options); + async searchCasts(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchCasts(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.castSearch']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['CastApi.searchCasts']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * CastApi - factory interface + * @export + */ +export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CastApiFp(configuration) + return { + /** + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteCast(deleteCastReqBody, options).then((request) => request(axios, basePath)); + }, /** * Fetch multiple casts using their respective hashes. * @summary Bulk fetch casts * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria + * @param {FetchBulkCastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.casts(casts, viewerFid, sortType, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.casts']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + fetchBulkCasts(casts: string, viewerFid?: number, sortType?: FetchBulkCastsSortTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchBulkCasts(casts, viewerFid, sortType, options).then((request) => request(axios, basePath)); }, /** * Fetches all composer actions on Warpcast. You can filter by top or featured. * @summary Fetch composer actions * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.composerList(list, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.composerList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCast(deleteCastReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.deleteCast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * 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 {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postCast(postCastReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CastApi.postCast']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + fetchComposerActions(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchComposerActions(list, limit, cursor, options).then((request) => request(axios, basePath)); }, - } -}; - -/** - * CastApi - factory interface - * @export - */ -export const CastApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CastApiFp(configuration) - return { /** * Gets information about an individual cast by passing in a Warpcast web URL or cast hash * @summary By hash or URL @@ -581,8 +615,8 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.cast(identifier, type, viewerFid, options).then((request) => request(axios, basePath)); + lookupCastByHashOrWarpcastUrl(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupCastByHashOrWarpcastUrl(identifier, type, viewerFid, options).then((request) => request(axios, basePath)); }, /** * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast 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. @@ -593,14 +627,24 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch (default 20, max 50) + * @param {LookupCastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(axios, basePath)); + lookupCastConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: LookupCastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupCastConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * 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 {PostCastReqBody} postCastReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishCast(postCastReqBody, options).then((request) => request(axios, basePath)); }, /** * Search for casts based on a query string, with optional AND filters @@ -611,57 +655,13 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? * @param {string} [parentUrl] Parent URL of the casts you want to search * @param {string} [channelId] Channel ID of the casts you want to search * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor * @param {*} [options] Override http request option. * @throws {RequiredError} */ - castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.casts(casts, viewerFid, sortType, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.composerList(list, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteCast(deleteCastReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * 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 {PostCastReqBody} postCastReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postCast(postCastReqBody, options).then((request) => request(axios, basePath)); + searchCasts(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.searchCasts(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(axios, basePath)); }, }; }; @@ -674,127 +674,127 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? */ export class CastApi extends BaseAPI { /** - * Gets information about an individual cast by passing in a Warpcast web URL or cast hash - * @summary By hash or URL - * @param {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) + * @summary Delete a cast + * @param {DeleteCastReqBody} deleteCastReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public cast(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).cast(identifier, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).deleteCast(deleteCastReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast 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 {string} identifier Cast identifier (Its either a url or a hash) - * @param {CastParamType} type - * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) - * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order - * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` - * @param {CastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch (default 20, max 50) - * @param {string} [cursor] Pagination cursor. + * Fetch multiple casts using their respective hashes. + * @summary Bulk fetch casts + * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. + * @param {FetchBulkCastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public castConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: CastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).castConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchBulkCasts(casts: string, viewerFid?: number, sortType?: FetchBulkCastsSortTypeEnum, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).fetchBulkCasts(casts, viewerFid, sortType, options).then((request) => request(this.axios, this.basePath)); } /** - * Search for casts based on a query string, with optional AND filters - * @summary Search for casts - * @param {string} q Query string to search for casts - * @param {number} [authorFid] Fid of the user whose casts you want to search - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {string} [parentUrl] Parent URL of the casts you want to search - * @param {string} [channelId] Channel ID of the casts you want to search - * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor + * Fetches all composer actions on Warpcast. You can filter by top or featured. + * @summary Fetch composer actions + * @param {CastComposerType} list Type of list to fetch. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public castSearch(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).castSearch(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchComposerActions(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).fetchComposerActions(list, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch multiple casts using their respective hashes. - * @summary Bulk fetch casts - * @param {string} casts Hashes of the cast to be retrived (Comma separated, no spaces) + * Gets information about an individual cast by passing in a Warpcast web URL or cast hash + * @summary By hash or URL + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type * @param {number} [viewerFid] adds viewer_context to cast object to show whether viewer has liked or recasted the cast. - * @param {CastsSortTypeEnum} [sortType] Optional parameter to sort the casts based on different criteria * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public casts(casts: string, viewerFid?: number, sortType?: CastsSortTypeEnum, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).casts(casts, viewerFid, sortType, options).then((request) => request(this.axios, this.basePath)); + public lookupCastByHashOrWarpcastUrl(identifier: string, type: CastParamType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).lookupCastByHashOrWarpcastUrl(identifier, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetches all composer actions on Warpcast. You can filter by top or featured. - * @summary Fetch composer actions - * @param {CastComposerType} list Type of list to fetch. - * @param {number} [limit] Number of results to fetch (default 25, max 25). + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast 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 {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {number} [viewerFid] Providing this will return a conversation that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {CastConversationSortType} [sortType] Sort type for the ordering of descendants. Default is `chron` + * @param {LookupCastConversationFoldEnum} [fold] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public composerList(list: CastComposerType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).composerList(list, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public lookupCastConversation(identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, viewerFid?: number, sortType?: CastConversationSortType, fold?: LookupCastConversationFoldEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).lookupCastConversation(identifier, type, replyDepth, includeChronologicalParentCasts, viewerFid, sortType, fold, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Delete an existing cast. \\ (In order to delete a cast `signer_uuid` must be approved) - * @summary Delete a cast - * @param {DeleteCastReqBody} deleteCastReqBody + * 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 {PostCastReqBody} postCastReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public deleteCast(deleteCastReqBody: DeleteCastReqBody, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).deleteCast(deleteCastReqBody, options).then((request) => request(this.axios, this.basePath)); + public publishCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).publishCast(postCastReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {PostCastReqBody} postCastReqBody + * Search for casts based on a query string, with optional AND filters + * @summary Search for casts + * @param {string} q Query string to search for casts + * @param {number} [authorFid] Fid of the user whose casts you want to search + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [parentUrl] Parent URL of the casts you want to search + * @param {string} [channelId] Channel ID of the casts you want to search + * @param {boolean} [priorityMode] When true, only returns search results from power badge users and users that the viewer follows (if viewer_fid is provided). + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CastApi */ - public postCast(postCastReqBody: PostCastReqBody, options?: RawAxiosRequestConfig) { - return CastApiFp(this.configuration).postCast(postCastReqBody, options).then((request) => request(this.axios, this.basePath)); + public searchCasts(q: string, authorFid?: number, viewerFid?: number, parentUrl?: string, channelId?: string, priorityMode?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return CastApiFp(this.configuration).searchCasts(q, authorFid, viewerFid, parentUrl, channelId, priorityMode, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const CastConversationFoldEnum = { - Above: 'above', - Below: 'below' -} as const; -export type CastConversationFoldEnum = typeof CastConversationFoldEnum[keyof typeof CastConversationFoldEnum]; -/** - * @export - */ -export const CastsSortTypeEnum = { +export const FetchBulkCastsSortTypeEnum = { Trending: 'trending', Likes: 'likes', Recasts: 'recasts', Replies: 'replies', Recent: 'recent' } as const; -export type CastsSortTypeEnum = typeof CastsSortTypeEnum[keyof typeof CastsSortTypeEnum]; +export type FetchBulkCastsSortTypeEnum = typeof FetchBulkCastsSortTypeEnum[keyof typeof FetchBulkCastsSortTypeEnum]; +/** + * @export + */ +export const LookupCastConversationFoldEnum = { + Above: 'above', + Below: 'below' +} as const; +export type LookupCastConversationFoldEnum = typeof LookupCastConversationFoldEnum[keyof typeof LookupCastConversationFoldEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts index 6d8e707d..6ef5e983 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts @@ -40,13 +40,15 @@ import type { ChannelType } from '../models'; // @ts-ignore import type { ErrorRes } from '../models'; // @ts-ignore +import type { InviteChannelMemberReqBody } from '../models'; +// @ts-ignore import type { OperationResponse } from '../models'; // @ts-ignore import type { RelevantFollowersResponse } from '../models'; // @ts-ignore -import type { RemoveChannelMemberRequest } from '../models'; +import type { RemoveChannelMemberReqBody } from '../models'; // @ts-ignore -import type { RespondChannelInviteRequest } from '../models'; +import type { RespondChannelInviteReqBody } from '../models'; // @ts-ignore import type { TrendingChannelResponse } from '../models'; // @ts-ignore @@ -60,18 +62,24 @@ import type { UsersResponse } from '../models'; export const ChannelApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - activeChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('activeChannels', 'fid', fid) - const localVarPath = `/farcaster/channel/user`; + fetchActiveUsersInSingleChannel: async (id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('fetchActiveUsersInSingleChannel', 'id', id) + // verify required parameter 'hasRootCastAuthors' is not null or undefined + assertParamExists('fetchActiveUsersInSingleChannel', 'hasRootCastAuthors', hasRootCastAuthors) + const localVarPath = `/farcaster/channel/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -86,18 +94,34 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; + if (id !== undefined) { + localVarQueryParameter['id'] = id; } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (hasRootCastAuthors !== undefined) { + localVarQueryParameter['has_root_cast_authors'] = hasRootCastAuthors; + } + + if (hasCastLikers !== undefined) { + localVarQueryParameter['has_cast_likers'] = hasCastLikers; + } + + if (hasCastRecasters !== undefined) { + localVarQueryParameter['has_cast_recasters'] = hasCastRecasters; + } + + if (hasReplyAuthors !== undefined) { + localVarQueryParameter['has_reply_authors'] = hasReplyAuthors; } if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -110,18 +134,15 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelDetails: async (id: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelDetails', 'id', id) - const localVarPath = `/farcaster/channel`; + fetchAllChannels: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -136,16 +157,12 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (type !== undefined) { - localVarQueryParameter['type'] = type; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; } - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; } @@ -168,9 +185,9 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelDetailsBulk: async (ids: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchBulkChannels: async (ids: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'ids' is not null or undefined - assertParamExists('channelDetailsBulk', 'ids', ids) + assertParamExists('fetchBulkChannels', 'ids', ids) const localVarPath = `/farcaster/channel/bulk`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -210,19 +227,17 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * 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 {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelFollowers: async (id: string, viewerFid?: number, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelFollowers', 'id', id) - const localVarPath = `/farcaster/channel/followers`; + fetchChannelInvites: async (channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/member/invite/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -237,22 +252,22 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; } - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; + if (invitedFid !== undefined) { + localVarQueryParameter['invited_fid'] = invitedFid; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -265,24 +280,19 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelUsers: async (id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelUsers', 'id', id) - // verify required parameter 'hasRootCastAuthors' is not null or undefined - assertParamExists('channelUsers', 'hasRootCastAuthors', hasRootCastAuthors) - const localVarPath = `/farcaster/channel/users`; + fetchChannelMembers: async (channelId: string, fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelId' is not null or undefined + assertParamExists('fetchChannelMembers', 'channelId', channelId) + const localVarPath = `/farcaster/channel/member/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -297,34 +307,22 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - if (hasRootCastAuthors !== undefined) { - localVarQueryParameter['has_root_cast_authors'] = hasRootCastAuthors; - } - - if (hasCastLikers !== undefined) { - localVarQueryParameter['has_cast_likers'] = hasCastLikers; + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; } - if (hasCastRecasters !== undefined) { - localVarQueryParameter['has_cast_recasters'] = hasCastRecasters; + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; } - if (hasReplyAuthors !== undefined) { - localVarQueryParameter['has_reply_authors'] = hasReplyAuthors; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; } if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -337,16 +335,19 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - followChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelFollowReqBody' is not null or undefined - assertParamExists('followChannel', 'channelFollowReqBody', channelFollowReqBody) - const localVarPath = `/farcaster/channel/follow`; + fetchFollowersForAChannel: async (id: string, viewerFid?: number, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('fetchFollowersForAChannel', 'id', id) + const localVarPath = `/farcaster/channel/followers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -354,21 +355,34 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -376,16 +390,19 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * 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 {string} id Channel ID being queried + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - inviteChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeChannelMemberRequest' is not null or undefined - assertParamExists('inviteChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) - const localVarPath = `/farcaster/channel/member/invite`; + fetchRelevantFollowersForAChannel: async (id: string, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('fetchRelevantFollowersForAChannel', 'id', id) + // verify required parameter 'viewerFid' is not null or undefined + assertParamExists('fetchRelevantFollowersForAChannel', 'viewerFid', viewerFid) + const localVarPath = `/farcaster/channel/followers/relevant`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -393,21 +410,26 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -415,15 +437,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {FetchTrendingChannelsTimeWindowEnum} [timeWindow] * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllChannels: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/list`; + fetchTrendingChannels: async (timeWindow?: FetchTrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/channel/trending`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -438,6 +461,10 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (timeWindow !== undefined) { + localVarQueryParameter['time_window'] = timeWindow; + } + if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } @@ -458,17 +485,18 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * 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 {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited + * 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 {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listChannelInvites: async (channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/member/invite/list`; + fetchUserChannelMemberships: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchUserChannelMemberships', 'fid', fid) + const localVarPath = `/farcaster/user/memberships/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -483,12 +511,8 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (invitedFid !== undefined) { - localVarQueryParameter['invited_fid'] = invitedFid; + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; } if (limit !== undefined) { @@ -511,19 +535,18 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listChannelMembers: async (channelId: string, fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelId' is not null or undefined - assertParamExists('listChannelMembers', 'channelId', channelId) - const localVarPath = `/farcaster/channel/member/list`; + fetchUserChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchUserChannels', 'fid', fid) + const localVarPath = `/farcaster/user/channels`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -538,10 +561,6 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - if (fid !== undefined) { localVarQueryParameter['fid'] = fid; } @@ -566,19 +585,18 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * 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 {string} id Channel ID being queried - * @param {number} 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`. + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - relevantChannelFollowers: async (id: string, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('relevantChannelFollowers', 'id', id) - // verify required parameter 'viewerFid' is not null or undefined - assertParamExists('relevantChannelFollowers', 'viewerFid', viewerFid) - const localVarPath = `/farcaster/channel/followers/relevant`; + fetchUsersActiveChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchUsersActiveChannels', 'fid', fid) + const localVarPath = `/farcaster/channel/user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -593,12 +611,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (id !== undefined) { - localVarQueryParameter['id'] = id; + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; } - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; } @@ -613,16 +635,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeChannelMember: async (removeChannelMemberRequest: RemoveChannelMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeChannelMemberRequest' is not null or undefined - assertParamExists('removeChannelMember', 'removeChannelMemberRequest', removeChannelMemberRequest) - const localVarPath = `/farcaster/channel/member`; + followChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelFollowReqBody' is not null or undefined + assertParamExists('followChannel', 'channelFollowReqBody', channelFollowReqBody) + const localVarPath = `/farcaster/channel/follow`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -630,7 +652,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -644,7 +666,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -652,15 +674,15 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * Invite a user to a channel + * @summary Invite + * @param {InviteChannelMemberReqBody} inviteChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - respondChannelInvite: async (respondChannelInviteRequest: RespondChannelInviteRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'respondChannelInviteRequest' is not null or undefined - assertParamExists('respondChannelInvite', 'respondChannelInviteRequest', respondChannelInviteRequest) + inviteChannelMember: async (inviteChannelMemberReqBody: InviteChannelMemberReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'inviteChannelMemberReqBody' is not null or undefined + assertParamExists('inviteChannelMember', 'inviteChannelMemberReqBody', inviteChannelMemberReqBody) const localVarPath = `/farcaster/channel/member/invite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -669,7 +691,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -683,7 +705,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(respondChannelInviteRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(inviteChannelMemberReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -691,18 +713,18 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - searchChannels: async (q: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('searchChannels', 'q', q) - const localVarPath = `/farcaster/channel/search`; + lookupChannel: async (id: string, type?: ChannelType, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('lookupChannel', 'id', id) + const localVarPath = `/farcaster/channel`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -717,16 +739,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (q !== undefined) { - localVarQueryParameter['q'] = q; + if (id !== undefined) { + localVarQueryParameter['id'] = id; } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (type !== undefined) { + localVarQueryParameter['type'] = type; } - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; } @@ -741,16 +763,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberReqBody} removeChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - trendingChannels: async (timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/channel/trending`; + removeChannelMember: async (removeChannelMemberReqBody: RemoveChannelMemberReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'removeChannelMemberReqBody' is not null or undefined + assertParamExists('removeChannelMember', 'removeChannelMemberReqBody', removeChannelMemberReqBody) + const localVarPath = `/farcaster/channel/member`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -758,30 +780,21 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (timeWindow !== undefined) { - localVarQueryParameter['time_window'] = timeWindow; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(removeChannelMemberReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -789,16 +802,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteReqBody} respondChannelInviteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - unfollowChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channelFollowReqBody' is not null or undefined - assertParamExists('unfollowChannel', 'channelFollowReqBody', channelFollowReqBody) - const localVarPath = `/farcaster/channel/follow`; + respondChannelInvite: async (respondChannelInviteReqBody: RespondChannelInviteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'respondChannelInviteReqBody' is not null or undefined + assertParamExists('respondChannelInvite', 'respondChannelInviteReqBody', respondChannelInviteReqBody) + const localVarPath = `/farcaster/channel/member/invite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -806,7 +819,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -820,7 +833,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(respondChannelInviteReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -828,18 +841,18 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * 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 {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userChannelMemberships: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('userChannelMemberships', 'fid', fid) - const localVarPath = `/farcaster/user/memberships/list`; + searchChannels: async (q: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('searchChannels', 'q', q) + const localVarPath = `/farcaster/channel/search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -854,8 +867,8 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; + if (q !== undefined) { + localVarQueryParameter['q'] = q; } if (limit !== undefined) { @@ -878,18 +891,16 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userChannels: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('userChannels', 'fid', fid) - const localVarPath = `/farcaster/user/channels`; + unfollowChannel: async (channelFollowReqBody: ChannelFollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'channelFollowReqBody' is not null or undefined + assertParamExists('unfollowChannel', 'channelFollowReqBody', channelFollowReqBody) + const localVarPath = `/farcaster/channel/follow`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -897,30 +908,21 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(channelFollowReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -938,33 +940,36 @@ export const ChannelApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ChannelApiAxiosParamCreator(configuration) return { /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.activeChannels(fid, limit, cursor, options); + async fetchActiveUsersInSingleChannel(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchActiveUsersInSingleChannel(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.activeChannels']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchActiveUsersInSingleChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetails(id, type, viewerFid, options); + async fetchAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAllChannels(limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetails']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchAllChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -976,142 +981,184 @@ export const ChannelApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelDetailsBulk(ids, type, viewerFid, options); + async fetchBulkChannels(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkChannels(ids, type, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelDetailsBulk']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchBulkChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * 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 {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelFollowers(id, viewerFid, cursor, limit, options); + async fetchChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchChannelInvites(channelId, invitedFid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelFollowers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchChannelInvites']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] 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} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchChannelMembers(channelId, fid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchChannelMembers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of followers to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options); + async fetchFollowersForAChannel(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowersForAChannel(id, viewerFid, cursor, limit, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.channelUsers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchFollowersForAChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * 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 {string} id Channel ID being queried + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followChannel(channelFollowReqBody, options); + async fetchRelevantFollowersForAChannel(id: string, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowersForAChannel(id, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.followChannel']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchRelevantFollowersForAChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {FetchTrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.inviteChannelMember(removeChannelMemberRequest, options); + async fetchTrendingChannels(timeWindow?: FetchTrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchTrendingChannels(timeWindow, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.inviteChannelMember']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchTrendingChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details + * 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 {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listAllChannels(limit, cursor, options); + async fetchUserChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserChannelMemberships(fid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listAllChannels']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchUserChannelMemberships']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelInvites(channelId, invitedFid, limit, cursor, options); + async fetchUserChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserChannels(fid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelInvites']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchUserChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listChannelMembers(channelId, fid, limit, cursor, options); + async fetchUsersActiveChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUsersActiveChannels(fid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.listChannelMembers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchUsersActiveChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 {string} id Channel ID being queried - * @param {number} 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`. + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.followChannel(channelFollowReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.followChannel']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Invite a user to a channel + * @summary Invite + * @param {InviteChannelMemberReqBody} inviteChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.relevantChannelFollowers(id, viewerFid, options); + async inviteChannelMember(inviteChannelMemberReqBody: InviteChannelMemberReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.inviteChannelMember(inviteChannelMemberReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.relevantChannelFollowers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.inviteChannelMember']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lookupChannel(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupChannel(id, type, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ChannelApi.lookupChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Remove a user from a channel or a user\'s invite to a channel role * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {RemoveChannelMemberReqBody} removeChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeChannelMember(removeChannelMemberRequest, options); + async removeChannelMember(removeChannelMemberReqBody: RemoveChannelMemberReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeChannelMember(removeChannelMemberReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ChannelApi.removeChannelMember']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -1119,12 +1166,12 @@ export const ChannelApiFp = function(configuration?: Configuration) { /** * Accept or reject a channel invite * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {RespondChannelInviteReqBody} respondChannelInviteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.respondChannelInvite(respondChannelInviteRequest, options); + async respondChannelInvite(respondChannelInviteReqBody: RespondChannelInviteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.respondChannelInvite(respondChannelInviteReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ChannelApi.respondChannelInvite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -1144,21 +1191,6 @@ export const ChannelApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['ChannelApi.searchChannels']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.trendingChannels(timeWindow, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.trendingChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * Unfollow a channel * @summary Unfollow a channel @@ -1172,36 +1204,6 @@ export const ChannelApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['ChannelApi.unfollowChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * 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 {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userChannelMemberships(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannelMemberships']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userChannels(fid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ChannelApi.userChannels']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, } }; @@ -1213,28 +1215,31 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa const localVarFp = ChannelApiFp(configuration) return { /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.activeChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchActiveUsersInSingleChannel(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchActiveUsersInSingleChannel(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(axios, basePath)); }, /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelDetails(id, type, viewerFid, options).then((request) => request(axios, basePath)); + fetchAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchAllChannels(limit, cursor, options).then((request) => request(axios, basePath)); }, /** * Returns details of multiple channels @@ -1245,125 +1250,158 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(axios, basePath)); + fetchBulkChannels(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchBulkChannels(ids, type, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * 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 {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(axios, basePath)); + fetchChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] 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} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of followers to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(axios, basePath)); + fetchFollowersForAChannel(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFollowersForAChannel(id, viewerFid, cursor, limit, options).then((request) => request(axios, basePath)); }, /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * 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 {string} id Channel ID being queried + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); + fetchRelevantFollowersForAChannel(id: string, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchRelevantFollowersForAChannel(id, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {FetchTrendingChannelsTimeWindowEnum} [timeWindow] + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); + fetchTrendingChannels(timeWindow?: FetchTrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchTrendingChannels(timeWindow, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details + * 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 {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listAllChannels(limit, cursor, options).then((request) => request(axios, basePath)); + fetchUserChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserChannelMemberships(fid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * 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 {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchUserChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchUsersActiveChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUsersActiveChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** - * 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 {string} id Channel ID being queried - * @param {number} 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`. + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.relevantChannelFollowers(id, viewerFid, options).then((request) => request(axios, basePath)); + followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.followChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Invite a user to a channel + * @summary Invite + * @param {InviteChannelMemberReqBody} inviteChannelMemberReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteChannelMember(inviteChannelMemberReqBody: InviteChannelMemberReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.inviteChannelMember(inviteChannelMemberReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lookupChannel(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupChannel(id, type, viewerFid, options).then((request) => request(axios, basePath)); }, /** * Remove a user from a channel or a user\'s invite to a channel role * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * @param {RemoveChannelMemberReqBody} removeChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.removeChannelMember(removeChannelMemberRequest, options).then((request) => request(axios, basePath)); + removeChannelMember(removeChannelMemberReqBody: RemoveChannelMemberReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.removeChannelMember(removeChannelMemberReqBody, options).then((request) => request(axios, basePath)); }, /** * Accept or reject a channel invite * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * @param {RespondChannelInviteReqBody} respondChannelInviteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(axios, basePath)); + respondChannelInvite(respondChannelInviteReqBody: RespondChannelInviteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.respondChannelInvite(respondChannelInviteReqBody, options).then((request) => request(axios, basePath)); }, /** * Returns a list of channels based on ID or name @@ -1377,18 +1415,6 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.searchChannels(q, limit, cursor, options).then((request) => request(axios, basePath)); }, - /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.trendingChannels(timeWindow, limit, cursor, options).then((request) => request(axios, basePath)); - }, /** * Unfollow a channel * @summary Unfollow a channel @@ -1399,30 +1425,6 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.unfollowChannel(channelFollowReqBody, options).then((request) => request(axios, basePath)); }, - /** - * 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 {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userChannelMemberships(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userChannels(fid, limit, cursor, options).then((request) => request(axios, basePath)); - }, }; }; @@ -1434,31 +1436,34 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa */ export class ChannelApi extends BaseAPI { /** - * Fetches all channels that a user has casted in, in reverse chronological order. - * @summary Fetch channels that user is active in - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * Returns a list of users who are active in a given channel, ordered by ascending FIDs + * @summary Fetch users who are active in a channel + * @param {string} id Channel ID for the channel being queried + * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel + * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel + * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel + * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public activeChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).activeChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchActiveUsersInSingleChannel(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchActiveUsersInSingleChannel(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns details of a channel - * @summary By ID or parent_url - * @param {string} id Channel ID for the channel being queried - * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. - * @param {number} [viewerFid] FID of the user viewing the channel. + * Returns a list of all channels with their details + * @summary Fetch all channels with their details + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public channelDetails(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelDetails(id, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchAllChannels(limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1471,222 +1476,219 @@ export class ChannelApi extends BaseAPI { * @throws {RequiredError} * @memberof ChannelApi */ - public channelDetailsBulk(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelDetailsBulk(ids, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchBulkChannels(ids: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchBulkChannels(ids, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. - * @summary For channel - * @param {string} id Channel ID for the channel being queried - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * 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 {string} [channelId] Channel ID for the channel being queried + * @param {number} [invitedFid] FID of the user being invited + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of followers to fetch (default 25, max 1000) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public channelFollowers(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelFollowers(id, viewerFid, cursor, limit, options).then((request) => request(this.axios, this.basePath)); + public fetchChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of users who are active in a given channel, ordered by ascending FIDs - * @summary Fetch users who are active in a channel - * @param {string} id Channel ID for the channel being queried - * @param {boolean} hasRootCastAuthors Include users who posted the root cast in the channel - * @param {boolean} [hasCastLikers] Include users who liked a cast in the channel - * @param {boolean} [hasCastRecasters] Include users who recasted a cast in the channel - * @param {boolean} [hasReplyAuthors] Include users who replied to a cast in the channel + * Fetch a list of members in a channel + * @summary Fetch members + * @param {string} channelId Channel ID for the channel being queried + * @param {number} [fid] 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} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. - * @param {number} [limit] Number of results to fetch (default 25, max 100) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public channelUsers(id: string, hasRootCastAuthors: boolean, hasCastLikers?: boolean, hasCastRecasters?: boolean, hasReplyAuthors?: boolean, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).channelUsers(id, hasRootCastAuthors, hasCastLikers, hasCastRecasters, hasReplyAuthors, cursor, limit, options).then((request) => request(this.axios, this.basePath)); + public fetchChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Follow a channel - * @summary Follow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. + * @summary For channel + * @param {string} id Channel ID for the channel being queried + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of followers to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).followChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); + public fetchFollowersForAChannel(id: string, viewerFid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchFollowersForAChannel(id, viewerFid, cursor, limit, options).then((request) => request(this.axios, this.basePath)); } /** - * Invite a user to a channel - * @summary Invite - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * 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 {string} id Channel ID being queried + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public inviteChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).inviteChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); + public fetchRelevantFollowersForAChannel(id: string, viewerFid: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchRelevantFollowersForAChannel(id, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of all channels with their details - * @summary Fetch all channels with their details + * Returns a list of trending channels based on activity + * @summary Channels by activity + * @param {FetchTrendingChannelsTimeWindowEnum} [timeWindow] * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public listAllChannels(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listAllChannels(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchTrendingChannels(timeWindow?: FetchTrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchTrendingChannels(timeWindow, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {string} [channelId] Channel ID for the channel being queried - * @param {number} [invitedFid] FID of the user being invited + * 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 {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public listChannelInvites(channelId?: string, invitedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listChannelInvites(channelId, invitedFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchUserChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchUserChannelMemberships(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch a list of members in a channel - * @summary Fetch members - * @param {string} channelId Channel ID for the channel being queried - * @param {number} [fid] FID of the user being queried. Specify this to check if a user is a member of the channel without paginating through all members. + * Returns a list of all channels with their details that a FID follows. + * @summary Following + * @param {number} fid The FID of the user. * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public listChannelMembers(channelId: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).listChannelMembers(channelId, fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchUserChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchUserChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {string} id Channel ID being queried - * @param {number} 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`. + * Fetches all channels that a user has casted in, in reverse chronological order. + * @summary Fetch channels that user is active in + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public relevantChannelFollowers(id: string, viewerFid: number, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).relevantChannelFollowers(id, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchUsersActiveChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).fetchUsersActiveChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Remove a user from a channel or a user\'s invite to a channel role - * @summary Remove user - * @param {RemoveChannelMemberRequest} removeChannelMemberRequest + * Follow a channel + * @summary Follow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public removeChannelMember(removeChannelMemberRequest: RemoveChannelMemberRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).removeChannelMember(removeChannelMemberRequest, options).then((request) => request(this.axios, this.basePath)); + public followChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).followChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Accept or reject a channel invite - * @summary Accept or reject an invite - * @param {RespondChannelInviteRequest} respondChannelInviteRequest + * Invite a user to a channel + * @summary Invite + * @param {InviteChannelMemberReqBody} inviteChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public respondChannelInvite(respondChannelInviteRequest: RespondChannelInviteRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).respondChannelInvite(respondChannelInviteRequest, options).then((request) => request(this.axios, this.basePath)); + public inviteChannelMember(inviteChannelMemberReqBody: InviteChannelMemberReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).inviteChannelMember(inviteChannelMemberReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of channels based on ID or name - * @summary Search by ID or name - * @param {string} q Channel ID or name for the channel being queried - * @param {number} [limit] Number of results to fetch - * @param {string} [cursor] Pagination cursor. + * Returns details of a channel + * @summary By ID or parent_url + * @param {string} id Channel ID for the channel being queried + * @param {ChannelType} [type] Type of identifier being used to query the channel. Defaults to ID. + * @param {number} [viewerFid] FID of the user viewing the channel. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).searchChannels(q, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public lookupChannel(id: string, type?: ChannelType, viewerFid?: number, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).lookupChannel(id, type, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of trending channels based on activity - * @summary Channels by activity - * @param {TrendingChannelsTimeWindowEnum} [timeWindow] - * @param {number} [limit] Number of results to fetch (default 10, max 25) - * @param {string} [cursor] Pagination cursor. + * Remove a user from a channel or a user\'s invite to a channel role + * @summary Remove user + * @param {RemoveChannelMemberReqBody} removeChannelMemberReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public trendingChannels(timeWindow?: TrendingChannelsTimeWindowEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).trendingChannels(timeWindow, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public removeChannelMember(removeChannelMemberReqBody: RemoveChannelMemberReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).removeChannelMember(removeChannelMemberReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Unfollow a channel - * @summary Unfollow a channel - * @param {ChannelFollowReqBody} channelFollowReqBody + * Accept or reject a channel invite + * @summary Accept or reject an invite + * @param {RespondChannelInviteReqBody} respondChannelInviteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).unfollowChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); + public respondChannelInvite(respondChannelInviteReqBody: RespondChannelInviteReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).respondChannelInvite(respondChannelInviteReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 20, max 100) + * Returns a list of channels based on ID or name + * @summary Search by ID or name + * @param {string} q Channel ID or name for the channel being queried + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public userChannelMemberships(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).userChannelMemberships(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public searchChannels(q: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).searchChannels(q, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of all channels with their details that a FID follows. - * @summary Following - * @param {number} fid The FID of the user. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * Unfollow a channel + * @summary Unfollow a channel + * @param {ChannelFollowReqBody} channelFollowReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ChannelApi */ - public userChannels(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).userChannels(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public unfollowChannel(channelFollowReqBody: ChannelFollowReqBody, options?: RawAxiosRequestConfig) { + return ChannelApiFp(this.configuration).unfollowChannel(channelFollowReqBody, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const TrendingChannelsTimeWindowEnum = { +export const FetchTrendingChannelsTimeWindowEnum = { _1d: '1d', _7d: '7d', _30d: '30d' } as const; -export type TrendingChannelsTimeWindowEnum = typeof TrendingChannelsTimeWindowEnum[keyof typeof TrendingChannelsTimeWindowEnum]; +export type FetchTrendingChannelsTimeWindowEnum = typeof FetchTrendingChannelsTimeWindowEnum[keyof typeof FetchTrendingChannelsTimeWindowEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts index 70149856..8a800ce5 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/feed-api.ts @@ -28,14 +28,14 @@ import type { EmbedType } from '../models'; // @ts-ignore import type { ErrorRes } from '../models'; // @ts-ignore -import type { FeedForYou400Response } from '../models'; -// @ts-ignore import type { FeedResponse } from '../models'; // @ts-ignore import type { FeedTrendingProvider } from '../models'; // @ts-ignore import type { FeedType } from '../models'; // @ts-ignore +import type { FetchFeedForYou400Response } from '../models'; +// @ts-ignore import type { FilterType } from '../models'; // @ts-ignore import type { ForYouProvider } from '../models'; @@ -45,6 +45,76 @@ import type { ForYouProvider } from '../models'; */ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchCastsForUser: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchCastsForUser', 'fid', fid) + const localVarPath = `/farcaster/feed/user/casts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (includeReplies !== undefined) { + localVarQueryParameter['include_replies'] = includeReplies; + } + + if (parentUrl !== undefined) { + localVarQueryParameter['parent_url'] = parentUrl; + } + + if (channelId !== undefined) { + localVarQueryParameter['channel_id'] = channelId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. * @summary By filters @@ -58,15 +128,15 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type * @param {Array} [embedTypes] 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} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feed: async (feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchFeed: async (feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'feedType' is not null or undefined - assertParamExists('feed', 'feedType', feedType) + assertParamExists('fetchFeed', 'feedType', feedType) const localVarPath = `/farcaster/feed`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -153,15 +223,15 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {boolean} [withReplies] Include replies in the response, false by default * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedChannels: async (channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + fetchFeedByChannelIds: async (channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'channelIds' is not null or undefined - assertParamExists('feedChannels', 'channelIds', channelIds) + assertParamExists('fetchFeedByChannelIds', 'channelIds', channelIds) const localVarPath = `/farcaster/feed/channels`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -221,20 +291,21 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedFollowing: async (fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedFollowing', 'fid', fid) - const localVarPath = `/farcaster/feed/following`; + fetchFeedByParentUrls: async (parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'parentUrls' is not null or undefined + assertParamExists('fetchFeedByParentUrls', 'parentUrls', parentUrls) + const localVarPath = `/farcaster/feed/parent_urls`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -249,16 +320,20 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; + if (parentUrls !== undefined) { + localVarQueryParameter['parent_urls'] = parentUrls; + } + + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; } if (viewerFid !== undefined) { localVarQueryParameter['viewer_fid'] = viewerFid; } - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; + if (withReplies !== undefined) { + localVarQueryParameter['with_replies'] = withReplies; } if (limit !== undefined) { @@ -286,15 +361,15 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} fid FID of user whose feed you want to create * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedForYou: async (fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchFeedForYou: async (fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('feedForYou', 'fid', fid) + assertParamExists('fetchFeedForYou', 'fid', fid) const localVarPath = `/farcaster/feed/for_you`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -348,13 +423,13 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) /** * Fetch feed of casts with Frames, reverse chronological order * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedFrames: async (limit?: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchFramesOnlyFeed: async (limit?: number, viewerFid?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/farcaster/feed/frames`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -394,21 +469,17 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedParentUrls: async (parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'parentUrls' is not null or undefined - assertParamExists('feedParentUrls', 'parentUrls', parentUrls) - const localVarPath = `/farcaster/feed/parent_urls`; + fetchPopularCastsByUser: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchPopularCastsByUser', 'fid', fid) + const localVarPath = `/farcaster/feed/user/popular`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -423,30 +494,14 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (parentUrls !== undefined) { - localVarQueryParameter['parent_urls'] = parentUrls; - } - - if (withRecasts !== undefined) { - localVarQueryParameter['with_recasts'] = withRecasts; + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; } if (viewerFid !== undefined) { localVarQueryParameter['viewer_fid'] = viewerFid; } - if (withReplies !== undefined) { - localVarQueryParameter['with_replies'] = withReplies; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -459,20 +514,20 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedTrending: async (limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/feed/trending`; + fetchRepliesAndRecastsForUser: async (fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchRepliesAndRecastsForUser', 'fid', fid) + const localVarPath = `/farcaster/feed/user/replies_and_recasts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -487,6 +542,14 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } + + if (filter !== undefined) { + localVarQueryParameter['filter'] = filter; + } + if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } @@ -499,22 +562,6 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewerFid; } - if (timeWindow !== undefined) { - localVarQueryParameter['time_window'] = timeWindow; - } - - if (channelId !== undefined) { - localVarQueryParameter['channel_id'] = channelId; - } - - if (provider !== undefined) { - localVarQueryParameter['provider'] = provider; - } - - if (providerMetadata !== undefined) { - localVarQueryParameter['provider_metadata'] = providerMetadata; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -527,22 +574,20 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedUserCasts: async (fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserCasts', 'fid', fid) - const localVarPath = `/farcaster/feed/user/casts`; + fetchTrendingFeed: async (limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/feed/trending`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -557,14 +602,6 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } @@ -573,18 +610,26 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } - if (includeReplies !== undefined) { - localVarQueryParameter['include_replies'] = includeReplies; + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; } - if (parentUrl !== undefined) { - localVarQueryParameter['parent_url'] = parentUrl; + if (timeWindow !== undefined) { + localVarQueryParameter['time_window'] = timeWindow; } if (channelId !== undefined) { localVarQueryParameter['channel_id'] = channelId; } + if (provider !== undefined) { + localVarQueryParameter['provider'] = provider; + } + + if (providerMetadata !== undefined) { + localVarQueryParameter['provider_metadata'] = providerMetadata; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -597,17 +642,20 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * 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 + * Fetch feed based on who a user is following + * @summary Following * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedUserPopular: async (fid: number, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchUserFollowingFeed: async (fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserPopular', 'fid', fid) - const localVarPath = `/farcaster/feed/user/popular`; + assertParamExists('fetchUserFollowingFeed', 'fid', fid) + const localVarPath = `/farcaster/feed/following`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -630,6 +678,18 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewerFid; } + if (withRecasts !== undefined) { + localVarQueryParameter['with_recasts'] = withRecasts; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -641,68 +701,8 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) options: localVarRequestOptions, }; }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserRepliesRecasts: async (fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('feedUserRepliesRecasts', 'fid', fid) - const localVarPath = `/farcaster/feed/user/replies_and_recasts`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (filter !== undefined) { - localVarQueryParameter['filter'] = filter; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; + } +}; /** * FeedApi - functional programming interface @@ -711,6 +711,25 @@ export const FeedApiAxiosParamCreator = function (configuration?: Configuration) export const FeedApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = FeedApiAxiosParamCreator(configuration) return { + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchCastsForUser(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCastsForUser(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchCastsForUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. * @summary By filters @@ -724,16 +743,16 @@ export const FeedApiFp = function(configuration?: Configuration) { * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type * @param {Array} [embedTypes] 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} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options); + async fetchFeed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFeed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feed']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchFeed']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -744,33 +763,34 @@ export const FeedApiFp = function(configuration?: Configuration) { * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {boolean} [withReplies] Include replies in the response, false by default * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options); + async fetchFeedByChannelIds(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFeedByChannelIds(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedChannels']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchFeedByChannelIds']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options); + async fetchFeedByParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFeedByParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFollowing']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchFeedByParentUrls']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -779,118 +799,98 @@ export const FeedApiFp = function(configuration?: Configuration) { * @param {number} fid FID of user whose feed you want to create * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options); + async fetchFeedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFeedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedForYou']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchFeedForYou']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Fetch feed of casts with Frames, reverse chronological order * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedFrames(limit, viewerFid, cursor, options); + async fetchFramesOnlyFeed(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFramesOnlyFeed(limit, viewerFid, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedFrames']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchFramesOnlyFeed']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options); + async fetchPopularCastsByUser(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPopularCastsByUser(fid, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedParentUrls']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchPopularCastsByUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options); + async fetchRepliesAndRecastsForUser(fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRepliesAndRecastsForUser(fid, filter, limit, cursor, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedTrending']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchRepliesAndRecastsForUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options); + async fetchTrendingFeed(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchTrendingFeed(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserCasts']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchTrendingFeed']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 + * Fetch feed based on who a user is following + * @summary Following * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserPopular(fid, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserPopular']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options); + async fetchUserFollowingFeed(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowingFeed(fid, viewerFid, withRecasts, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FeedApi.feedUserRepliesRecasts']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FeedApi.fetchUserFollowingFeed']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -903,6 +903,22 @@ export const FeedApiFp = function(configuration?: Configuration) { export const FeedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = FeedApiFp(configuration) return { + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchCastsForUser(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchCastsForUser(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(axios, basePath)); + }, /** * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. * @summary By filters @@ -916,14 +932,14 @@ export const FeedApiFactory = function (configuration?: Configuration, basePath? * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type * @param {Array} [embedTypes] 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} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); + fetchFeed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFeed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); }, /** * Fetch feed based on channel IDs @@ -933,28 +949,29 @@ export const FeedApiFactory = function (configuration?: Configuration, basePath? * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {boolean} [withReplies] Include replies in the response, false by default * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(axios, basePath)); + fetchFeedByChannelIds(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFeedByChannelIds(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(axios, basePath)); }, /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(axios, basePath)); + fetchFeedByParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFeedByParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(axios, basePath)); }, /** * Fetch a personalized For You feed for a user @@ -962,98 +979,81 @@ export const FeedApiFactory = function (configuration?: Configuration, basePath? * @param {number} fid FID of user whose feed you want to create * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(axios, basePath)); + fetchFeedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFeedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(axios, basePath)); }, /** * Fetch feed of casts with Frames, reverse chronological order * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedFrames(limit, viewerFid, cursor, options).then((request) => request(axios, basePath)); + fetchFramesOnlyFeed(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFramesOnlyFeed(limit, viewerFid, cursor, options).then((request) => request(axios, basePath)); }, /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(axios, basePath)); + fetchPopularCastsByUser(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchPopularCastsByUser(fid, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(axios, basePath)); + fetchRepliesAndRecastsForUser(fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchRepliesAndRecastsForUser(fid, filter, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(axios, basePath)); + fetchTrendingFeed(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchTrendingFeed(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(axios, basePath)); }, /** - * 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 + * Fetch feed based on who a user is following + * @summary Following * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserPopular(fid, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(axios, basePath)); + fetchUserFollowingFeed(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserFollowingFeed(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(axios, basePath)); }, }; }; @@ -1065,6 +1065,24 @@ export const FeedApiFactory = function (configuration?: Configuration, basePath? * @extends {BaseAPI} */ export class FeedApi extends BaseAPI { + /** + * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel + * @summary Chronologically + * @param {number} fid FID of user whose recent casts you want to fetch + * @param {number} [viewerFid] FID of the user viewing the feed + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor + * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default + * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id + * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeedApi + */ + public fetchCastsForUser(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchCastsForUser(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type. * @summary By filters @@ -1078,15 +1096,15 @@ export class FeedApi extends BaseAPI { * @param {string} [embedUrl] Used when filter_type=embed_url can be used to fetch all casts with an embed url that contains embed_url. Requires feed_type and filter_type * @param {Array} [embedTypes] 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} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchFeed(feedType: FeedType, filterType?: FilterType, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean, embedUrl?: string, embedTypes?: Array, withRecasts?: boolean, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchFeed(feedType, filterType, fid, fids, parentUrl, channelId, membersOnly, embedUrl, embedTypes, withRecasts, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1097,31 +1115,32 @@ export class FeedApi extends BaseAPI { * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {boolean} [withReplies] Include replies in the response, false by default * @param {boolean} [membersOnly] Only include casts from members of the channel. True by default. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {boolean} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedChannels(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedChannels(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(this.axios, this.basePath)); + public fetchFeedByChannelIds(channelIds: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, membersOnly?: boolean, limit?: number, cursor?: string, shouldModerate?: boolean, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchFeedByChannelIds(channelIds, withRecasts, viewerFid, withReplies, membersOnly, limit, cursor, shouldModerate, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch feed based on who a user is following - * @summary Following - * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * Fetch feed based on parent URLs + * @summary By parent URLs + * @param {string} parentUrls Comma separated list of parent_urls * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withReplies] Include replies in the response, false by default + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedFollowing(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedFollowing(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchFeedByParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchFeedByParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1130,131 +1149,112 @@ export class FeedApi extends BaseAPI { * @param {number} fid FID of user whose feed you want to create * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {ForYouProvider} [provider] - * @param {number} [limit] Number of results to fetch (default 25, max 50) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(this.axios, this.basePath)); + public fetchFeedForYou(fid: number, viewerFid?: number, provider?: ForYouProvider, limit?: number, cursor?: string, providerMetadata?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchFeedForYou(fid, viewerFid, provider, limit, cursor, providerMetadata, options).then((request) => request(this.axios, this.basePath)); } /** * Fetch feed of casts with Frames, reverse chronological order * @summary Casts with Frames - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedFrames(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedFrames(limit, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchFramesOnlyFeed(limit?: number, viewerFid?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchFramesOnlyFeed(limit, viewerFid, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch feed based on parent URLs - * @summary By parent URLs - * @param {string} parentUrls Comma separated list of parent_urls - * @param {boolean} [withRecasts] Include recasts in the response, true by default - * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {boolean} [withReplies] Include replies in the response, false by default - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} fid FID of user whose feed you want to create + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedParentUrls(parentUrls: string, withRecasts?: boolean, viewerFid?: number, withReplies?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedParentUrls(parentUrls, withRecasts, viewerFid, withReplies, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchPopularCastsByUser(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchPopularCastsByUser(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. - * @summary Trending casts - * @param {number} [limit] Number of results to fetch (max 10) - * @param {string} [cursor] Pagination cursor + * Fetch recent replies and recasts for a given user FID; sorted by most recent first + * @summary Replies and recasts + * @param {number} fid FID of user whose replies and recasts you want to fetch + * @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] filter to fetch only replies or recasts + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FeedTrendingTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) - * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. - * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. - * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedTrending(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FeedTrendingTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedTrending(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(this.axios, this.basePath)); + public fetchRepliesAndRecastsForUser(fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchRepliesAndRecastsForUser(fid, filter, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel - * @summary Chronologically - * @param {number} fid FID of user whose recent casts you want to fetch - * @param {number} [viewerFid] FID of the user viewing the feed + * Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only. + * @summary Trending casts * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor - * @param {boolean} [includeReplies] Include reply casts by the author in the response, true by default - * @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id - * @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url + * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only) + * @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. + * @param {FeedTrendingProvider} [provider] The provider of the trending casts feed. + * @param {string} [providerMetadata] provider_metadata is a URI-encoded stringified JSON object that can be used to pass additional metadata to the provider. Only available for mbd provider right now. See [here](https://docs.neynar.com/docs/feed-for-you-w-external-providers) on how to use. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedUserCasts(fid: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserCasts(fid, viewerFid, limit, cursor, includeReplies, parentUrl, channelId, options).then((request) => request(this.axios, this.basePath)); + public fetchTrendingFeed(limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, provider?: FeedTrendingProvider, providerMetadata?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchTrendingFeed(limit, cursor, viewerFid, timeWindow, channelId, provider, providerMetadata, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 + * Fetch feed based on who a user is following + * @summary Following * @param {number} fid FID of user whose feed you want to create - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FeedApi - */ - public feedUserPopular(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserPopular(fid, viewerFid, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch recent replies and recasts for a given user FID; sorted by most recent first - * @summary Replies and recasts - * @param {number} fid FID of user whose replies and recasts you want to fetch - * @param {FeedUserRepliesRecastsFilterEnum} [filter] filter to fetch only replies or recasts - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. * @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {boolean} [withRecasts] Include recasts in the response, true by default + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ - public feedUserRepliesRecasts(fid: number, filter?: FeedUserRepliesRecastsFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return FeedApiFp(this.configuration).feedUserRepliesRecasts(fid, filter, limit, cursor, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchUserFollowingFeed(fid: number, viewerFid?: number, withRecasts?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FeedApiFp(this.configuration).fetchUserFollowingFeed(fid, viewerFid, withRecasts, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const FeedTrendingTimeWindowEnum = { +export const FetchRepliesAndRecastsForUserFilterEnum = { + Replies: 'replies', + Recasts: 'recasts', + All: 'all' +} as const; +export type FetchRepliesAndRecastsForUserFilterEnum = typeof FetchRepliesAndRecastsForUserFilterEnum[keyof typeof FetchRepliesAndRecastsForUserFilterEnum]; +/** + * @export + */ +export const FetchTrendingFeedTimeWindowEnum = { _1h: '1h', _6h: '6h', _12h: '12h', _24h: '24h', _7d: '7d' } as const; -export type FeedTrendingTimeWindowEnum = typeof FeedTrendingTimeWindowEnum[keyof typeof FeedTrendingTimeWindowEnum]; -/** - * @export - */ -export const FeedUserRepliesRecastsFilterEnum = { - Replies: 'replies', - Recasts: 'recasts', - All: 'all' -} as const; -export type FeedUserRepliesRecastsFilterEnum = typeof FeedUserRepliesRecastsFilterEnum[keyof typeof FeedUserRepliesRecastsFilterEnum]; +export type FetchTrendingFeedTimeWindowEnum = typeof FetchTrendingFeedTimeWindowEnum[keyof typeof FetchTrendingFeedTimeWindowEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts index 88dc4acc..84b1132f 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/fname-api.ts @@ -38,9 +38,9 @@ export const FnameApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fnameAvailability: async (fname: string, options: RawAxiosRequestConfig = {}): Promise => { + isFnameAvailable: async (fname: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fname' is not null or undefined - assertParamExists('fnameAvailability', 'fname', fname) + assertParamExists('isFnameAvailable', 'fname', fname) const localVarPath = `/farcaster/fname/availability`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -88,10 +88,10 @@ export const FnameApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fnameAvailability(fname: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fnameAvailability(fname, options); + async isFnameAvailable(fname: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.isFnameAvailable(fname, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FnameApi.fnameAvailability']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FnameApi.isFnameAvailable']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -111,8 +111,8 @@ export const FnameApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fnameAvailability(fname: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fnameAvailability(fname, options).then((request) => request(axios, basePath)); + isFnameAvailable(fname: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.isFnameAvailable(fname, options).then((request) => request(axios, basePath)); }, }; }; @@ -132,8 +132,8 @@ export class FnameApi extends BaseAPI { * @throws {RequiredError} * @memberof FnameApi */ - public fnameAvailability(fname: string, options?: RawAxiosRequestConfig) { - return FnameApiFp(this.configuration).fnameAvailability(fname, options).then((request) => request(this.axios, this.basePath)); + public isFnameAvailable(fname: string, options?: RawAxiosRequestConfig) { + return FnameApiFp(this.configuration).isFnameAvailable(fname, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts index 87aba065..13b4e624 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts @@ -38,20 +38,18 @@ import type { UsersResponse } from '../models'; export const FollowsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - followersV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchFollowSuggestions: async (fid: number, viewerFid?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('followersV2', 'fid', fid) - const localVarPath = `/farcaster/followers`; + assertParamExists('fetchFollowSuggestions', 'fid', fid) + const localVarPath = `/farcaster/following/suggested`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -74,18 +72,10 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['viewer_fid'] = viewerFid; } - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -98,20 +88,19 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} targetFid User who\'s profile you are looking at + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - followingV2: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('followingV2', 'fid', fid) - const localVarPath = `/farcaster/following`; + fetchRelevantFollowers: async (targetFid: number, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'targetFid' is not null or undefined + assertParamExists('fetchRelevantFollowers', 'targetFid', targetFid) + // verify required parameter 'viewerFid' is not null or undefined + assertParamExists('fetchRelevantFollowers', 'viewerFid', viewerFid) + const localVarPath = `/farcaster/followers/relevant`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -126,26 +115,14 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; + if (targetFid !== undefined) { + localVarQueryParameter['target_fid'] = targetFid; } if (viewerFid !== undefined) { localVarQueryParameter['viewer_fid'] = viewerFid; } - if (sortType !== undefined) { - localVarQueryParameter['sort_type'] = sortType; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -158,19 +135,20 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * 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 {number} targetFid User who\'s profile you are looking at - * @param {number} 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 a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - relevantFollowers: async (targetFid: number, viewerFid: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'targetFid' is not null or undefined - assertParamExists('relevantFollowers', 'targetFid', targetFid) - // verify required parameter 'viewerFid' is not null or undefined - assertParamExists('relevantFollowers', 'viewerFid', viewerFid) - const localVarPath = `/farcaster/followers/relevant`; + fetchUserFollowers: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchUserFollowers', 'fid', fid) + const localVarPath = `/farcaster/followers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -185,14 +163,26 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (targetFid !== undefined) { - localVarQueryParameter['target_fid'] = targetFid; + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; } if (viewerFid !== undefined) { localVarQueryParameter['viewer_fid'] = viewerFid; } + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -205,18 +195,20 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - suggestedFollows: async (fid: number, viewerFid?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchUserFollowing: async (fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('suggestedFollows', 'fid', fid) - const localVarPath = `/farcaster/following/suggested`; + assertParamExists('fetchUserFollowing', 'fid', fid) + const localVarPath = `/farcaster/following`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -239,10 +231,18 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['viewer_fid'] = viewerFid; } + if (sortType !== undefined) { + localVarQueryParameter['sort_type'] = sortType; + } + if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -265,66 +265,66 @@ export const FollowsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = FollowsApiAxiosParamCreator(configuration) return { /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followersV2(fid, viewerFid, sortType, limit, cursor, options); + async fetchFollowSuggestions(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowSuggestions(fid, viewerFid, limit, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.followersV2']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchFollowSuggestions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} targetFid User who\'s profile you are looking at + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.followingV2(fid, viewerFid, sortType, limit, cursor, options); + async fetchRelevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowers(targetFid, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.followingV2']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchRelevantFollowers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 {number} targetFid User who\'s profile you are looking at - * @param {number} 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 a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.relevantFollowers(targetFid, viewerFid, options); + async fetchUserFollowers(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowers(fid, viewerFid, sortType, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.relevantFollowers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchUserFollowers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.suggestedFollows(fid, viewerFid, limit, options); + async fetchUserFollowing(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowing(fid, viewerFid, sortType, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FollowsApi.suggestedFollows']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchUserFollowing']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -338,32 +338,16 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa const localVarFp = FollowsApiFp(configuration) return { /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); + fetchFollowSuggestions(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFollowSuggestions(fid, viewerFid, limit, options).then((request) => request(axios, basePath)); }, /** * Returns a list of relevant followers for a specific FID. This usually shows on a profile as \"X, Y and Z follow this user\". @@ -373,20 +357,36 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.relevantFollowers(targetFid, viewerFid, options).then((request) => request(axios, basePath)); + fetchRelevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchRelevantFollowers(targetFid, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows + * Returns a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchUserFollowers(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserFollowers(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.suggestedFollows(fid, viewerFid, limit, options).then((request) => request(axios, basePath)); + fetchUserFollowing(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserFollowing(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(axios, basePath)); }, }; }; @@ -399,62 +399,62 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa */ export class FollowsApi extends BaseAPI { /** - * Returns a list of followers for a specific FID. - * @summary Followers - * @param {number} fid User who\'s profile you are looking at - * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` - * @param {number} [limit] Number of results to fetch (default 20, max 100) - * @param {string} [cursor] Pagination cursor. + * Fetch a list of suggested users to follow. Used to help users discover new users to follow + * @summary Suggest Follows + * @param {number} fid FID of the user whose following you want to fetch. + * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of results to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FollowsApi */ - public followersV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).followersV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchFollowSuggestions(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).fetchFollowSuggestions(fid, viewerFid, limit, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. - * @summary Followed by - * @param {number} fid FID of the user whose following you want to fetch. - * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. - * @param {number} [limit] Number of results to fetch (default 25, max 100) - * @param {string} [cursor] Pagination cursor. + * 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 {number} targetFid User who\'s profile you are looking at + * @param {number} 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`. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FollowsApi */ - public followingV2(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).followingV2(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchRelevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).fetchRelevantFollowers(targetFid, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {number} targetFid User who\'s profile you are looking at - * @param {number} 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 a list of followers for a specific FID. + * @summary Followers + * @param {number} fid User who\'s profile you are looking at + * @param {number} [viewerFid] Providing this will return a list of followers that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {FollowSortType} [sortType] Sort type for fetch followers. Default is `desc_chron` + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FollowsApi */ - public relevantFollowers(targetFid: number, viewerFid: number, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).relevantFollowers(targetFid, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchUserFollowers(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).fetchUserFollowers(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch a list of suggested users to follow. Used to help users discover new users to follow - * @summary Suggest Follows + * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. + * @summary Followed by * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewerFid] Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {FollowSortType} [sortType] Optional parameter to sort the users based on different criteria. + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FollowsApi */ - public suggestedFollows(fid: number, viewerFid?: number, limit?: number, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).suggestedFollows(fid, viewerFid, limit, options).then((request) => request(this.axios, this.basePath)); + public fetchUserFollowing(fid: number, viewerFid?: number, sortType?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return FollowsApiFp(this.configuration).fetchUserFollowing(fid, viewerFid, sortType, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts index b7dcb797..59d485ca 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/frame-api.ts @@ -22,20 +22,20 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { DeleteFrameResponse } from '../models'; +import type { DeleteFrameReqBody } from '../models'; // @ts-ignore -import type { DeleteNeynarFrameRequest } from '../models'; +import type { DeleteFrameResponse } from '../models'; // @ts-ignore import type { ErrorRes } from '../models'; // @ts-ignore +import type { FetchFrameMetaTagsFromUrl200Response } from '../models'; +// @ts-ignore import type { Frame } from '../models'; // @ts-ignore import type { FrameActionReqBody } from '../models'; // @ts-ignore import type { FrameDeveloperManagedActionReqBody } from '../models'; // @ts-ignore -import type { FrameFromUrl200Response } from '../models'; -// @ts-ignore import type { FrameType } from '../models'; // @ts-ignore import type { FrameValidateAnalyticsResponse } from '../models'; @@ -44,15 +44,15 @@ import type { FrameValidateListResponse } from '../models'; // @ts-ignore import type { NeynarFrame } from '../models'; // @ts-ignore -import type { NeynarFrameCreationRequest } from '../models'; +import type { NeynarFrameCreationReqBody } from '../models'; +// @ts-ignore +import type { NeynarFrameUpdateReqBody } from '../models'; // @ts-ignore -import type { NeynarFrameUpdateRequest } from '../models'; +import type { ValidateFrameActionReqBody } from '../models'; // @ts-ignore import type { ValidateFrameActionResponse } from '../models'; // @ts-ignore import type { ValidateFrameAnalyticsType } from '../models'; -// @ts-ignore -import type { ValidateFrameRequest } from '../models'; /** * FrameApi - axios parameter creator * @export @@ -62,13 +62,13 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration /** * Delete an existing frame, if it was made by the developer (identified by API key) * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {DeleteFrameReqBody} deleteFrameReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteNeynarFrame: async (deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'deleteNeynarFrameRequest' is not null or undefined - assertParamExists('deleteNeynarFrame', 'deleteNeynarFrameRequest', deleteNeynarFrameRequest) + deleteNeynarFrame: async (deleteFrameReqBody: DeleteFrameReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'deleteFrameReqBody' is not null or undefined + assertParamExists('deleteNeynarFrame', 'deleteFrameReqBody', deleteFrameReqBody) const localVarPath = `/farcaster/frame`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -91,7 +91,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(deleteNeynarFrameRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(deleteFrameReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -99,13 +99,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Fetch a list of frames made by the developer (identified by API key) - * @summary List of frames + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchNeynarFrames: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/frame/list`; + fetchFrameMetaTagsFromUrl: async (url: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'url' is not null or undefined + assertParamExists('fetchFrameMetaTagsFromUrl', 'url', url) + const localVarPath = `/farcaster/frame/crawl`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -120,6 +123,10 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (url !== undefined) { + localVarQueryParameter['url'] = url; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -132,16 +139,13 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl + * Fetch a list of frames made by the developer (identified by API key) + * @summary List of frames * @param {*} [options] Override http request option. * @throws {RequiredError} */ - frameFromUrl: async (url: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'url' is not null or undefined - assertParamExists('frameFromUrl', 'url', url) - const localVarPath = `/farcaster/frame/crawl`; + fetchNeynarFrames: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/frame/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -156,10 +160,6 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (url !== undefined) { - localVarQueryParameter['url'] = url; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -172,18 +172,26 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Fetch a frame either by UUID or Neynar URL - * @summary Frame by UUID or URL - * @param {FrameType} type - * @param {string} [uuid] UUID of the frame to fetch - * @param {string} [url] URL of the Neynar frame to fetch + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {FetchValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - lookupNeynarFrame: async (type: FrameType, uuid?: string, url?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'type' is not null or undefined - assertParamExists('lookupNeynarFrame', 'type', type) - const localVarPath = `/farcaster/frame`; + fetchValidateFrameAnalytics: async (frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: FetchValidateFrameAnalyticsAggregateWindowEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameUrl' is not null or undefined + assertParamExists('fetchValidateFrameAnalytics', 'frameUrl', frameUrl) + // verify required parameter 'analyticsType' is not null or undefined + assertParamExists('fetchValidateFrameAnalytics', 'analyticsType', analyticsType) + // verify required parameter 'start' is not null or undefined + assertParamExists('fetchValidateFrameAnalytics', 'start', start) + // verify required parameter 'stop' is not null or undefined + assertParamExists('fetchValidateFrameAnalytics', 'stop', stop) + const localVarPath = `/farcaster/frame/validate/analytics`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -198,16 +206,28 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (type !== undefined) { - localVarQueryParameter['type'] = type; + if (frameUrl !== undefined) { + localVarQueryParameter['frame_url'] = frameUrl; } - if (uuid !== undefined) { - localVarQueryParameter['uuid'] = uuid; + if (analyticsType !== undefined) { + localVarQueryParameter['analytics_type'] = analyticsType; } - if (url !== undefined) { - localVarQueryParameter['url'] = url; + if (start !== undefined) { + localVarQueryParameter['start'] = (start as any instanceof Date) ? + (start as any).toISOString() : + start; + } + + if (stop !== undefined) { + localVarQueryParameter['stop'] = (stop as any instanceof Date) ? + (stop as any).toISOString() : + stop; + } + + if (aggregateWindow !== undefined) { + localVarQueryParameter['aggregate_window'] = aggregateWindow; } @@ -222,16 +242,13 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. - * @summary Post a frame action, cast action or a cast composer action - * @param {FrameActionReqBody} frameActionReqBody + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postFrameAction: async (frameActionReqBody: FrameActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameActionReqBody' is not null or undefined - assertParamExists('postFrameAction', 'frameActionReqBody', frameActionReqBody) - const localVarPath = `/farcaster/frame/action`; + fetchValidateFrameList: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/frame/validate/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -239,7 +256,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -248,12 +265,9 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(frameActionReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -261,16 +275,18 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. - * @summary Signature packet - * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody + * Fetch a frame either by UUID or Neynar URL + * @summary Frame by UUID or URL + * @param {FrameType} type + * @param {string} [uuid] UUID of the frame to fetch + * @param {string} [url] URL of the Neynar frame to fetch * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postFrameDeveloperManagedAction: async (frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameDeveloperManagedActionReqBody' is not null or undefined - assertParamExists('postFrameDeveloperManagedAction', 'frameDeveloperManagedActionReqBody', frameDeveloperManagedActionReqBody) - const localVarPath = `/farcaster/frame/developer_managed/action`; + lookupNeynarFrame: async (type: FrameType, uuid?: string, url?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'type' is not null or undefined + assertParamExists('lookupNeynarFrame', 'type', type) + const localVarPath = `/farcaster/frame`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -278,21 +294,30 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (uuid !== undefined) { + localVarQueryParameter['uuid'] = uuid; + } + + if (url !== undefined) { + localVarQueryParameter['url'] = url; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(frameDeveloperManagedActionReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -300,16 +325,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Create a new frame with a list of pages. - * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * Post frame actions, cast actions or cast composer actions to the server \\ (In order to post any of these actions, you need to have an approved `signer_uuid`) The POST request to the post_url has a timeout of 5 seconds for frames. + * @summary Post a frame action, cast action or a cast composer action + * @param {FrameActionReqBody} frameActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - publishNeynarFrame: async (neynarFrameCreationRequest: NeynarFrameCreationRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'neynarFrameCreationRequest' is not null or undefined - assertParamExists('publishNeynarFrame', 'neynarFrameCreationRequest', neynarFrameCreationRequest) - const localVarPath = `/farcaster/frame`; + postFrameAction: async (frameActionReqBody: FrameActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameActionReqBody' is not null or undefined + assertParamExists('postFrameAction', 'frameActionReqBody', frameActionReqBody) + const localVarPath = `/farcaster/frame/action`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -331,7 +356,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameCreationRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(frameActionReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -339,16 +364,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) - * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * Post a frame action that has been signed with a developer managed signer The POST request to the post_url has a timeout of 5 seconds. + * @summary Signature packet + * @param {FrameDeveloperManagedActionReqBody} frameDeveloperManagedActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateNeynarFrame: async (neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'neynarFrameUpdateRequest' is not null or undefined - assertParamExists('updateNeynarFrame', 'neynarFrameUpdateRequest', neynarFrameUpdateRequest) - const localVarPath = `/farcaster/frame`; + postFrameActionDeveloperManaged: async (frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'frameDeveloperManagedActionReqBody' is not null or undefined + assertParamExists('postFrameActionDeveloperManaged', 'frameDeveloperManagedActionReqBody', frameDeveloperManagedActionReqBody) + const localVarPath = `/farcaster/frame/developer_managed/action`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -356,7 +381,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -370,7 +395,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameUpdateRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(frameDeveloperManagedActionReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -378,16 +403,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) - * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest + * Create a new frame with a list of pages. + * @summary Create frame + * @param {NeynarFrameCreationReqBody} neynarFrameCreationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - validateFrame: async (validateFrameRequest: ValidateFrameRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'validateFrameRequest' is not null or undefined - assertParamExists('validateFrame', 'validateFrameRequest', validateFrameRequest) - const localVarPath = `/farcaster/frame/validate`; + publishNeynarFrame: async (neynarFrameCreationReqBody: NeynarFrameCreationReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'neynarFrameCreationReqBody' is not null or undefined + assertParamExists('publishNeynarFrame', 'neynarFrameCreationReqBody', neynarFrameCreationReqBody) + const localVarPath = `/farcaster/frame`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -409,7 +434,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(validateFrameRequest, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameCreationReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -417,26 +442,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) + * @summary Update frame + * @param {NeynarFrameUpdateReqBody} neynarFrameUpdateReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - validateFrameAnalytics: async (frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'frameUrl' is not null or undefined - assertParamExists('validateFrameAnalytics', 'frameUrl', frameUrl) - // verify required parameter 'analyticsType' is not null or undefined - assertParamExists('validateFrameAnalytics', 'analyticsType', analyticsType) - // verify required parameter 'start' is not null or undefined - assertParamExists('validateFrameAnalytics', 'start', start) - // verify required parameter 'stop' is not null or undefined - assertParamExists('validateFrameAnalytics', 'stop', stop) - const localVarPath = `/farcaster/frame/validate/analytics`; + updateNeynarFrame: async (neynarFrameUpdateReqBody: NeynarFrameUpdateReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'neynarFrameUpdateReqBody' is not null or undefined + assertParamExists('updateNeynarFrame', 'neynarFrameUpdateReqBody', neynarFrameUpdateReqBody) + const localVarPath = `/farcaster/frame`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -444,42 +459,21 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (frameUrl !== undefined) { - localVarQueryParameter['frame_url'] = frameUrl; - } - - if (analyticsType !== undefined) { - localVarQueryParameter['analytics_type'] = analyticsType; - } - - if (start !== undefined) { - localVarQueryParameter['start'] = (start as any instanceof Date) ? - (start as any).toISOString() : - start; - } - - if (stop !== undefined) { - localVarQueryParameter['stop'] = (stop as any instanceof Date) ? - (stop as any).toISOString() : - stop; - } - - if (aggregateWindow !== undefined) { - localVarQueryParameter['aggregate_window'] = aggregateWindow; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(neynarFrameUpdateReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -487,13 +481,16 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user + * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) + * @summary Validate frame action + * @param {ValidateFrameActionReqBody} validateFrameActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - validateFrameList: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/frame/validate/list`; + validateFrameAction: async (validateFrameActionReqBody: ValidateFrameActionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'validateFrameActionReqBody' is not null or undefined + assertParamExists('validateFrameAction', 'validateFrameActionReqBody', validateFrameActionReqBody) + const localVarPath = `/farcaster/frame/validate`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -501,7 +498,7 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -510,9 +507,12 @@ export const FrameApiAxiosParamCreator = function (configuration?: Configuration + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(validateFrameActionReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -532,16 +532,29 @@ export const FrameApiFp = function(configuration?: Configuration) { /** * Delete an existing frame, if it was made by the developer (identified by API key) * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {DeleteFrameReqBody} deleteFrameReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNeynarFrame(deleteNeynarFrameRequest, options); + async deleteNeynarFrame(deleteFrameReqBody: DeleteFrameReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNeynarFrame(deleteFrameReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FrameApi.deleteNeynarFrame']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchFrameMetaTagsFromUrl(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFrameMetaTagsFromUrl(url, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.fetchFrameMetaTagsFromUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Fetch a list of frames made by the developer (identified by API key) * @summary List of frames @@ -555,16 +568,32 @@ export const FrameApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {FetchValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchValidateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: FetchValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchValidateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['FrameApi.fetchValidateFrameAnalytics']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async frameFromUrl(url: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.frameFromUrl(url, options); + async fetchValidateFrameList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchValidateFrameList(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.frameFromUrl']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FrameApi.fetchValidateFrameList']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -602,21 +631,21 @@ export const FrameApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options); + async postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameDeveloperManagedAction']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FrameApi.postFrameActionDeveloperManaged']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Create a new frame with a list of pages. * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {NeynarFrameCreationReqBody} neynarFrameCreationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishNeynarFrame(neynarFrameCreationRequest, options); + async publishNeynarFrame(neynarFrameCreationReqBody: NeynarFrameCreationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishNeynarFrame(neynarFrameCreationReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FrameApi.publishNeynarFrame']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -624,12 +653,12 @@ export const FrameApiFp = function(configuration?: Configuration) { /** * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {NeynarFrameUpdateReqBody} neynarFrameUpdateReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateNeynarFrame(neynarFrameUpdateRequest, options); + async updateNeynarFrame(neynarFrameUpdateReqBody: NeynarFrameUpdateReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateNeynarFrame(neynarFrameUpdateReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FrameApi.updateNeynarFrame']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -637,43 +666,14 @@ export const FrameApiFp = function(configuration?: Configuration) { /** * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest + * @param {ValidateFrameActionReqBody} validateFrameActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrame(validateFrameRequest, options); + async validateFrameAction(validateFrameActionReqBody: ValidateFrameActionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameAction(validateFrameActionReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrame']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameAnalytics']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async validateFrameList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.validateFrameList(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameList']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['FrameApi.validateFrameAction']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -689,12 +689,22 @@ export const FrameApiFactory = function (configuration?: Configuration, basePath /** * Delete an existing frame, if it was made by the developer (identified by API key) * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {DeleteFrameReqBody} deleteFrameReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteNeynarFrame(deleteFrameReqBody: DeleteFrameReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteNeynarFrame(deleteFrameReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(axios, basePath)); + fetchFrameMetaTagsFromUrl(url: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchFrameMetaTagsFromUrl(url, options).then((request) => request(axios, basePath)); }, /** * Fetch a list of frames made by the developer (identified by API key) @@ -706,14 +716,27 @@ export const FrameApiFactory = function (configuration?: Configuration, basePath return localVarFp.fetchNeynarFrames(options).then((request) => request(axios, basePath)); }, /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {FetchValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` * @param {*} [options] Override http request option. * @throws {RequiredError} */ - frameFromUrl(url: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.frameFromUrl(url, options).then((request) => request(axios, basePath)); + fetchValidateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: FetchValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchValidateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(axios, basePath)); + }, + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchValidateFrameList(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchValidateFrameList(options).then((request) => request(axios, basePath)); }, /** * Fetch a frame either by UUID or Neynar URL @@ -744,61 +767,38 @@ export const FrameApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(axios, basePath)); + postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody, options).then((request) => request(axios, basePath)); }, /** * Create a new frame with a list of pages. * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {NeynarFrameCreationReqBody} neynarFrameCreationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(axios, basePath)); + publishNeynarFrame(neynarFrameCreationReqBody: NeynarFrameCreationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishNeynarFrame(neynarFrameCreationReqBody, options).then((request) => request(axios, basePath)); }, /** * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {NeynarFrameUpdateReqBody} neynarFrameUpdateReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(axios, basePath)); + updateNeynarFrame(neynarFrameUpdateReqBody: NeynarFrameUpdateReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.updateNeynarFrame(neynarFrameUpdateReqBody, options).then((request) => request(axios, basePath)); }, /** * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest + * @param {ValidateFrameActionReqBody} validateFrameActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrame(validateFrameRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - validateFrameList(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.validateFrameList(options).then((request) => request(axios, basePath)); + validateFrameAction(validateFrameActionReqBody: ValidateFrameActionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.validateFrameAction(validateFrameActionReqBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -813,13 +813,25 @@ export class FrameApi extends BaseAPI { /** * Delete an existing frame, if it was made by the developer (identified by API key) * @summary Delete frame - * @param {DeleteNeynarFrameRequest} deleteNeynarFrameRequest + * @param {DeleteFrameReqBody} deleteFrameReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public deleteNeynarFrame(deleteFrameReqBody: DeleteFrameReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).deleteNeynarFrame(deleteFrameReqBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches the frame meta tags from the URL + * @summary Meta tags from URL + * @param {string} url The frame URL to crawl * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FrameApi */ - public deleteNeynarFrame(deleteNeynarFrameRequest: DeleteNeynarFrameRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).deleteNeynarFrame(deleteNeynarFrameRequest, options).then((request) => request(this.axios, this.basePath)); + public fetchFrameMetaTagsFromUrl(url: string, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).fetchFrameMetaTagsFromUrl(url, options).then((request) => request(this.axios, this.basePath)); } /** @@ -834,15 +846,30 @@ export class FrameApi extends BaseAPI { } /** - * Fetches the frame meta tags from the URL - * @summary Meta tags from URL - * @param {string} url The frame URL to crawl + * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. + * @summary Analytics for the frame + * @param {string} frameUrl + * @param {ValidateFrameAnalyticsType} analyticsType + * @param {string} start + * @param {string} stop + * @param {FetchValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FrameApi */ - public frameFromUrl(url: string, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).frameFromUrl(url, options).then((request) => request(this.axios, this.basePath)); + public fetchValidateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: FetchValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).fetchValidateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetch a list of all the frames validated by a user + * @summary All frames validated by user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FrameApi + */ + public fetchValidateFrameList(options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).fetchValidateFrameList(options).then((request) => request(this.axios, this.basePath)); } /** @@ -879,78 +906,51 @@ export class FrameApi extends BaseAPI { * @throws {RequiredError} * @memberof FrameApi */ - public postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).postFrameDeveloperManagedAction(frameDeveloperManagedActionReqBody, options).then((request) => request(this.axios, this.basePath)); + public postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody: FrameDeveloperManagedActionReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).postFrameActionDeveloperManaged(frameDeveloperManagedActionReqBody, options).then((request) => request(this.axios, this.basePath)); } /** * Create a new frame with a list of pages. * @summary Create frame - * @param {NeynarFrameCreationRequest} neynarFrameCreationRequest + * @param {NeynarFrameCreationReqBody} neynarFrameCreationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FrameApi */ - public publishNeynarFrame(neynarFrameCreationRequest: NeynarFrameCreationRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).publishNeynarFrame(neynarFrameCreationRequest, options).then((request) => request(this.axios, this.basePath)); + public publishNeynarFrame(neynarFrameCreationReqBody: NeynarFrameCreationReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).publishNeynarFrame(neynarFrameCreationReqBody, options).then((request) => request(this.axios, this.basePath)); } /** * Update an existing frame with a list of pages, if it was made by the developer (identified by API key) * @summary Update frame - * @param {NeynarFrameUpdateRequest} neynarFrameUpdateRequest + * @param {NeynarFrameUpdateReqBody} neynarFrameUpdateReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FrameApi */ - public updateNeynarFrame(neynarFrameUpdateRequest: NeynarFrameUpdateRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).updateNeynarFrame(neynarFrameUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + public updateNeynarFrame(neynarFrameUpdateReqBody: NeynarFrameUpdateReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).updateNeynarFrame(neynarFrameUpdateReqBody, options).then((request) => request(this.axios, this.basePath)); } /** * Validates a frame against by an interacting user against a Farcaster Hub \\ (In order to validate a frame, message bytes from Frame Action must be provided in hex) * @summary Validate frame action - * @param {ValidateFrameRequest} validateFrameRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public validateFrame(validateFrameRequest: ValidateFrameRequest, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrame(validateFrameRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch analytics for total-interactors, interactors, nteractions-per-cast and input-text. - * @summary Analytics for the frame - * @param {string} frameUrl - * @param {ValidateFrameAnalyticsType} analyticsType - * @param {string} start - * @param {string} stop - * @param {ValidateFrameAnalyticsAggregateWindowEnum} [aggregateWindow] Required for `analytics_type=interactions-per-cast` - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FrameApi - */ - public validateFrameAnalytics(frameUrl: string, analyticsType: ValidateFrameAnalyticsType, start: string, stop: string, aggregateWindow?: ValidateFrameAnalyticsAggregateWindowEnum, options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrameAnalytics(frameUrl, analyticsType, start, stop, aggregateWindow, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Fetch a list of all the frames validated by a user - * @summary All frames validated by user + * @param {ValidateFrameActionReqBody} validateFrameActionReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FrameApi */ - public validateFrameList(options?: RawAxiosRequestConfig) { - return FrameApiFp(this.configuration).validateFrameList(options).then((request) => request(this.axios, this.basePath)); + public validateFrameAction(validateFrameActionReqBody: ValidateFrameActionReqBody, options?: RawAxiosRequestConfig) { + return FrameApiFp(this.configuration).validateFrameAction(validateFrameActionReqBody, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ -export const ValidateFrameAnalyticsAggregateWindowEnum = { +export const FetchValidateFrameAnalyticsAggregateWindowEnum = { _10s: '10s', _1m: '1m', _2m: '2m', @@ -963,4 +963,4 @@ export const ValidateFrameAnalyticsAggregateWindowEnum = { _1d: '1d', _7d: '7d' } as const; -export type ValidateFrameAnalyticsAggregateWindowEnum = typeof ValidateFrameAnalyticsAggregateWindowEnum[keyof typeof ValidateFrameAnalyticsAggregateWindowEnum]; +export type FetchValidateFrameAnalyticsAggregateWindowEnum = typeof FetchValidateFrameAnalyticsAggregateWindowEnum[keyof typeof FetchValidateFrameAnalyticsAggregateWindowEnum]; diff --git a/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts index 55eb74b4..a0c103d1 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts @@ -36,15 +36,15 @@ import type { MuteResponse } from '../models'; export const MuteApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID + * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Unmute FID * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + deleteMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'muteReqBody' is not null or undefined - assertParamExists('addMute', 'muteReqBody', muteReqBody) + assertParamExists('deleteMute', 'muteReqBody', muteReqBody) const localVarPath = `/farcaster/mute`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -53,7 +53,7 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -75,16 +75,18 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Unmute FID - * @param {MuteReqBody} muteReqBody + * Fetches all FIDs that a user has muted. + * @summary Muted FIDs of user + * @param {number} fid The user\'s FID (identifier) + * @param {number} [limit] Number of results to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'muteReqBody' is not null or undefined - assertParamExists('deleteMute', 'muteReqBody', muteReqBody) - const localVarPath = `/farcaster/mute`; + fetchMuteList: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fid' is not null or undefined + assertParamExists('fetchMuteList', 'fid', fid) + const localVarPath = `/farcaster/mute/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -92,21 +94,30 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (fid !== undefined) { + localVarQueryParameter['fid'] = fid; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -114,18 +125,16 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetches all FIDs that a user has muted. - * @summary Muted FIDs of user - * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). - * @param {string} [cursor] Pagination cursor. + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - muteList: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fid' is not null or undefined - assertParamExists('muteList', 'fid', fid) - const localVarPath = `/farcaster/mute/list`; + publishMute: async (muteReqBody: MuteReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'muteReqBody' is not null or undefined + assertParamExists('publishMute', 'muteReqBody', muteReqBody) + const localVarPath = `/farcaster/mute`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -133,30 +142,21 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fid !== undefined) { - localVarQueryParameter['fid'] = fid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(muteReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -173,19 +173,6 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) export const MuteApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = MuteApiAxiosParamCreator(configuration) return { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addMute(muteReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MuteApi.addMute']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. * @summary Unmute FID @@ -203,15 +190,28 @@ export const MuteApiFp = function(configuration?: Configuration) { * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.muteList(fid, limit, cursor, options); + async fetchMuteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchMuteList(fid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MuteApi.muteList']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['MuteApi.fetchMuteList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishMute(muteReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MuteApi.publishMute']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -224,16 +224,6 @@ export const MuteApiFp = function(configuration?: Configuration) { export const MuteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = MuteApiFp(configuration) return { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.addMute(muteReqBody, options).then((request) => request(axios, basePath)); - }, /** * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. * @summary Unmute FID @@ -248,13 +238,23 @@ export const MuteApiFactory = function (configuration?: Configuration, basePath? * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.muteList(fid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchMuteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchMuteList(fid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishMute(muteReqBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -266,18 +266,6 @@ export const MuteApiFactory = function (configuration?: Configuration, basePath? * @extends {BaseAPI} */ export class MuteApi extends BaseAPI { - /** - * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. - * @summary Mute FID - * @param {MuteReqBody} muteReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MuteApi - */ - public addMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).addMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); - } - /** * Deletes a mute for a given FID. This is a whitelisted API, reach out if you want access. * @summary Unmute FID @@ -294,14 +282,26 @@ export class MuteApi extends BaseAPI { * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {number} fid The user\'s FID (identifier) - * @param {number} [limit] Number of results to fetch (default 20, max 100). + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApi */ - public muteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).muteList(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchMuteList(fid: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return MuteApiFp(this.configuration).fetchMuteList(fid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. + * @summary Mute FID + * @param {MuteReqBody} muteReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MuteApi + */ + public publishMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) { + return MuteApiFp(this.configuration).publishMute(muteReqBody, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts index 5eab7793..59a51b79 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/notifications-api.ts @@ -37,45 +37,6 @@ import type { OperationResponse } from '../models'; */ export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - markNotificationsAsSeen: async (markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'markNotificationsAsSeenReqBody' is not null or undefined - assertParamExists('markNotificationsAsSeen', 'markNotificationsAsSeenReqBody', markNotificationsAsSeenReqBody) - const localVarPath = `/farcaster/notifications/seen`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(markNotificationsAsSeenReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Returns a list of notifications for a specific FID. * @summary For user @@ -86,9 +47,9 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notifications: async (fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchAllNotifications: async (fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('notifications', 'fid', fid) + assertParamExists('fetchAllNotifications', 'fid', fid) const localVarPath = `/farcaster/notifications`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -141,11 +102,11 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notificationsChannel: async (fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchChannelNotificationsForUser: async (fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('notificationsChannel', 'fid', fid) + assertParamExists('fetchChannelNotificationsForUser', 'fid', fid) // verify required parameter 'channelIds' is not null or undefined - assertParamExists('notificationsChannel', 'channelIds', channelIds) + assertParamExists('fetchChannelNotificationsForUser', 'channelIds', channelIds) const localVarPath = `/farcaster/notifications/channel`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -198,11 +159,11 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notificationsParentUrl: async (fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchNotificationsByParentUrlForUser: async (fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('notificationsParentUrl', 'fid', fid) + assertParamExists('fetchNotificationsByParentUrlForUser', 'fid', fid) // verify required parameter 'parentUrls' is not null or undefined - assertParamExists('notificationsParentUrl', 'parentUrls', parentUrls) + assertParamExists('fetchNotificationsByParentUrlForUser', 'parentUrls', parentUrls) const localVarPath = `/farcaster/notifications/parent_url`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -240,6 +201,45 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + markNotificationsAsSeen: async (markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'markNotificationsAsSeenReqBody' is not null or undefined + assertParamExists('markNotificationsAsSeen', 'markNotificationsAsSeenReqBody', markNotificationsAsSeenReqBody) + const localVarPath = `/farcaster/notifications/seen`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(markNotificationsAsSeenReqBody, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -255,19 +255,6 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi export const NotificationsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration) return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.markNotificationsAsSeen']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * Returns a list of notifications for a specific FID. * @summary For user @@ -278,10 +265,10 @@ export const NotificationsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notifications(fid, type, priorityMode, cursor, options); + async fetchAllNotifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAllNotifications(fid, type, priorityMode, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notifications']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.fetchAllNotifications']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -294,10 +281,10 @@ export const NotificationsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsChannel(fid, channelIds, priorityMode, cursor, options); + async fetchChannelNotificationsForUser(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchChannelNotificationsForUser(fid, channelIds, priorityMode, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsChannel']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.fetchChannelNotificationsForUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -310,10 +297,23 @@ export const NotificationsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options); + async fetchNotificationsByParentUrlForUser(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchNotificationsByParentUrlForUser(fid, parentUrls, priorityMode, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['NotificationsApi.notificationsParentUrl']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.fetchNotificationsByParentUrlForUser']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['NotificationsApi.markNotificationsAsSeen']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -326,16 +326,6 @@ export const NotificationsApiFp = function(configuration?: Configuration) { export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = NotificationsApiFp(configuration) return { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(axios, basePath)); - }, /** * Returns a list of notifications for a specific FID. * @summary For user @@ -346,8 +336,8 @@ export const NotificationsApiFactory = function (configuration?: Configuration, * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notifications(fid, type, priorityMode, cursor, options).then((request) => request(axios, basePath)); + fetchAllNotifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchAllNotifications(fid, type, priorityMode, cursor, options).then((request) => request(axios, basePath)); }, /** * Returns a list of notifications for a user in specific channels @@ -359,8 +349,8 @@ export const NotificationsApiFactory = function (configuration?: Configuration, * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(axios, basePath)); + fetchChannelNotificationsForUser(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchChannelNotificationsForUser(fid, channelIds, priorityMode, cursor, options).then((request) => request(axios, basePath)); }, /** * Returns a list of notifications for a user in specific parent_urls @@ -372,8 +362,18 @@ export const NotificationsApiFactory = function (configuration?: Configuration, * @param {*} [options] Override http request option. * @throws {RequiredError} */ - notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(axios, basePath)); + fetchNotificationsByParentUrlForUser(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchNotificationsByParentUrlForUser(fid, parentUrls, priorityMode, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -385,18 +385,6 @@ export const NotificationsApiFactory = function (configuration?: Configuration, * @extends {BaseAPI} */ export class NotificationsApi extends BaseAPI { - /** - * Mark notifications as seen - * @summary Mark as seen - * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationsApi - */ - public markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(this.axios, this.basePath)); - } - /** * Returns a list of notifications for a specific FID. * @summary For user @@ -408,8 +396,8 @@ export class NotificationsApi extends BaseAPI { * @throws {RequiredError} * @memberof NotificationsApi */ - public notifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notifications(fid, type, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchAllNotifications(fid: number, type?: NotificationType, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).fetchAllNotifications(fid, type, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); } /** @@ -423,8 +411,8 @@ export class NotificationsApi extends BaseAPI { * @throws {RequiredError} * @memberof NotificationsApi */ - public notificationsChannel(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notificationsChannel(fid, channelIds, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchChannelNotificationsForUser(fid: number, channelIds: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).fetchChannelNotificationsForUser(fid, channelIds, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); } /** @@ -438,8 +426,20 @@ export class NotificationsApi extends BaseAPI { * @throws {RequiredError} * @memberof NotificationsApi */ - public notificationsParentUrl(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { - return NotificationsApiFp(this.configuration).notificationsParentUrl(fid, parentUrls, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchNotificationsByParentUrlForUser(fid: number, parentUrls: string, priorityMode?: boolean, cursor?: string, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).fetchNotificationsByParentUrlForUser(fid, parentUrls, priorityMode, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Mark notifications as seen + * @summary Mark as seen + * @param {MarkNotificationsAsSeenReqBody} markNotificationsAsSeenReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationsApi + */ + public markNotificationsAsSeen(markNotificationsAsSeenReqBody: MarkNotificationsAsSeenReqBody, options?: RawAxiosRequestConfig) { + return NotificationsApiFp(this.configuration).markNotificationsAsSeen(markNotificationsAsSeenReqBody, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts index b9efcc6d..7bf84570 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/reaction-api.ts @@ -66,45 +66,6 @@ export const ReactionApiAxiosParamCreator = function (configuration?: Configurat - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * 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 {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'reactionReqBody' is not null or undefined - assertParamExists('postReaction', 'reactionReqBody', reactionReqBody) - const localVarPath = `/farcaster/reaction`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - - localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -123,16 +84,16 @@ export const ReactionApiAxiosParamCreator = function (configuration?: Configurat * @param {string} hash * @param {string} 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} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - reactionsCast: async (hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchCastReactions: async (hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'hash' is not null or undefined - assertParamExists('reactionsCast', 'hash', hash) + assertParamExists('fetchCastReactions', 'hash', hash) // verify required parameter 'types' is not null or undefined - assertParamExists('reactionsCast', 'types', types) + assertParamExists('fetchCastReactions', 'types', types) const localVarPath = `/farcaster/reactions/cast`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -185,16 +146,16 @@ export const ReactionApiAxiosParamCreator = function (configuration?: Configurat * @param {number} fid * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - reactionsUser: async (fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchUserReactions: async (fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('reactionsUser', 'fid', fid) + assertParamExists('fetchUserReactions', 'fid', fid) // verify required parameter 'type' is not null or undefined - assertParamExists('reactionsUser', 'type', type) + assertParamExists('fetchUserReactions', 'type', type) const localVarPath = `/farcaster/reactions/user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -236,6 +197,45 @@ export const ReactionApiAxiosParamCreator = function (configuration?: Configurat let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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 {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishReaction: async (reactionReqBody: ReactionReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'reactionReqBody' is not null or undefined + assertParamExists('publishReaction', 'reactionReqBody', reactionReqBody) + const localVarPath = `/farcaster/reaction`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(reactionReqBody, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -264,34 +264,21 @@ export const ReactionApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['ReactionApi.deleteReaction']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * 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 {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postReaction(reactionReqBody, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.postReaction']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, /** * Fetches reactions for a given cast * @summary Reactions for cast * @param {string} hash * @param {string} 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} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsCast(hash, types, viewerFid, limit, cursor, options); + async fetchCastReactions(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCastReactions(hash, types, viewerFid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsCast']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.fetchCastReactions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -300,15 +287,28 @@ export const ReactionApiFp = function(configuration?: Configuration) { * @param {number} fid * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsUser(fid, type, viewerFid, limit, cursor, options); + async fetchUserReactions(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserReactions(fid, type, viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.fetchUserReactions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishReaction(reactionReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ReactionApi.reactionsUser']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['ReactionApi.publishReaction']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -331,29 +331,19 @@ export const ReactionApiFactory = function (configuration?: Configuration, baseP deleteReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteReaction(reactionReqBody, options).then((request) => request(axios, basePath)); }, - /** - * 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 {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postReaction(reactionReqBody, options).then((request) => request(axios, basePath)); - }, /** * Fetches reactions for a given cast * @summary Reactions for cast * @param {string} hash * @param {string} 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} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchCastReactions(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchCastReactions(hash, types, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** * Fetches reactions for a given user @@ -361,13 +351,23 @@ export const ReactionApiFactory = function (configuration?: Configuration, baseP * @param {number} fid * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + fetchUserReactions(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchUserReactions(fid, type, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + }, + /** + * 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 {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishReaction(reactionReqBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -391,32 +391,20 @@ export class ReactionApi extends BaseAPI { return ReactionApiFp(this.configuration).deleteReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); } - /** - * 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 {ReactionReqBody} reactionReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ReactionApi - */ - public postReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).postReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); - } - /** * Fetches reactions for a given cast * @summary Reactions for cast * @param {string} hash * @param {string} 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} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReactionApi */ - public reactionsCast(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).reactionsCast(hash, types, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchCastReactions(hash: string, types: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).fetchCastReactions(hash, types, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** @@ -425,14 +413,26 @@ export class ReactionApi extends BaseAPI { * @param {number} fid * @param {ReactionsType} type Type of reaction to fetch (likes or recasts or all) * @param {number} [viewerFid] Providing this will return a list of reactions that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] Number of results to fetch (default 25, max 100) + * @param {number} [limit] Number of results to fetch * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReactionApi */ - public reactionsUser(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return ReactionApiFp(this.configuration).reactionsUser(fid, type, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public fetchUserReactions(fid: number, type: ReactionsType, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).fetchUserReactions(fid, type, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 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 {ReactionReqBody} reactionReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReactionApi + */ + public publishReaction(reactionReqBody: ReactionReqBody, options?: RawAxiosRequestConfig) { + return ReactionApiFp(this.configuration).publishReaction(reactionReqBody, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts index 83508178..1dc1d9af 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/signer-api.ts @@ -65,6 +65,53 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchAuthorizationUrl: async (clientId: string, responseType: AuthorizationUrlResponseType, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'clientId' is not null or undefined + assertParamExists('fetchAuthorizationUrl', 'clientId', clientId) + // verify required parameter 'responseType' is not null or undefined + assertParamExists('fetchAuthorizationUrl', 'responseType', responseType) + const localVarPath = `/farcaster/login/authorize`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + if (clientId !== undefined) { + localVarQueryParameter['client_id'] = clientId; + } + + if (responseType !== undefined) { + localVarQueryParameter['response_type'] = responseType; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -81,9 +128,9 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - developerManagedSigner: async (publicKey: string, options: RawAxiosRequestConfig = {}): Promise => { + lookupDeveloperManagedSigner: async (publicKey: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'publicKey' is not null or undefined - assertParamExists('developerManagedSigner', 'publicKey', publicKey) + assertParamExists('lookupDeveloperManagedSigner', 'publicKey', publicKey) const localVarPath = `/farcaster/signer/developer_managed`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -115,19 +162,16 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchAuthorizationUrl: async (clientId: string, responseType: AuthorizationUrlResponseType, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'clientId' is not null or undefined - assertParamExists('fetchAuthorizationUrl', 'clientId', clientId) - // verify required parameter 'responseType' is not null or undefined - assertParamExists('fetchAuthorizationUrl', 'responseType', responseType) - const localVarPath = `/farcaster/login/authorize`; + lookupSigner: async (signerUuid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'signerUuid' is not null or undefined + assertParamExists('lookupSigner', 'signerUuid', signerUuid) + const localVarPath = `/farcaster/signer`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -142,12 +186,8 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (clientId !== undefined) { - localVarQueryParameter['client_id'] = clientId; - } - - if (responseType !== undefined) { - localVarQueryParameter['response_type'] = responseType; + if (signerUuid !== undefined) { + localVarQueryParameter['signer_uuid'] = signerUuid; } @@ -168,9 +208,9 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - publishMessage: async (body: object, options: RawAxiosRequestConfig = {}): Promise => { + publishMessageToFarcaster: async (body: object, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined - assertParamExists('publishMessage', 'body', body) + assertParamExists('publishMessageToFarcaster', 'body', body) const localVarPath = `/farcaster/message`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -273,46 +313,6 @@ export const SignerApiAxiosParamCreator = function (configuration?: Configuratio localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(registerDeveloperManagedSignedKeyReqBody, localVarRequestOptions, configuration) - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signer: async (signerUuid: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'signerUuid' is not null or undefined - assertParamExists('signer', 'signerUuid', signerUuid) - const localVarPath = `/farcaster/signer`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (signerUuid !== undefined) { - localVarQueryParameter['signer_uuid'] = signerUuid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -340,6 +340,20 @@ export const SignerApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['SignerApi.createSigner']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAuthorizationUrl(clientId, responseType, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SignerApi.fetchAuthorizationUrl']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Fetches the status of a developer managed signer by public key * @summary Status by public key @@ -347,24 +361,23 @@ export const SignerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.developerManagedSigner(publicKey, options); + async lookupDeveloperManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupDeveloperManagedSigner(publicKey, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.developerManagedSigner']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SignerApi.lookupDeveloperManagedSigner']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAuthorizationUrl(clientId, responseType, options); + async lookupSigner(signerUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupSigner(signerUuid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.fetchAuthorizationUrl']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SignerApi.lookupSigner']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -374,10 +387,10 @@ export const SignerApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async publishMessage(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.publishMessage(body, options); + async publishMessageToFarcaster(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishMessageToFarcaster(body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.publishMessage']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SignerApi.publishMessageToFarcaster']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -406,19 +419,6 @@ export const SignerApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['SignerApi.registerSignedKeyForDeveloperManagedSigner']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async signer(signerUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.signer(signerUuid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SignerApi.signer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, } }; @@ -438,6 +438,17 @@ export const SignerApiFactory = function (configuration?: Configuration, basePat createSigner(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSigner(options).then((request) => request(axios, basePath)); }, + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(axios, basePath)); + }, /** * Fetches the status of a developer managed signer by public key * @summary Status by public key @@ -445,19 +456,18 @@ export const SignerApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.developerManagedSigner(publicKey, options).then((request) => request(axios, basePath)); + lookupDeveloperManagedSigner(publicKey: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupDeveloperManagedSigner(publicKey, options).then((request) => request(axios, basePath)); }, /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(axios, basePath)); + lookupSigner(signerUuid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupSigner(signerUuid, options).then((request) => request(axios, basePath)); }, /** * 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. @@ -466,8 +476,8 @@ export const SignerApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - publishMessage(body: object, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.publishMessage(body, options).then((request) => request(axios, basePath)); + publishMessageToFarcaster(body: object, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishMessageToFarcaster(body, options).then((request) => request(axios, basePath)); }, /** * Registers an app FID, deadline and a signature. Returns the signer status with an approval url. @@ -489,16 +499,6 @@ export const SignerApiFactory = function (configuration?: Configuration, basePat registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(axios, basePath)); }, - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - signer(signerUuid: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.signer(signerUuid, options).then((request) => request(axios, basePath)); - }, }; }; @@ -520,6 +520,19 @@ export class SignerApi extends BaseAPI { return SignerApiFp(this.configuration).createSigner(options).then((request) => request(this.axios, this.basePath)); } + /** + * Fetch authorization url (Fetched authorized url useful for SIWN login operation) + * @summary Fetch authorization url + * @param {string} clientId + * @param {AuthorizationUrlResponseType} responseType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SignerApi + */ + public fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(this.axios, this.basePath)); + } + /** * Fetches the status of a developer managed signer by public key * @summary Status by public key @@ -528,21 +541,20 @@ export class SignerApi extends BaseAPI { * @throws {RequiredError} * @memberof SignerApi */ - public developerManagedSigner(publicKey: string, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).developerManagedSigner(publicKey, options).then((request) => request(this.axios, this.basePath)); + public lookupDeveloperManagedSigner(publicKey: string, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).lookupDeveloperManagedSigner(publicKey, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetch authorization url (Fetched authorized url useful for SIWN login operation) - * @summary Fetch authorization url - * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) + * @summary Status + * @param {string} signerUuid * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SignerApi */ - public fetchAuthorizationUrl(clientId: string, responseType: AuthorizationUrlResponseType, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).fetchAuthorizationUrl(clientId, responseType, options).then((request) => request(this.axios, this.basePath)); + public lookupSigner(signerUuid: string, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).lookupSigner(signerUuid, options).then((request) => request(this.axios, this.basePath)); } /** @@ -553,8 +565,8 @@ export class SignerApi extends BaseAPI { * @throws {RequiredError} * @memberof SignerApi */ - public publishMessage(body: object, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).publishMessage(body, options).then((request) => request(this.axios, this.basePath)); + public publishMessageToFarcaster(body: object, options?: RawAxiosRequestConfig) { + return SignerApiFp(this.configuration).publishMessageToFarcaster(body, options).then((request) => request(this.axios, this.basePath)); } /** @@ -580,17 +592,5 @@ export class SignerApi extends BaseAPI { public registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody: RegisterDeveloperManagedSignedKeyReqBody, options?: RawAxiosRequestConfig) { return SignerApiFp(this.configuration).registerSignedKeyForDeveloperManagedSigner(registerDeveloperManagedSignedKeyReqBody, options).then((request) => request(this.axios, this.basePath)); } - - /** - * Gets information status of a signer by passing in a signer_uuid (Use post API to generate a signer) - * @summary Status - * @param {string} signerUuid - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SignerApi - */ - public signer(signerUuid: string, options?: RawAxiosRequestConfig) { - return SignerApiFp(this.configuration).signer(signerUuid, options).then((request) => request(this.axios, this.basePath)); - } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts index 2c57449f..234f48fd 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/storage-api.ts @@ -85,9 +85,9 @@ export const StorageApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - storageAllocations: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + lookupUserStorageAllocations: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('storageAllocations', 'fid', fid) + assertParamExists('lookupUserStorageAllocations', 'fid', fid) const localVarPath = `/farcaster/storage/allocations`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -125,9 +125,9 @@ export const StorageApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - storageUsage: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { + lookupUserStorageUsage: async (fid: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('storageUsage', 'fid', fid) + assertParamExists('lookupUserStorageUsage', 'fid', fid) const localVarPath = `/farcaster/storage/usage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -188,10 +188,10 @@ export const StorageApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async storageAllocations(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.storageAllocations(fid, options); + async lookupUserStorageAllocations(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserStorageAllocations(fid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StorageApi.storageAllocations']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['StorageApi.lookupUserStorageAllocations']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -201,10 +201,10 @@ export const StorageApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async storageUsage(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.storageUsage(fid, options); + async lookupUserStorageUsage(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserStorageUsage(fid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StorageApi.storageUsage']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['StorageApi.lookupUserStorageUsage']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -234,8 +234,8 @@ export const StorageApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - storageAllocations(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.storageAllocations(fid, options).then((request) => request(axios, basePath)); + lookupUserStorageAllocations(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupUserStorageAllocations(fid, options).then((request) => request(axios, basePath)); }, /** * Fetches storage usage for a given user @@ -244,8 +244,8 @@ export const StorageApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - storageUsage(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.storageUsage(fid, options).then((request) => request(axios, basePath)); + lookupUserStorageUsage(fid: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupUserStorageUsage(fid, options).then((request) => request(axios, basePath)); }, }; }; @@ -277,8 +277,8 @@ export class StorageApi extends BaseAPI { * @throws {RequiredError} * @memberof StorageApi */ - public storageAllocations(fid: number, options?: RawAxiosRequestConfig) { - return StorageApiFp(this.configuration).storageAllocations(fid, options).then((request) => request(this.axios, this.basePath)); + public lookupUserStorageAllocations(fid: number, options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).lookupUserStorageAllocations(fid, options).then((request) => request(this.axios, this.basePath)); } /** @@ -289,8 +289,8 @@ export class StorageApi extends BaseAPI { * @throws {RequiredError} * @memberof StorageApi */ - public storageUsage(fid: number, options?: RawAxiosRequestConfig) { - return StorageApiFp(this.configuration).storageUsage(fid, options).then((request) => request(this.axios, this.basePath)); + public lookupUserStorageUsage(fid: number, options?: RawAxiosRequestConfig) { + return StorageApiFp(this.configuration).lookupUserStorageUsage(fid, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts index 1b78f249..d944be25 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/subscribers-api.ts @@ -48,11 +48,11 @@ export const SubscribersApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscribedTo: async (fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchSubscribedToForFid: async (fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('subscribedTo', 'fid', fid) + assertParamExists('fetchSubscribedToForFid', 'fid', fid) // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscribedTo', 'subscriptionProvider', subscriptionProvider) + assertParamExists('fetchSubscribedToForFid', 'subscriptionProvider', subscriptionProvider) const localVarPath = `/farcaster/user/subscribed_to`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -100,11 +100,11 @@ export const SubscribersApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscribers: async (fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchSubscribersForFid: async (fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('subscribers', 'fid', fid) + assertParamExists('fetchSubscribersForFid', 'fid', fid) // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscribers', 'subscriptionProvider', subscriptionProvider) + assertParamExists('fetchSubscribersForFid', 'subscriptionProvider', subscriptionProvider) const localVarPath = `/farcaster/user/subscribers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -151,11 +151,11 @@ export const SubscribersApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscriptionsCreated: async (fid: number, subscriptionProvider: SubscriptionProvider, options: RawAxiosRequestConfig = {}): Promise => { + fetchSubscriptionsForFid: async (fid: number, subscriptionProvider: SubscriptionProvider, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined - assertParamExists('subscriptionsCreated', 'fid', fid) + assertParamExists('fetchSubscriptionsForFid', 'fid', fid) // verify required parameter 'subscriptionProvider' is not null or undefined - assertParamExists('subscriptionsCreated', 'subscriptionProvider', subscriptionProvider) + assertParamExists('fetchSubscriptionsForFid', 'subscriptionProvider', subscriptionProvider) const localVarPath = `/farcaster/user/subscriptions_created`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -209,10 +209,10 @@ export const SubscribersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscribedTo(fid, subscriptionProvider, viewerFid, options); + async fetchSubscribedToForFid(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSubscribedToForFid(fid, subscriptionProvider, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribedTo']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.fetchSubscribedToForFid']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -224,10 +224,10 @@ export const SubscribersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscribers(fid, subscriptionProvider, viewerFid, options); + async fetchSubscribersForFid(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSubscribersForFid(fid, subscriptionProvider, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscribers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.fetchSubscribersForFid']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -238,10 +238,10 @@ export const SubscribersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionsCreated(fid, subscriptionProvider, options); + async fetchSubscriptionsForFid(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSubscriptionsForFid(fid, subscriptionProvider, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SubscribersApi.subscriptionsCreated']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SubscribersApi.fetchSubscriptionsForFid']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -263,8 +263,8 @@ export const SubscribersApiFactory = function (configuration?: Configuration, ba * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); + fetchSubscribedToForFid(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchSubscribedToForFid(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); }, /** * Fetch subscribers for a given FID\'s contracts. Doesn\'t return addresses that don\'t have an FID. @@ -275,8 +275,8 @@ export const SubscribersApiFactory = function (configuration?: Configuration, ba * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); + fetchSubscribersForFid(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchSubscribersForFid(fid, subscriptionProvider, viewerFid, options).then((request) => request(axios, basePath)); }, /** * Fetch created subscriptions for a given FID\'s. @@ -286,8 +286,8 @@ export const SubscribersApiFactory = function (configuration?: Configuration, ba * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(axios, basePath)); + fetchSubscriptionsForFid(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchSubscriptionsForFid(fid, subscriptionProvider, options).then((request) => request(axios, basePath)); }, }; }; @@ -309,8 +309,8 @@ export class SubscribersApi extends BaseAPI { * @throws {RequiredError} * @memberof SubscribersApi */ - public subscribedTo(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscribedTo(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchSubscribedToForFid(fid: number, subscriptionProvider: SubscriptionProvider, viewerFid?: number, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).fetchSubscribedToForFid(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** @@ -323,8 +323,8 @@ export class SubscribersApi extends BaseAPI { * @throws {RequiredError} * @memberof SubscribersApi */ - public subscribers(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscribers(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public fetchSubscribersForFid(fid: number, subscriptionProvider: SubscriptionProviders, viewerFid?: number, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).fetchSubscribersForFid(fid, subscriptionProvider, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** @@ -336,8 +336,8 @@ export class SubscribersApi extends BaseAPI { * @throws {RequiredError} * @memberof SubscribersApi */ - public subscriptionsCreated(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig) { - return SubscribersApiFp(this.configuration).subscriptionsCreated(fid, subscriptionProvider, options).then((request) => request(this.axios, this.basePath)); + public fetchSubscriptionsForFid(fid: number, subscriptionProvider: SubscriptionProvider, options?: RawAxiosRequestConfig) { + return SubscribersApiFp(this.configuration).fetchSubscriptionsForFid(fid, subscriptionProvider, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts index 6b5483f0..3544763a 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -62,16 +62,56 @@ import type { UsersResponse } from '../models'; export const UserApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteVerification: async (removeVerificationReqBody: RemoveVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'removeVerificationReqBody' is not null or undefined + assertParamExists('deleteVerification', 'removeVerificationReqBody', removeVerificationReqBody) + const localVarPath = `/farcaster/user/verification`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(removeVerificationReqBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] * @param {*} [options] Override http request option. - * @deprecated * @throws {RequiredError} */ - activeUsers: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/active`; + fetchBulkUsers: async (fids: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'fids' is not null or undefined + assertParamExists('fetchBulkUsers', 'fids', fids) + const localVarPath = `/farcaster/user/bulk`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -86,12 +126,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (fids !== undefined) { + localVarQueryParameter['fids'] = fids; } - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; } @@ -106,16 +146,18 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody + * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] 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} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - farcasterUserVerificationDelete: async (removeVerificationReqBody: RemoveVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'removeVerificationReqBody' is not null or undefined - assertParamExists('farcasterUserVerificationDelete', 'removeVerificationReqBody', removeVerificationReqBody) - const localVarPath = `/farcaster/user/verification`; + fetchBulkUsersByEthereumAddress: async (addresses: string, addressTypes?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'addresses' is not null or undefined + assertParamExists('fetchBulkUsersByEthereumAddress', 'addresses', addresses) + const localVarPath = `/farcaster/user/bulk-by-address`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -123,21 +165,30 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (addresses !== undefined) { + localVarQueryParameter['addresses'] = addresses; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (addressTypes !== undefined) { + localVarQueryParameter['address_types'] = addressTypes; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(removeVerificationReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -145,16 +196,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * 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 {AddVerificationReqBody} addVerificationReqBody + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - farcasterUserVerificationPost: async (addVerificationReqBody: AddVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'addVerificationReqBody' is not null or undefined - assertParamExists('farcasterUserVerificationPost', 'addVerificationReqBody', addVerificationReqBody) - const localVarPath = `/farcaster/user/verification`; + fetchPowerUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/power`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -162,21 +213,63 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPowerUsersLite: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/farcaster/user/power_lite`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ApiKeyAuth required + await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(addVerificationReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -290,7 +383,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getFreshFid: async (options: RawAxiosRequestConfig = {}): Promise => { + getFreshAccountFID: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/farcaster/user/fid`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -358,16 +451,17 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - powerUsers: async (viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/power`; + lookupUserByUsername: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists('lookupUserByUsername', 'username', username) + const localVarPath = `/farcaster/user/by_username`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -382,16 +476,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (username !== undefined) { + localVarQueryParameter['username'] = username; } - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; } @@ -406,16 +496,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Register account on farcaster. **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 {RegisterUserReqBody} registerUserReqBody + * 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 {AddVerificationReqBody} addVerificationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - registerUser: async (registerUserReqBody: RegisterUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'registerUserReqBody' is not null or undefined - assertParamExists('registerUser', 'registerUserReqBody', registerUserReqBody) - const localVarPath = `/farcaster/user`; + publishVerification: async (addVerificationReqBody: AddVerificationReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'addVerificationReqBody' is not null or undefined + assertParamExists('publishVerification', 'addVerificationReqBody', addVerificationReqBody) + const localVarPath = `/farcaster/user/verification`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -437,7 +527,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(registerUserReqBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(addVerificationReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -445,16 +535,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody + * Register account on farcaster. **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 {RegisterUserReqBody} registerUserReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - unfollowUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'followReqBody' is not null or undefined - assertParamExists('unfollowUser', 'followReqBody', followReqBody) - const localVarPath = `/farcaster/user/follow`; + registerAccount: async (registerUserReqBody: RegisterUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'registerUserReqBody' is not null or undefined + assertParamExists('registerAccount', 'registerUserReqBody', registerUserReqBody) + const localVarPath = `/farcaster/user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -462,7 +552,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -476,7 +566,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(registerUserReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -484,16 +574,19 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of users to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (updateUserReqBody: UpdateUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'updateUserReqBody' is not null or undefined - assertParamExists('updateUser', 'updateUserReqBody', updateUserReqBody) - const localVarPath = `/farcaster/user`; + searchUser: async (q: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'q' is not null or undefined + assertParamExists('searchUser', 'q', q) + const localVarPath = `/farcaster/user/search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -501,21 +594,34 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (q !== undefined) { + localVarQueryParameter['q'] = q; + } + + if (viewerFid !== undefined) { + localVarQueryParameter['viewer_fid'] = viewerFid; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } - - localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(updateUserReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -523,17 +629,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userBulk: async (fids: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'fids' is not null or undefined - assertParamExists('userBulk', 'fids', fids) - const localVarPath = `/farcaster/user/bulk`; + unfollowUser: async (followReqBody: FollowReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'followReqBody' is not null or undefined + assertParamExists('unfollowUser', 'followReqBody', followReqBody) + const localVarPath = `/farcaster/user/follow`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -541,26 +646,21 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - if (fids !== undefined) { - localVarQueryParameter['fids'] = fids; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(followReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -568,108 +668,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) }; }, /** - * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] 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} [viewerFid] + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userBulkByAddress: async (addresses: string, addressTypes?: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'addresses' is not null or undefined - assertParamExists('userBulkByAddress', 'addresses', addresses) - const localVarPath = `/farcaster/user/bulk-by-address`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (addresses !== undefined) { - localVarQueryParameter['addresses'] = addresses; - } - - if (addressTypes !== undefined) { - localVarQueryParameter['address_types'] = addressTypes; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userByUsernameV2: async (username: string, viewerFid?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('userByUsernameV2', 'username', username) - const localVarPath = `/farcaster/user/by_username`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (username !== undefined) { - localVarQueryParameter['username'] = username; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userPowerLite: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/farcaster/user/power_lite`; + updateUser: async (updateUserReqBody: UpdateUserReqBody, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateUserReqBody' is not null or undefined + assertParamExists('updateUser', 'updateUserReqBody', updateUserReqBody) + const localVarPath = `/farcaster/user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -677,7 +685,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -686,64 +694,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userSearch: async (q: string, viewerFid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'q' is not null or undefined - assertParamExists('userSearch', 'q', q) - const localVarPath = `/farcaster/user/search`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication ApiKeyAuth required - await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (viewerFid !== undefined) { - localVarQueryParameter['viewer_fid'] = viewerFid; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - + localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateUserReqBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -761,44 +717,72 @@ export const UserApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) return { /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody * @param {*} [options] Override http request option. - * @deprecated * @throws {RequiredError} */ - async activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.activeUsers(limit, cursor, options); + async deleteVerification(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteVerification(removeVerificationReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.activeUsers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.deleteVerification']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationDelete(removeVerificationReqBody, options); + async fetchBulkUsers(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsers(fids, viewerFid, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationDelete']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.fetchBulkUsers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * 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 {AddVerificationReqBody} addVerificationReqBody + * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] 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} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchBulkUsersByEthereumAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsersByEthereumAddress(addresses, addressTypes, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.fetchBulkUsersByEthereumAddress']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchPowerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsers(viewerFid, limit, cursor, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.fetchPowerUsers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.farcasterUserVerificationPost(addVerificationReqBody, options); + async fetchPowerUsersLite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsersLite(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.farcasterUserVerificationPost']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.fetchPowerUsersLite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -837,10 +821,10 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getFreshFid(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshFid(options); + async getFreshAccountFID(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshAccountFID(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.getFreshFid']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.getFreshAccountFID']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -857,18 +841,30 @@ export const UserApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.powerUsers(viewerFid, limit, cursor, options); + async lookupUserByUsername(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserByUsername(username, viewerFid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.lookupUserByUsername']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * 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 {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishVerification(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishVerification(addVerificationReqBody, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.powerUsers']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.publishVerification']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -878,10 +874,26 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.registerUser(registerUserReqBody, options); + async registerAccount(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerAccount(registerUserReqBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UserApi.registerAccount']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of users to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchUser(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchUser(q, viewerFid, limit, cursor, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.registerUser']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['UserApi.searchUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** @@ -910,6 +922,26 @@ export const UserApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['UserApi.updateUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UserApiFp(configuration) + return { + /** + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteVerification(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteVerification(removeVerificationReqBody, options).then((request) => request(axios, basePath)); + }, /** * Fetches information about multiple users based on FIDs * @summary By FIDs @@ -918,11 +950,8 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userBulk(fids, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userBulk']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + fetchBulkUsers(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchBulkUsers(fids, viewerFid, options).then((request) => request(axios, basePath)); }, /** * 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. @@ -933,25 +962,20 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userBulkByAddress(addresses, addressTypes, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userBulkByAddress']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + fetchBulkUsersByEthereumAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: Array; }> { + return localVarFp.fetchBulkUsersByEthereumAddress(addresses, addressTypes, viewerFid, options).then((request) => request(axios, basePath)); }, /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userByUsernameV2(username, viewerFid, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userByUsernameV2']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + fetchPowerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchPowerUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. @@ -959,69 +983,8 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userPowerLite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userPowerLite(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userPowerLite']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userSearch(q, viewerFid, limit, cursor, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['UserApi.userSearch']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * UserApi - factory interface - * @export - */ -export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UserApiFp(configuration) - return { - /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.activeUsers(limit, cursor, options).then((request) => request(axios, basePath)); - }, - /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(axios, basePath)); - }, - /** - * 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 {AddVerificationReqBody} addVerificationReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(axios, basePath)); + fetchPowerUsersLite(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchPowerUsersLite(options).then((request) => request(axios, basePath)); }, /** * Fetches a list of users given a location @@ -1053,8 +1016,8 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getFreshFid(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getFreshFid(options).then((request) => request(axios, basePath)); + getFreshAccountFID(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFreshAccountFID(options).then((request) => request(axios, basePath)); }, /** * Lookup a user by custody-address @@ -1067,16 +1030,25 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? return localVarFp.lookupUserByCustodyAddress(custodyAddress, options).then((request) => request(axios, basePath)); }, /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.powerUsers(viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); + lookupUserByUsername(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.lookupUserByUsername(username, viewerFid, options).then((request) => request(axios, basePath)); + }, + /** + * 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 {AddVerificationReqBody} addVerificationReqBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishVerification(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.publishVerification(addVerificationReqBody, options).then((request) => request(axios, basePath)); }, /** * Register account on farcaster. **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. @@ -1085,8 +1057,21 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.registerUser(registerUserReqBody, options).then((request) => request(axios, basePath)); + registerAccount(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.registerAccount(registerUserReqBody, options).then((request) => request(axios, basePath)); + }, + /** + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of users to fetch + * @param {string} [cursor] Pagination cursor. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchUser(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.searchUser(q, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); }, /** * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) @@ -1108,62 +1093,6 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateUser(updateUserReqBody, options).then((request) => request(axios, basePath)); }, - /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userBulk(fids, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] 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} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: Array; }> { - return localVarFp.userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userByUsernameV2(username, viewerFid, options).then((request) => request(axios, basePath)); - }, - /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userPowerLite(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userPowerLite(options).then((request) => request(axios, basePath)); - }, - /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userSearch(q, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); - }, }; }; @@ -1175,41 +1104,67 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? */ export class UserApi extends BaseAPI { /** - * Warpcast has deprecated the active badge. Use user/power endpoint instead. - * @summary Fetch active users - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. + * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) + * @summary Delete verification + * @param {RemoveVerificationReqBody} removeVerificationReqBody * @param {*} [options] Override http request option. - * @deprecated * @throws {RequiredError} * @memberof UserApi */ - public activeUsers(limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).activeUsers(limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public deleteVerification(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).deleteVerification(removeVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Removes verification for an eth address for the user \\ (In order to delete verification `signer_uuid` must be approved) - * @summary Delete verification - * @param {RemoveVerificationReqBody} removeVerificationReqBody + * Fetches information about multiple users based on FIDs + * @summary By FIDs + * @param {string} fids Comma separated list of FIDs, up to 100 at a time + * @param {number} [viewerFid] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public farcasterUserVerificationDelete(removeVerificationReqBody: RemoveVerificationReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).farcasterUserVerificationDelete(removeVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); + public fetchBulkUsers(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).fetchBulkUsers(fids, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {AddVerificationReqBody} addVerificationReqBody + * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time + * @param {string} [addressTypes] 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} [viewerFid] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public fetchBulkUsersByEthereumAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).fetchBulkUsersByEthereumAddress(addresses, addressTypes, viewerFid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches power users based on Warpcast power badges. Information is updated once a day. + * @summary Power users + * @param {number} [viewerFid] + * @param {number} [limit] Number of power users to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public farcasterUserVerificationPost(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).farcasterUserVerificationPost(addVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); + public fetchPowerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).fetchPowerUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. + * @summary Power user FIDs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public fetchPowerUsersLite(options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).fetchPowerUsersLite(options).then((request) => request(this.axios, this.basePath)); } /** @@ -1247,8 +1202,8 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getFreshFid(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).getFreshFid(options).then((request) => request(this.axios, this.basePath)); + public getFreshAccountFID(options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).getFreshAccountFID(options).then((request) => request(this.axios, this.basePath)); } /** @@ -1264,119 +1219,79 @@ export class UserApi extends BaseAPI { } /** - * Fetches power users based on Warpcast power badges. Information is updated once a day. - * @summary Power users + * Fetches a single hydrated user object given a username + * @summary By username + * @param {string} username Username of the user to fetch * @param {number} [viewerFid] - * @param {number} [limit] Number of power users to fetch, max 100 - * @param {string} [cursor] Pagination cursor. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public powerUsers(viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).powerUsers(viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Register account on farcaster. **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 {RegisterUserReqBody} registerUserReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public registerUser(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).registerUser(registerUserReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) - * @summary Unfollow user - * @param {FollowReqBody} followReqBody - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof UserApi - */ - public unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).unfollowUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) - * @summary Update user profile - * @param {UpdateUserReqBody} updateUserReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).updateUser(updateUserReqBody, options).then((request) => request(this.axios, this.basePath)); + public lookupUserByUsername(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).lookupUserByUsername(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetches information about multiple users based on FIDs - * @summary By FIDs - * @param {string} fids Comma separated list of FIDs, up to 100 at a time - * @param {number} [viewerFid] + * 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 {AddVerificationReqBody} addVerificationReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userBulk(fids: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userBulk(fids, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public publishVerification(addVerificationReqBody: AddVerificationReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).publishVerification(addVerificationReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * 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 {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time - * @param {string} [addressTypes] 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} [viewerFid] + * Register account on farcaster. **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 {RegisterUserReqBody} registerUserReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userBulkByAddress(addresses: string, addressTypes?: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userBulkByAddress(addresses, addressTypes, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public registerAccount(registerUserReqBody: RegisterUserReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).registerAccount(registerUserReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetches a single hydrated user object given a username - * @summary By username - * @param {string} username Username of the user to fetch - * @param {number} [viewerFid] + * Search for Usernames + * @summary Search for Usernames + * @param {string} q + * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. + * @param {number} [limit] Number of users to fetch + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userByUsernameV2(username: string, viewerFid?: number, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userByUsernameV2(username, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public searchUser(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).searchUser(q, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } /** - * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. - * @summary Power user FIDs + * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) + * @summary Unfollow user + * @param {FollowReqBody} followReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userPowerLite(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userPowerLite(options).then((request) => request(this.axios, this.basePath)); + public unfollowUser(followReqBody: FollowReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).unfollowUser(followReqBody, options).then((request) => request(this.axios, this.basePath)); } /** - * Search for Usernames - * @summary Search for Usernames - * @param {string} q - * @param {number} [viewerFid] Providing this will return search results that respects this user\'s mutes and blocks and includes `viewer_context`. - * @param {number} [limit] - * @param {string} [cursor] Pagination cursor. + * Update user profile \\ (In order to update user\'s profile `signer_uuid` must be approved) + * @summary Update user profile + * @param {UpdateUserReqBody} updateUserReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userSearch(q: string, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).userSearch(q, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); + public updateUser(updateUserReqBody: UpdateUserReqBody, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).updateUser(updateUserReqBody, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts b/src/neynar-api/v2/openapi-farcaster/models/delete-frame-req-body.ts similarity index 79% rename from src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/delete-frame-req-body.ts index e462dce9..bc9e49d8 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/delete-neynar-frame-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/delete-frame-req-body.ts @@ -17,13 +17,13 @@ /** * * @export - * @interface DeleteNeynarFrameRequest + * @interface DeleteFrameReqBody */ -export interface DeleteNeynarFrameRequest { +export interface DeleteFrameReqBody { /** * * @type {string} - * @memberof DeleteNeynarFrameRequest + * @memberof DeleteFrameReqBody */ 'uuid'?: string; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts b/src/neynar-api/v2/openapi-farcaster/models/fetch-feed-for-you400-response.ts similarity index 88% rename from src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts rename to src/neynar-api/v2/openapi-farcaster/models/fetch-feed-for-you400-response.ts index 5945373a..86ba5ef5 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/feed-for-you400-response.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/fetch-feed-for-you400-response.ts @@ -24,9 +24,9 @@ import type { ZodError } from './zod-error'; import type { ZodErrorErrorsInner } from './zod-error-errors-inner'; /** - * @type FeedForYou400Response + * @type FetchFeedForYou400Response * @export */ -export type FeedForYou400Response = ErrorRes | ZodError; +export type FetchFeedForYou400Response = ErrorRes | ZodError; diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts b/src/neynar-api/v2/openapi-farcaster/models/fetch-frame-meta-tags-from-url200-response.ts similarity index 79% rename from src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts rename to src/neynar-api/v2/openapi-farcaster/models/fetch-frame-meta-tags-from-url200-response.ts index 440716a7..7b4d076a 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/frame-from-url200-response.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/fetch-frame-meta-tags-from-url200-response.ts @@ -20,13 +20,13 @@ import type { Frame } from './frame'; /** * The frame object containing the meta tags * @export - * @interface FrameFromUrl200Response + * @interface FetchFrameMetaTagsFromUrl200Response */ -export interface FrameFromUrl200Response { +export interface FetchFrameMetaTagsFromUrl200Response { /** * * @type {Frame} - * @memberof FrameFromUrl200Response + * @memberof FetchFrameMetaTagsFromUrl200Response */ 'frame': Frame; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts b/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts index 0d4ffd3d..9e1a58f4 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/for-you-provider.ts @@ -22,7 +22,6 @@ export const ForYouProvider = { Openrank: 'openrank', - Karma3: 'karma3', Mbd: 'mbd' } as const; diff --git a/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts b/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts index 1b701c80..e954fd4b 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/frame-button-action-type.ts @@ -15,7 +15,7 @@ /** - * + * The action type of a frame button. Action types \"mint\" & \"link\" are to be handled on the client side only and so they will produce a no/op for POST /farcaster/frame/action. * @export * @enum {string} */ @@ -23,7 +23,9 @@ export const FrameButtonActionType = { Post: 'post', PostRedirect: 'post_redirect', - Tx: 'tx' + Tx: 'tx', + Link: 'link', + Mint: 'mint' } as const; export type FrameButtonActionType = typeof FrameButtonActionType[keyof typeof FrameButtonActionType]; diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index e63395a3..3516e765 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -63,8 +63,8 @@ export * from './conversation-conversation'; export * from './dehydrated-channel'; export * from './dehydrated-follower'; export * from './delete-cast-req-body'; +export * from './delete-frame-req-body'; export * from './delete-frame-response'; -export * from './delete-neynar-frame-request'; export * from './developer-managed-signer'; export * from './embed'; export * from './embed-cast'; @@ -82,10 +82,11 @@ export * from './embed-url-metadata-video-stream-inner'; export * from './error-res'; export * from './farcaster-action-req-body'; export * from './farcaster-action-req-body-action'; -export * from './feed-for-you400-response'; export * from './feed-response'; export * from './feed-trending-provider'; export * from './feed-type'; +export * from './fetch-feed-for-you400-response'; +export * from './fetch-frame-meta-tags-from-url200-response'; export * from './filter-type'; export * from './fname-availability-response'; export * from './follow'; @@ -100,7 +101,6 @@ export * from './frame-action-button'; export * from './frame-action-req-body'; export * from './frame-button-action-type'; export * from './frame-developer-managed-action-req-body'; -export * from './frame-from-url200-response'; export * from './frame-input'; export * from './frame-signature-packet'; export * from './frame-signature-packet-trusted-data'; @@ -120,6 +120,7 @@ export * from './frame-validate-list-response'; export * from './hydrated-follower'; export * from './image-object'; export * from './individual-hash-obj'; +export * from './invite-channel-member-req-body'; export * from './location'; export * from './location-address'; export * from './mark-notifications-as-seen-req-body'; @@ -129,9 +130,9 @@ export * from './mute-req-body'; export * from './mute-response'; export * from './next-cursor'; export * from './neynar-frame'; -export * from './neynar-frame-creation-request'; +export * from './neynar-frame-creation-req-body'; export * from './neynar-frame-page'; -export * from './neynar-frame-update-request'; +export * from './neynar-frame-update-req-body'; export * from './neynar-next-frame-page'; export * from './neynar-next-frame-page-mint-url'; export * from './neynar-next-frame-page-redirect'; @@ -176,9 +177,9 @@ export * from './register-signer-key-req-body'; export * from './register-user-req-body'; export * from './register-user-response'; export * from './relevant-followers-response'; -export * from './remove-channel-member-request'; +export * from './remove-channel-member-req-body'; export * from './remove-verification-req-body'; -export * from './respond-channel-invite-request'; +export * from './respond-channel-invite-req-body'; export * from './searched-user'; export * from './signed-key-request-sponsor'; export * from './signer'; @@ -221,9 +222,9 @@ export * from './user-verified-addresses'; export * from './user-viewer-context'; export * from './users-active-channels-response'; export * from './users-response'; +export * from './validate-frame-action-req-body'; export * from './validate-frame-action-response'; export * from './validate-frame-analytics-type'; -export * from './validate-frame-request'; export * from './validated-frame-action'; export * from './validated-frame-action-signer'; export * from './validated-frame-action-tapped-button'; @@ -236,7 +237,6 @@ export * from './webhook-list-response'; export * from './webhook-patch-req-body'; export * from './webhook-post-req-body'; export * from './webhook-put-req-body'; -export * from './webhook-put-req-body-all-of'; export * from './webhook-response'; export * from './webhook-secret'; export * from './webhook-subscription'; diff --git a/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts b/src/neynar-api/v2/openapi-farcaster/models/invite-channel-member-req-body.ts similarity index 78% rename from src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/invite-channel-member-req-body.ts index 8e78ffba..022d8a45 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/invite-channel-member-req-body.ts @@ -20,31 +20,31 @@ import type { ChannelMemberRole } from './channel-member-role'; /** * * @export - * @interface RemoveChannelMemberRequest + * @interface InviteChannelMemberReqBody */ -export interface RemoveChannelMemberRequest { +export interface InviteChannelMemberReqBody { /** * UUID of the signer * @type {string} - * @memberof RemoveChannelMemberRequest + * @memberof InviteChannelMemberReqBody */ 'signer_uuid': string; /** * The unique identifier of a farcaster channel * @type {string} - * @memberof RemoveChannelMemberRequest + * @memberof InviteChannelMemberReqBody */ 'channel_id': string; /** * The unique identifier of a farcaster user (unsigned integer) * @type {number} - * @memberof RemoveChannelMemberRequest + * @memberof InviteChannelMemberReqBody */ 'fid': number; /** * * @type {ChannelMemberRole} - * @memberof RemoveChannelMemberRequest + * @memberof InviteChannelMemberReqBody */ 'role': ChannelMemberRole; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-req-body.ts similarity index 80% rename from src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-req-body.ts index cd2fbcc4..d0e948f7 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-creation-req-body.ts @@ -20,19 +20,19 @@ import type { NeynarFramePage } from './neynar-frame-page'; /** * * @export - * @interface NeynarFrameCreationRequest + * @interface NeynarFrameCreationReqBody */ -export interface NeynarFrameCreationRequest { +export interface NeynarFrameCreationReqBody { /** * The name of the frame. * @type {string} - * @memberof NeynarFrameCreationRequest + * @memberof NeynarFrameCreationReqBody */ 'name': string; /** * * @type {Array} - * @memberof NeynarFrameCreationRequest + * @memberof NeynarFrameCreationReqBody */ 'pages': Array; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-req-body.ts similarity index 79% rename from src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-req-body.ts index ba6d65e1..0d702aed 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/neynar-frame-update-req-body.ts @@ -20,25 +20,25 @@ import type { NeynarFramePage } from './neynar-frame-page'; /** * * @export - * @interface NeynarFrameUpdateRequest + * @interface NeynarFrameUpdateReqBody */ -export interface NeynarFrameUpdateRequest { +export interface NeynarFrameUpdateReqBody { /** * The UUID of the frame to update. * @type {string} - * @memberof NeynarFrameUpdateRequest + * @memberof NeynarFrameUpdateReqBody */ 'uuid': string; /** * The name of the frame. * @type {string} - * @memberof NeynarFrameUpdateRequest + * @memberof NeynarFrameUpdateReqBody */ 'name'?: string; /** * * @type {Array} - * @memberof NeynarFrameUpdateRequest + * @memberof NeynarFrameUpdateReqBody */ 'pages': Array; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-req-body.ts new file mode 100644 index 00000000..584d4180 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/remove-channel-member-req-body.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import type { ChannelMemberRole } from './channel-member-role'; + +/** + * + * @export + * @interface RemoveChannelMemberReqBody + */ +export interface RemoveChannelMemberReqBody { + /** + * UUID of the signer + * @type {string} + * @memberof RemoveChannelMemberReqBody + */ + 'signer_uuid': string; + /** + * The unique identifier of a farcaster channel + * @type {string} + * @memberof RemoveChannelMemberReqBody + */ + 'channel_id': string; + /** + * The unique identifier of a farcaster user (unsigned integer) + * @type {number} + * @memberof RemoveChannelMemberReqBody + */ + 'fid': number; + /** + * + * @type {ChannelMemberRole} + * @memberof RemoveChannelMemberReqBody + */ + 'role': ChannelMemberRole; +} + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts b/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-req-body.ts similarity index 77% rename from src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-req-body.ts index 233080fa..e2944381 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/respond-channel-invite-req-body.ts @@ -20,31 +20,31 @@ import type { ChannelMemberRole } from './channel-member-role'; /** * * @export - * @interface RespondChannelInviteRequest + * @interface RespondChannelInviteReqBody */ -export interface RespondChannelInviteRequest { +export interface RespondChannelInviteReqBody { /** * UUID of the signer * @type {string} - * @memberof RespondChannelInviteRequest + * @memberof RespondChannelInviteReqBody */ 'signer_uuid': string; /** * The unique identifier of a farcaster channel * @type {string} - * @memberof RespondChannelInviteRequest + * @memberof RespondChannelInviteReqBody */ 'channel_id': string; /** * * @type {ChannelMemberRole} - * @memberof RespondChannelInviteRequest + * @memberof RespondChannelInviteReqBody */ 'role': ChannelMemberRole; /** * Accept or reject the invite * @type {boolean} - * @memberof RespondChannelInviteRequest + * @memberof RespondChannelInviteReqBody */ 'accept': boolean; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-req-body.ts similarity index 80% rename from src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts rename to src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-req-body.ts index cd4504bf..99210026 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-action-req-body.ts @@ -17,37 +17,37 @@ /** * * @export - * @interface ValidateFrameRequest + * @interface ValidateFrameActionReqBody */ -export interface ValidateFrameRequest { +export interface ValidateFrameActionReqBody { /** * Hexadecimal string of message bytes. * @type {string} - * @memberof ValidateFrameRequest + * @memberof ValidateFrameActionReqBody */ 'message_bytes_in_hex': string; /** * Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. * @type {boolean} - * @memberof ValidateFrameRequest + * @memberof ValidateFrameActionReqBody */ 'cast_reaction_context'?: boolean; /** * Adds viewer_context inside the user (interactor) object to indicate whether the interactor follows or is followed by the cast author. * @type {boolean} - * @memberof ValidateFrameRequest + * @memberof ValidateFrameActionReqBody */ 'follow_context'?: boolean; /** * Adds context about the app used by the user inside `frame.action`. * @type {boolean} - * @memberof ValidateFrameRequest + * @memberof ValidateFrameActionReqBody */ 'signer_context'?: boolean; /** * Adds context about the channel that the cast belongs to inside of the cast object. * @type {boolean} - * @memberof ValidateFrameRequest + * @memberof ValidateFrameActionReqBody */ 'channel_follow_context'?: boolean; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts deleted file mode 100644 index e13141df..00000000 --- a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body-all-of.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Farcaster API V2 - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface WebhookPutReqBodyAllOf - */ -export interface WebhookPutReqBodyAllOf { - /** - * - * @type {string} - * @memberof WebhookPutReqBodyAllOf - */ - 'webhook_id': string; -} - diff --git a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts index c00c5045..5ba3a3eb 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/webhook-put-req-body.ts @@ -13,20 +13,39 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import type { WebhookPostReqBody } from './webhook-post-req-body'; -// May contain unused imports in some cases -// @ts-ignore -import type { WebhookPutReqBodyAllOf } from './webhook-put-req-body-all-of'; // May contain unused imports in some cases // @ts-ignore import type { WebhookSubscriptionFilters } from './webhook-subscription-filters'; /** - * @type WebhookPutReqBody + * * @export + * @interface WebhookPutReqBody */ -export type WebhookPutReqBody = WebhookPostReqBody & WebhookPutReqBodyAllOf; - +export interface WebhookPutReqBody { + /** + * + * @type {string} + * @memberof WebhookPutReqBody + */ + 'name': string; + /** + * + * @type {string} + * @memberof WebhookPutReqBody + */ + 'url': string; + /** + * + * @type {WebhookSubscriptionFilters} + * @memberof WebhookPutReqBody + */ + 'subscription'?: WebhookSubscriptionFilters; + /** + * + * @type {string} + * @memberof WebhookPutReqBody + */ + 'webhook_id': string; +} diff --git a/src/neynar-api/v2/openapi-stp/apis/stpapi.ts b/src/neynar-api/v2/openapi-stp/apis/stpapi.ts index de532e53..c8bf69a0 100644 --- a/src/neynar-api/v2/openapi-stp/apis/stpapi.ts +++ b/src/neynar-api/v2/openapi-stp/apis/stpapi.ts @@ -40,13 +40,13 @@ export const STPApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscriptionCheck: async (addresses: string, contractAddress: string, chainId: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchSubscriptionCheck: async (addresses: string, contractAddress: string, chainId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'addresses' is not null or undefined - assertParamExists('subscriptionCheck', 'addresses', addresses) + assertParamExists('fetchSubscriptionCheck', 'addresses', addresses) // verify required parameter 'contractAddress' is not null or undefined - assertParamExists('subscriptionCheck', 'contractAddress', contractAddress) + assertParamExists('fetchSubscriptionCheck', 'contractAddress', contractAddress) // verify required parameter 'chainId' is not null or undefined - assertParamExists('subscriptionCheck', 'chainId', chainId) + assertParamExists('fetchSubscriptionCheck', 'chainId', chainId) const localVarPath = `/stp/subscription_check`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -104,10 +104,10 @@ export const STPApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: SubscriptionStatus; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.subscriptionCheck(addresses, contractAddress, chainId, options); + async fetchSubscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: SubscriptionStatus; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSubscriptionCheck(addresses, contractAddress, chainId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['STPApi.subscriptionCheck']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['STPApi.fetchSubscriptionCheck']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -129,8 +129,8 @@ export const STPApiFactory = function (configuration?: Configuration, basePath?: * @param {*} [options] Override http request option. * @throws {RequiredError} */ - subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: SubscriptionStatus; }> { - return localVarFp.subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(axios, basePath)); + fetchSubscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: SubscriptionStatus; }> { + return localVarFp.fetchSubscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(axios, basePath)); }, }; }; @@ -152,8 +152,8 @@ export class STPApi extends BaseAPI { * @throws {RequiredError} * @memberof STPApi */ - public subscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig) { - return STPApiFp(this.configuration).subscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(this.axios, this.basePath)); + public fetchSubscriptionCheck(addresses: string, contractAddress: string, chainId: string, options?: RawAxiosRequestConfig) { + return STPApiFp(this.configuration).fetchSubscriptionCheck(addresses, contractAddress, chainId, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/oas b/src/oas index 842706f7..e62e1805 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit 842706f778e192a45cf1bfeb64a04e67f384dde2 +Subproject commit e62e180545659202c372bd658d87d860ac7fb942