From 370529de44b0861d87e222f68506e1cc3e037045 Mon Sep 17 00:00:00 2001 From: Shreyaschorge <37466979+Shreyaschorge@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:00:09 +0530 Subject: [PATCH] Allow users to add global headers (#235) * Generate code * Accept global headers * Minor update: v1.70.0 --- package.json | 2 +- src/neynar-api/common/version.ts | 2 +- src/neynar-api/neynar-api-client.ts | 17 +- src/neynar-api/v2/client.ts | 3 + .../.openapi-generator/FILES | 1 + .../v2/openapi-farcaster/apis/ban-api.ts | 27 +- .../v2/openapi-farcaster/apis/block-api.ts | 27 +- .../v2/openapi-farcaster/apis/channel-api.ts | 81 ++++-- .../v2/openapi-farcaster/apis/follows-api.ts | 108 ++++++-- .../v2/openapi-farcaster/apis/mute-api.ts | 27 +- .../v2/openapi-farcaster/apis/user-api.ts | 248 ++++++++++++++---- .../models/channel-member-user.ts | 3 + .../v2/openapi-farcaster/models/index.ts | 1 + .../openapi-farcaster/models/searched-user.ts | 9 + .../models/user-experimental.ts | 30 +++ .../v2/openapi-farcaster/models/user.ts | 9 + src/oas | 2 +- 17 files changed, 495 insertions(+), 102 deletions(-) create mode 100644 src/neynar-api/v2/openapi-farcaster/models/user-experimental.ts diff --git a/package.json b/package.json index 91672f8..ac85e16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/nodejs-sdk", - "version": "1.69.1", + "version": "1.70.0", "description": "SDK to interact with Neynar APIs (https://docs.neynar.com/)", "main": "./build/index.js", "types": "./build/index.d.ts", diff --git a/src/neynar-api/common/version.ts b/src/neynar-api/common/version.ts index 5c354ec..28fcf04 100644 --- a/src/neynar-api/common/version.ts +++ b/src/neynar-api/common/version.ts @@ -1 +1 @@ -export const version = "1.69.1"; \ No newline at end of file +export const version = "1.70.0"; \ No newline at end of file diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index 314ebfb..e506489 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -137,10 +137,12 @@ export class NeynarAPIClient { constructor( apiKey: string, { + baseOptions, basePath, logger = silentLogger, axiosInstance, }: { + baseOptions?: any; basePath?: string; logger?: Logger; axiosInstance?: AxiosInstance; @@ -155,8 +157,17 @@ export class NeynarAPIClient { } this.clients = { - v1: new NeynarV1APIClient(apiKey, { basePath, logger, axiosInstance }), - v2: new NeynarV2APIClient(apiKey, { basePath, logger, axiosInstance }), + v1: new NeynarV1APIClient(apiKey, { + basePath, + logger, + axiosInstance, + }), + v2: new NeynarV2APIClient(apiKey, { + baseOptions, + basePath, + logger, + axiosInstance, + }), }; } @@ -2943,7 +2954,7 @@ export class NeynarAPIClient { fid: number, options?: { viewerFid?: number; - sortType: FollowSortType; + sortType?: FollowSortType; cursor?: string; limit?: number; } diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index f47eedb..9e14bbd 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -159,10 +159,12 @@ export class NeynarV2APIClient { constructor( apiKey: string, { + baseOptions, basePath, logger = silentLogger, axiosInstance, }: { + baseOptions?: any; basePath?: string; logger?: Logger; axiosInstance?: AxiosInstance; @@ -204,6 +206,7 @@ export class NeynarV2APIClient { axiosInstance.defaults.headers["x-sdk-version"] = version; const config: Configuration = new Configuration({ + baseOptions: baseOptions, basePath: basePath ? `${basePath}/v2` : BASE_PATH, apiKey: apiKey, }); diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 2330c68..191b618 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -237,6 +237,7 @@ models/trending-channel-response.ts models/update-user-req-body-location.ts models/update-user-req-body.ts models/user-dehydrated.ts +models/user-experimental.ts models/user-fidresponse.ts models/user-power-lite-response-result.ts models/user-power-lite-response.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 1ee8ec4..e8c6e6d 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/ban-api.ts @@ -83,6 +83,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) * @summary Banned FIDs of app * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BanListResponse` object @@ -90,7 +91,7 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list) * */ - fetchBanList: async (limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchBanList: async (limit?: number, cursor?: string, x_neynar_experimental?: boolean, 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); @@ -114,6 +115,12 @@ export const BanApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -200,6 +207,7 @@ export const BanApiFp = function(configuration?: Configuration) { * @summary Banned FIDs of app * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BanListResponse` object @@ -207,8 +215,8 @@ export const BanApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list) * */ - async fetchBanList(limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBanList(limit, cursor, options); + async fetchBanList(limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBanList(limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BanApi.fetchBanList']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -266,7 +274,7 @@ export const BanApiFactory = function (configuration?: Configuration, basePath?: * */ fetchBanList(requestParameters: BanApiFetchBanListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchBanList(requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchBanList(requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds. @@ -374,6 +382,15 @@ export interface BanApiFetchBanListRequest { * @memberof BanApiFetchBanList */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof BanApiFetchBanList + */ + readonly x_neynar_experimental?: boolean } /** @@ -428,7 +445,7 @@ export class BanApi extends BaseAPI implements BanApiInterface { * */ public fetchBanList(requestParameters: BanApiFetchBanListRequest = {}, options?: RawAxiosRequestConfig) { - return BanApiFp(this.configuration).fetchBanList(requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return BanApiFp(this.configuration).fetchBanList(requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts index d9ed947..5ed9c47 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/block-api.ts @@ -85,6 +85,7 @@ export const BlockApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [blocked_fid] Providing this will return the users that have blocked this user * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BlockListResponse` object @@ -92,7 +93,7 @@ export const BlockApiAxiosParamCreator = function (configuration?: Configuration * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ - fetchBlockList: async (blocker_fid?: number, blocked_fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchBlockList: async (blocker_fid?: number, blocked_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/farcaster/block/list`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -124,6 +125,12 @@ export const BlockApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -212,6 +219,7 @@ export const BlockApiFp = function(configuration?: Configuration) { * @param {number} [blocked_fid] Providing this will return the users that have blocked this user * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BlockListResponse` object @@ -219,8 +227,8 @@ export const BlockApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ - async fetchBlockList(blocker_fid?: number, blocked_fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBlockList(blocker_fid, blocked_fid, limit, cursor, options); + async fetchBlockList(blocker_fid?: number, blocked_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBlockList(blocker_fid, blocked_fid, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BlockApi.fetchBlockList']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -278,7 +286,7 @@ export const BlockApiFactory = function (configuration?: Configuration, basePath * */ fetchBlockList(requestParameters: BlockApiFetchBlockListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchBlockList(requestParameters.blocker_fid, requestParameters.blocked_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchBlockList(requestParameters.blocker_fid, requestParameters.blocked_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Adds a block for a given FID. @@ -404,6 +412,15 @@ export interface BlockApiFetchBlockListRequest { * @memberof BlockApiFetchBlockList */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof BlockApiFetchBlockList + */ + readonly x_neynar_experimental?: boolean } /** @@ -458,7 +475,7 @@ export class BlockApi extends BaseAPI implements BlockApiInterface { * */ public fetchBlockList(requestParameters: BlockApiFetchBlockListRequest = {}, options?: RawAxiosRequestConfig) { - return BlockApiFp(this.configuration).fetchBlockList(requestParameters.blocker_fid, requestParameters.blocked_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return BlockApiFp(this.configuration).fetchBlockList(requestParameters.blocker_fid, requestParameters.blocked_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** 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 6149465..46edac3 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts @@ -226,6 +226,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * @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 (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `ChannelMemberListResponse` object @@ -233,7 +234,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-channel-members) * */ - fetchChannelMembers: async (channel_id: string, fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchChannelMembers: async (channel_id: string, fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'channel_id' is not null or undefined assertParamExists('fetchChannelMembers', 'channel_id', channel_id) const localVarPath = `/farcaster/channel/member/list`; @@ -267,6 +268,12 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -285,6 +292,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * @param {number} [viewer_fid] 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 (Default: 25, Maximum: 1000) + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -292,7 +300,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-followers-for-a-channel) * */ - fetchFollowersForAChannel: async (id: string, viewer_fid?: number, cursor?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchFollowersForAChannel: async (id: string, viewer_fid?: number, cursor?: string, limit?: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('fetchFollowersForAChannel', 'id', id) const localVarPath = `/farcaster/channel/followers`; @@ -326,6 +334,12 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['limit'] = limit; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -342,6 +356,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * @summary Relevant followers * @param {string} id Channel ID being queried * @param {number} viewer_fid 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 {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object @@ -349,7 +364,7 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers-for-a-channel) * */ - fetchRelevantFollowersForAChannel: async (id: string, viewer_fid: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchRelevantFollowersForAChannel: async (id: string, viewer_fid: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('fetchRelevantFollowersForAChannel', 'id', id) // verify required parameter 'viewer_fid' is not null or undefined @@ -377,6 +392,12 @@ export const ChannelApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['viewer_fid'] = viewer_fid; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -999,6 +1020,7 @@ export const ChannelApiFp = function(configuration?: Configuration) { * @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 (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `ChannelMemberListResponse` object @@ -1006,8 +1028,8 @@ export const ChannelApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-channel-members) * */ - async fetchChannelMembers(channel_id: string, fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchChannelMembers(channel_id, fid, limit, cursor, options); + async fetchChannelMembers(channel_id: string, fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchChannelMembers(channel_id, fid, limit, cursor, x_neynar_experimental, 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); @@ -1019,6 +1041,7 @@ export const ChannelApiFp = function(configuration?: Configuration) { * @param {number} [viewer_fid] 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 (Default: 25, Maximum: 1000) + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -1026,8 +1049,8 @@ export const ChannelApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-followers-for-a-channel) * */ - async fetchFollowersForAChannel(id: string, viewer_fid?: number, cursor?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowersForAChannel(id, viewer_fid, cursor, limit, options); + async fetchFollowersForAChannel(id: string, viewer_fid?: number, cursor?: string, limit?: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowersForAChannel(id, viewer_fid, cursor, limit, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchFollowersForAChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -1037,6 +1060,7 @@ export const ChannelApiFp = function(configuration?: Configuration) { * @summary Relevant followers * @param {string} id Channel ID being queried * @param {number} viewer_fid 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 {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object @@ -1044,8 +1068,8 @@ export const ChannelApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers-for-a-channel) * */ - async fetchRelevantFollowersForAChannel(id: string, viewer_fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowersForAChannel(id, viewer_fid, options); + async fetchRelevantFollowersForAChannel(id: string, viewer_fid: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowersForAChannel(id, viewer_fid, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ChannelApi.fetchRelevantFollowersForAChannel']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -1313,7 +1337,7 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa * */ fetchChannelMembers(requestParameters: ChannelApiFetchChannelMembersRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchChannelMembers(requestParameters.channel_id, requestParameters.fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchChannelMembers(requestParameters.channel_id, requestParameters.fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Returns a list of followers for a specific channel. Max limit is 1000. Use cursor for pagination. @@ -1327,7 +1351,7 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa * */ fetchFollowersForAChannel(requestParameters: ChannelApiFetchFollowersForAChannelRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(axios, basePath)); + return localVarFp.fetchFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.cursor, requestParameters.limit, requestParameters.x_neynar_experimental, 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\". @@ -1341,7 +1365,7 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa * */ fetchRelevantFollowersForAChannel(requestParameters: ChannelApiFetchRelevantFollowersForAChannelRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchRelevantFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, options).then((request) => request(axios, basePath)); + return localVarFp.fetchRelevantFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Returns a list of trending channels based on activity @@ -1889,6 +1913,15 @@ export interface ChannelApiFetchChannelMembersRequest { * @memberof ChannelApiFetchChannelMembers */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof ChannelApiFetchChannelMembers + */ + readonly x_neynar_experimental?: boolean } /** @@ -1932,6 +1965,15 @@ export interface ChannelApiFetchFollowersForAChannelRequest { * @memberof ChannelApiFetchFollowersForAChannel */ readonly limit?: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof ChannelApiFetchFollowersForAChannel + */ + readonly x_neynar_experimental?: boolean } /** @@ -1957,6 +1999,15 @@ export interface ChannelApiFetchRelevantFollowersForAChannelRequest { * @memberof ChannelApiFetchRelevantFollowersForAChannel */ readonly viewer_fid: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof ChannelApiFetchRelevantFollowersForAChannel + */ + readonly x_neynar_experimental?: boolean } /** @@ -2311,7 +2362,7 @@ export class ChannelApi extends BaseAPI implements ChannelApiInterface { * */ public fetchChannelMembers(requestParameters: ChannelApiFetchChannelMembersRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).fetchChannelMembers(requestParameters.channel_id, requestParameters.fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return ChannelApiFp(this.configuration).fetchChannelMembers(requestParameters.channel_id, requestParameters.fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2327,7 +2378,7 @@ export class ChannelApi extends BaseAPI implements ChannelApiInterface { * */ public fetchFollowersForAChannel(requestParameters: ChannelApiFetchFollowersForAChannelRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).fetchFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(this.axios, this.basePath)); + return ChannelApiFp(this.configuration).fetchFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.cursor, requestParameters.limit, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2343,7 +2394,7 @@ export class ChannelApi extends BaseAPI implements ChannelApiInterface { * */ public fetchRelevantFollowersForAChannel(requestParameters: ChannelApiFetchRelevantFollowersForAChannelRequest, options?: RawAxiosRequestConfig) { - return ChannelApiFp(this.configuration).fetchRelevantFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, options).then((request) => request(this.axios, this.basePath)); + return ChannelApiFp(this.configuration).fetchRelevantFollowersForAChannel(requestParameters.id, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, 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 79796a4..44575ad 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/follows-api.ts @@ -43,6 +43,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewer_fid] 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, Maximum: 100) + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -50,7 +51,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-follow-suggestions) * */ - fetchFollowSuggestions: async (fid: number, viewer_fid?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchFollowSuggestions: async (fid: number, viewer_fid?: number, limit?: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined assertParamExists('fetchFollowSuggestions', 'fid', fid) const localVarPath = `/farcaster/following/suggested`; @@ -80,6 +81,12 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['limit'] = limit; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -96,6 +103,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * @summary Relevant followers * @param {number} target_fid User who\'s profile you are looking at * @param {number} viewer_fid 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 {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object @@ -103,7 +111,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers) * */ - fetchRelevantFollowers: async (target_fid: number, viewer_fid: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchRelevantFollowers: async (target_fid: number, viewer_fid: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'target_fid' is not null or undefined assertParamExists('fetchRelevantFollowers', 'target_fid', target_fid) // verify required parameter 'viewer_fid' is not null or undefined @@ -131,6 +139,12 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['viewer_fid'] = viewer_fid; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -150,6 +164,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * @param {FollowSortType} [sort_type] Sort type for fetch followers. Default is `desc_chron` * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `FollowersResponse` object @@ -157,7 +172,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers) * */ - fetchUserFollowers: async (fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchUserFollowers: async (fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined assertParamExists('fetchUserFollowers', 'fid', fid) const localVarPath = `/farcaster/followers`; @@ -195,6 +210,12 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -214,6 +235,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * @param {FollowSortType} [sort_type] Optional parameter to sort the users based on different criteria. * @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `FollowersResponse` object @@ -221,7 +243,7 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following) * */ - fetchUserFollowing: async (fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchUserFollowing: async (fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined assertParamExists('fetchUserFollowing', 'fid', fid) const localVarPath = `/farcaster/following`; @@ -259,6 +281,12 @@ export const FollowsApiAxiosParamCreator = function (configuration?: Configurati localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -286,6 +314,7 @@ export const FollowsApiFp = function(configuration?: Configuration) { * @param {number} fid FID of the user whose following you want to fetch. * @param {number} [viewer_fid] 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, Maximum: 100) + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -293,8 +322,8 @@ export const FollowsApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-follow-suggestions) * */ - async fetchFollowSuggestions(fid: number, viewer_fid?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowSuggestions(fid, viewer_fid, limit, options); + async fetchFollowSuggestions(fid: number, viewer_fid?: number, limit?: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchFollowSuggestions(fid, viewer_fid, limit, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchFollowSuggestions']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -304,6 +333,7 @@ export const FollowsApiFp = function(configuration?: Configuration) { * @summary Relevant followers * @param {number} target_fid User who\'s profile you are looking at * @param {number} viewer_fid 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 {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `RelevantFollowersResponse` object @@ -311,8 +341,8 @@ export const FollowsApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-followers) * */ - async fetchRelevantFollowers(target_fid: number, viewer_fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowers(target_fid, viewer_fid, options); + async fetchRelevantFollowers(target_fid: number, viewer_fid: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchRelevantFollowers(target_fid, viewer_fid, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchRelevantFollowers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -325,6 +355,7 @@ export const FollowsApiFp = function(configuration?: Configuration) { * @param {FollowSortType} [sort_type] Sort type for fetch followers. Default is `desc_chron` * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `FollowersResponse` object @@ -332,8 +363,8 @@ export const FollowsApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers) * */ - async fetchUserFollowers(fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowers(fid, viewer_fid, sort_type, limit, cursor, options); + async fetchUserFollowers(fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowers(fid, viewer_fid, sort_type, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchUserFollowers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -346,6 +377,7 @@ export const FollowsApiFp = function(configuration?: Configuration) { * @param {FollowSortType} [sort_type] Optional parameter to sort the users based on different criteria. * @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `FollowersResponse` object @@ -353,8 +385,8 @@ export const FollowsApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following) * */ - async fetchUserFollowing(fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowing(fid, viewer_fid, sort_type, limit, cursor, options); + async fetchUserFollowing(fid: number, viewer_fid?: number, sort_type?: FollowSortType, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserFollowing(fid, viewer_fid, sort_type, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['FollowsApi.fetchUserFollowing']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -381,7 +413,7 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa * */ fetchFollowSuggestions(requestParameters: FollowsApiFetchFollowSuggestionsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchFollowSuggestions(requestParameters.fid, requestParameters.viewer_fid, requestParameters.limit, options).then((request) => request(axios, basePath)); + return localVarFp.fetchFollowSuggestions(requestParameters.fid, requestParameters.viewer_fid, requestParameters.limit, requestParameters.x_neynar_experimental, 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\". @@ -395,7 +427,7 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa * */ fetchRelevantFollowers(requestParameters: FollowsApiFetchRelevantFollowersRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchRelevantFollowers(requestParameters.target_fid, requestParameters.viewer_fid, options).then((request) => request(axios, basePath)); + return localVarFp.fetchRelevantFollowers(requestParameters.target_fid, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Returns a list of followers for a specific FID. @@ -409,7 +441,7 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa * */ fetchUserFollowers(requestParameters: FollowsApiFetchUserFollowersRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchUserFollowers(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchUserFollowers(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Fetch a list of users followed by a user. Can optionally include a viewer_fid and sort_type. @@ -423,7 +455,7 @@ export const FollowsApiFactory = function (configuration?: Configuration, basePa * */ fetchUserFollowing(requestParameters: FollowsApiFetchUserFollowingRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchUserFollowing(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchUserFollowing(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, }; }; @@ -524,6 +556,15 @@ export interface FollowsApiFetchFollowSuggestionsRequest { * @memberof FollowsApiFetchFollowSuggestions */ readonly limit?: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof FollowsApiFetchFollowSuggestions + */ + readonly x_neynar_experimental?: boolean } /** @@ -549,6 +590,15 @@ export interface FollowsApiFetchRelevantFollowersRequest { * @memberof FollowsApiFetchRelevantFollowers */ readonly viewer_fid: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof FollowsApiFetchRelevantFollowers + */ + readonly x_neynar_experimental?: boolean } /** @@ -601,6 +651,15 @@ export interface FollowsApiFetchUserFollowersRequest { * @memberof FollowsApiFetchUserFollowers */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof FollowsApiFetchUserFollowers + */ + readonly x_neynar_experimental?: boolean } /** @@ -653,6 +712,15 @@ export interface FollowsApiFetchUserFollowingRequest { * @memberof FollowsApiFetchUserFollowing */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof FollowsApiFetchUserFollowing + */ + readonly x_neynar_experimental?: boolean } /** @@ -675,7 +743,7 @@ export class FollowsApi extends BaseAPI implements FollowsApiInterface { * */ public fetchFollowSuggestions(requestParameters: FollowsApiFetchFollowSuggestionsRequest, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).fetchFollowSuggestions(requestParameters.fid, requestParameters.viewer_fid, requestParameters.limit, options).then((request) => request(this.axios, this.basePath)); + return FollowsApiFp(this.configuration).fetchFollowSuggestions(requestParameters.fid, requestParameters.viewer_fid, requestParameters.limit, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -691,7 +759,7 @@ export class FollowsApi extends BaseAPI implements FollowsApiInterface { * */ public fetchRelevantFollowers(requestParameters: FollowsApiFetchRelevantFollowersRequest, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).fetchRelevantFollowers(requestParameters.target_fid, requestParameters.viewer_fid, options).then((request) => request(this.axios, this.basePath)); + return FollowsApiFp(this.configuration).fetchRelevantFollowers(requestParameters.target_fid, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -707,7 +775,7 @@ export class FollowsApi extends BaseAPI implements FollowsApiInterface { * */ public fetchUserFollowers(requestParameters: FollowsApiFetchUserFollowersRequest, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).fetchUserFollowers(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return FollowsApiFp(this.configuration).fetchUserFollowers(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -723,7 +791,7 @@ export class FollowsApi extends BaseAPI implements FollowsApiInterface { * */ public fetchUserFollowing(requestParameters: FollowsApiFetchUserFollowingRequest, options?: RawAxiosRequestConfig) { - return FollowsApiFp(this.configuration).fetchUserFollowing(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return FollowsApiFp(this.configuration).fetchUserFollowing(requestParameters.fid, requestParameters.viewer_fid, requestParameters.sort_type, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } } 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 8c7e4b3..5332813 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/mute-api.ts @@ -84,6 +84,7 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} fid The user\'s FID (identifier) * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `MuteListResponse` object @@ -91,7 +92,7 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ - fetchMuteList: async (fid: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchMuteList: async (fid: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fid' is not null or undefined assertParamExists('fetchMuteList', 'fid', fid) const localVarPath = `/farcaster/mute/list`; @@ -121,6 +122,12 @@ export const MuteApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -208,6 +215,7 @@ export const MuteApiFp = function(configuration?: Configuration) { * @param {number} fid The user\'s FID (identifier) * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `MuteListResponse` object @@ -215,8 +223,8 @@ export const MuteApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ - 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); + async fetchMuteList(fid: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchMuteList(fid, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['MuteApi.fetchMuteList']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -274,7 +282,7 @@ export const MuteApiFactory = function (configuration?: Configuration, basePath? * */ fetchMuteList(requestParameters: MuteApiFetchMuteListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchMuteList(requestParameters.fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchMuteList(requestParameters.fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Adds a mute for a given FID. This is a whitelisted API, reach out if you want access. @@ -391,6 +399,15 @@ export interface MuteApiFetchMuteListRequest { * @memberof MuteApiFetchMuteList */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof MuteApiFetchMuteList + */ + readonly x_neynar_experimental?: boolean } /** @@ -445,7 +462,7 @@ export class MuteApi extends BaseAPI implements MuteApiInterface { * */ public fetchMuteList(requestParameters: MuteApiFetchMuteListRequest, options?: RawAxiosRequestConfig) { - return MuteApiFp(this.configuration).fetchMuteList(requestParameters.fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return MuteApiFp(this.configuration).fetchMuteList(requestParameters.fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, 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 47d9298..d82cb1f 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -109,6 +109,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @summary By FIDs * @param {string} fids Comma separated list of FIDs, up to 100 at a time * @param {number} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BulkUsersResponse` object @@ -116,7 +117,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users) * */ - fetchBulkUsers: async (fids: string, viewer_fid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchBulkUsers: async (fids: string, viewer_fid?: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fids' is not null or undefined assertParamExists('fetchBulkUsers', 'fids', fids) const localVarPath = `/farcaster/user/bulk`; @@ -142,6 +143,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewer_fid; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -159,6 +166,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time * @param {string} [address_types] 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} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BulkUsersByAddressResponse` object @@ -166,7 +174,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users-by-ethereum-address) * */ - fetchBulkUsersByEthereumAddress: async (addresses: string, address_types?: string, viewer_fid?: number, options: RawAxiosRequestConfig = {}): Promise => { + fetchBulkUsersByEthereumAddress: async (addresses: string, address_types?: string, viewer_fid?: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'addresses' is not null or undefined assertParamExists('fetchBulkUsersByEthereumAddress', 'addresses', addresses) const localVarPath = `/farcaster/user/bulk-by-address`; @@ -196,6 +204,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewer_fid; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -213,6 +227,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} [viewer_fid] * @param {number} [limit] Number of power users to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -220,7 +235,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users) * */ - fetchPowerUsers: async (viewer_fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchPowerUsers: async (viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, 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); @@ -248,6 +263,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -262,6 +283,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) /** * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. * @summary Power user FIDs + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserPowerLiteResponse` object @@ -269,7 +291,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users-lite) * */ - fetchPowerUsersLite: async (options: RawAxiosRequestConfig = {}): Promise => { + fetchPowerUsersLite: async (x_neynar_experimental?: boolean, 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); @@ -285,6 +307,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -304,6 +332,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} [viewer_fid] FID of the user viewing the feed. Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -311,7 +340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-users-by-location) * */ - fetchUsersByLocation: async (latitude: number, longitude: number, viewer_fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + fetchUsersByLocation: async (latitude: number, longitude: number, viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'latitude' is not null or undefined assertParamExists('fetchUsersByLocation', 'latitude', latitude) // verify required parameter 'longitude' is not null or undefined @@ -351,6 +380,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -408,6 +443,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) * @summary Fetch fresh FID + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserFIDResponse` object @@ -415,7 +451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ - getFreshAccountFID: async (options: RawAxiosRequestConfig = {}): Promise => { + getFreshAccountFID: async (x_neynar_experimental?: boolean, 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); @@ -431,6 +467,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // authentication ApiKeyAuth required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -491,6 +533,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @summary By username * @param {string} username Username of the user to fetch * @param {number} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserResponse` object @@ -498,7 +541,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-by-username) * */ - lookupUserByUsername: async (username: string, viewer_fid?: number, options: RawAxiosRequestConfig = {}): Promise => { + lookupUserByUsername: async (username: string, viewer_fid?: number, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('lookupUserByUsername', 'username', username) const localVarPath = `/farcaster/user/by_username`; @@ -524,6 +567,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewer_fid; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -628,6 +677,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {number} [viewer_fid] 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 (Default: 5, Maximum: 10) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserSearchResponse` object @@ -635,7 +685,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-user) * */ - searchUser: async (q: string, viewer_fid?: number, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise => { + searchUser: async (q: string, viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'q' is not null or undefined assertParamExists('searchUser', 'q', q) const localVarPath = `/farcaster/user/search`; @@ -669,6 +719,12 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['cursor'] = cursor; } + if (x_neynar_experimental != null) { + localVarHeaderParameter['x-neynar-experimental'] = typeof x_neynar_experimental === 'string' + ? x_neynar_experimental + : JSON.stringify(x_neynar_experimental); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -798,6 +854,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @summary By FIDs * @param {string} fids Comma separated list of FIDs, up to 100 at a time * @param {number} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BulkUsersResponse` object @@ -805,8 +862,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users) * */ - async fetchBulkUsers(fids: string, viewer_fid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsers(fids, viewer_fid, options); + async fetchBulkUsers(fids: string, viewer_fid?: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsers(fids, viewer_fid, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.fetchBulkUsers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -817,6 +874,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {string} addresses Comma separated list of Ethereum addresses, up to 350 at a time * @param {string} [address_types] 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} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `BulkUsersByAddressResponse` object @@ -824,8 +882,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-bulk-users-by-ethereum-address) * */ - async fetchBulkUsersByEthereumAddress(addresses: string, address_types?: string, viewer_fid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsersByEthereumAddress(addresses, address_types, viewer_fid, options); + async fetchBulkUsersByEthereumAddress(addresses: string, address_types?: string, viewer_fid?: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchBulkUsersByEthereumAddress(addresses, address_types, viewer_fid, x_neynar_experimental, 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); @@ -836,6 +894,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {number} [viewer_fid] * @param {number} [limit] Number of power users to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -843,8 +902,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users) * */ - async fetchPowerUsers(viewer_fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsers(viewer_fid, limit, cursor, options); + async fetchPowerUsers(viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsers(viewer_fid, limit, cursor, x_neynar_experimental, 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); @@ -852,6 +911,7 @@ export const UserApiFp = function(configuration?: Configuration) { /** * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. * @summary Power user FIDs + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserPowerLiteResponse` object @@ -859,8 +919,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users-lite) * */ - async fetchPowerUsersLite(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsersLite(options); + async fetchPowerUsersLite(x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPowerUsersLite(x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.fetchPowerUsersLite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -873,6 +933,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {number} [viewer_fid] FID of the user viewing the feed. Providing this will return a list of users that respects this user\'s mutes and blocks and includes `viewer_context`. * @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100) * @param {string} [cursor] Pagination cursor + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UsersResponse` object @@ -880,8 +941,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-users-by-location) * */ - async fetchUsersByLocation(latitude: number, longitude: number, viewer_fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUsersByLocation(latitude, longitude, viewer_fid, limit, cursor, options); + async fetchUsersByLocation(latitude: number, longitude: number, viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUsersByLocation(latitude, longitude, viewer_fid, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.fetchUsersByLocation']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -906,6 +967,7 @@ export const UserApiFp = function(configuration?: Configuration) { /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) * @summary Fetch fresh FID + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserFIDResponse` object @@ -913,8 +975,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ - async getFreshAccountFID(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshAccountFID(options); + async getFreshAccountFID(x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFreshAccountFID(x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.getFreshAccountFID']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -941,6 +1003,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @summary By username * @param {string} username Username of the user to fetch * @param {number} [viewer_fid] + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserResponse` object @@ -948,8 +1011,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-by-username) * */ - async lookupUserByUsername(username: string, viewer_fid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserByUsername(username, viewer_fid, options); + async lookupUserByUsername(username: string, viewer_fid?: number, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.lookupUserByUsername(username, viewer_fid, x_neynar_experimental, 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); @@ -995,6 +1058,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {number} [viewer_fid] 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 (Default: 5, Maximum: 10) * @param {string} [cursor] Pagination cursor. + * @param {boolean} [x_neynar_experimental] Enables experimental features * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserSearchResponse` object @@ -1002,8 +1066,8 @@ export const UserApiFp = function(configuration?: Configuration) { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-user) * */ - async searchUser(q: string, viewer_fid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.searchUser(q, viewer_fid, limit, cursor, options); + async searchUser(q: string, viewer_fid?: number, limit?: number, cursor?: string, x_neynar_experimental?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchUser(q, viewer_fid, limit, cursor, x_neynar_experimental, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.searchUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -1078,7 +1142,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ fetchBulkUsers(requestParameters: UserApiFetchBulkUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchBulkUsers(requestParameters.fids, requestParameters.viewer_fid, options).then((request) => request(axios, basePath)); + return localVarFp.fetchBulkUsers(requestParameters.fids, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, 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. @@ -1092,7 +1156,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ fetchBulkUsersByEthereumAddress(requestParameters: UserApiFetchBulkUsersByEthereumAddressRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchBulkUsersByEthereumAddress(requestParameters.addresses, requestParameters.address_types, requestParameters.viewer_fid, options).then((request) => request(axios, basePath)); + return localVarFp.fetchBulkUsersByEthereumAddress(requestParameters.addresses, requestParameters.address_types, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Fetches power users based on Warpcast power badges. Information is updated once a day. @@ -1106,11 +1170,12 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ fetchPowerUsers(requestParameters: UserApiFetchPowerUsersRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchPowerUsers(requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchPowerUsers(requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, 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 {UserApiFetchPowerUsersLiteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserPowerLiteResponse` object @@ -1118,8 +1183,8 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users-lite) * */ - fetchPowerUsersLite(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchPowerUsersLite(options).then((request) => request(axios, basePath)); + fetchPowerUsersLite(requestParameters: UserApiFetchPowerUsersLiteRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.fetchPowerUsersLite(requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Fetches a list of users given a location @@ -1133,7 +1198,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ fetchUsersByLocation(requestParameters: UserApiFetchUsersByLocationRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.fetchUsersByLocation(requestParameters.latitude, requestParameters.longitude, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.fetchUsersByLocation(requestParameters.latitude, requestParameters.longitude, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Follow a user \\ (In order to follow a user `signer_uuid` must be approved) @@ -1152,6 +1217,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) * @summary Fetch fresh FID + * @param {UserApiGetFreshAccountFIDRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise} A promise that resolves to a `UserFIDResponse` object @@ -1159,8 +1225,8 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ - getFreshAccountFID(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getFreshAccountFID(options).then((request) => request(axios, basePath)); + getFreshAccountFID(requestParameters: UserApiGetFreshAccountFIDRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getFreshAccountFID(requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Lookup a user by custody-address @@ -1188,7 +1254,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ lookupUserByUsername(requestParameters: UserApiLookupUserByUsernameRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.lookupUserByUsername(requestParameters.username, requestParameters.viewer_fid, options).then((request) => request(axios, basePath)); + return localVarFp.lookupUserByUsername(requestParameters.username, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, 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) @@ -1230,7 +1296,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * */ searchUser(requestParameters: UserApiSearchUserRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.searchUser(requestParameters.q, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(axios, basePath)); + return localVarFp.searchUser(requestParameters.q, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(axios, basePath)); }, /** * Unfollow a user \\ (In order to unfollow a user `signer_uuid` must be approved) @@ -1328,6 +1394,7 @@ export interface UserApiInterface { /** * Fetches power users and respond in a backwards compatible format to Warpcast\'s deprecated power badge endpoint. * @summary Power user FIDs + * @param {UserApiFetchPowerUsersLiteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApiInterface @@ -1336,7 +1403,7 @@ export interface UserApiInterface { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users-lite) * */ - fetchPowerUsersLite(options?: RawAxiosRequestConfig): AxiosPromise; + fetchPowerUsersLite(requestParameters?: UserApiFetchPowerUsersLiteRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Fetches a list of users given a location @@ -1369,6 +1436,7 @@ export interface UserApiInterface { /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) * @summary Fetch fresh FID + * @param {UserApiGetFreshAccountFIDRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApiInterface @@ -1377,7 +1445,7 @@ export interface UserApiInterface { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ - getFreshAccountFID(options?: RawAxiosRequestConfig): AxiosPromise; + getFreshAccountFID(requestParameters?: UserApiGetFreshAccountFIDRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Lookup a user by custody-address @@ -1518,6 +1586,15 @@ export interface UserApiFetchBulkUsersRequest { * @memberof UserApiFetchBulkUsers */ readonly viewer_fid?: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiFetchBulkUsers + */ + readonly x_neynar_experimental?: boolean } /** @@ -1552,6 +1629,15 @@ export interface UserApiFetchBulkUsersByEthereumAddressRequest { * @memberof UserApiFetchBulkUsersByEthereumAddress */ readonly viewer_fid?: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiFetchBulkUsersByEthereumAddress + */ + readonly x_neynar_experimental?: boolean } /** @@ -1586,6 +1672,31 @@ export interface UserApiFetchPowerUsersRequest { * @memberof UserApiFetchPowerUsers */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiFetchPowerUsers + */ + readonly x_neynar_experimental?: boolean +} + +/** + * Request parameters for fetchPowerUsersLite operation in UserApi. + * @export + * @interface UserApiFetchPowerUsersLiteRequest + */ +export interface UserApiFetchPowerUsersLiteRequest { + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiFetchPowerUsersLite + */ + readonly x_neynar_experimental?: boolean } /** @@ -1638,6 +1749,15 @@ export interface UserApiFetchUsersByLocationRequest { * @memberof UserApiFetchUsersByLocation */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiFetchUsersByLocation + */ + readonly x_neynar_experimental?: boolean } /** @@ -1656,6 +1776,22 @@ export interface UserApiFollowUserRequest { readonly follow_req_body: FollowReqBody } +/** + * Request parameters for getFreshAccountFID operation in UserApi. + * @export + * @interface UserApiGetFreshAccountFIDRequest + */ +export interface UserApiGetFreshAccountFIDRequest { + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiGetFreshAccountFID + */ + readonly x_neynar_experimental?: boolean +} + /** * Request parameters for lookupUserByCustodyAddress operation in UserApi. * @export @@ -1695,6 +1831,15 @@ export interface UserApiLookupUserByUsernameRequest { * @memberof UserApiLookupUserByUsername */ readonly viewer_fid?: number + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiLookupUserByUsername + */ + readonly x_neynar_experimental?: boolean } /** @@ -1770,6 +1915,15 @@ export interface UserApiSearchUserRequest { * @memberof UserApiSearchUser */ readonly cursor?: string + + /** + * Enables experimental features + * + * + * @type {boolean} + * @memberof UserApiSearchUser + */ + readonly x_neynar_experimental?: boolean } /** @@ -1840,7 +1994,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public fetchBulkUsers(requestParameters: UserApiFetchBulkUsersRequest, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).fetchBulkUsers(requestParameters.fids, requestParameters.viewer_fid, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).fetchBulkUsers(requestParameters.fids, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1856,7 +2010,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public fetchBulkUsersByEthereumAddress(requestParameters: UserApiFetchBulkUsersByEthereumAddressRequest, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).fetchBulkUsersByEthereumAddress(requestParameters.addresses, requestParameters.address_types, requestParameters.viewer_fid, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).fetchBulkUsersByEthereumAddress(requestParameters.addresses, requestParameters.address_types, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1872,12 +2026,13 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public fetchPowerUsers(requestParameters: UserApiFetchPowerUsersRequest = {}, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).fetchPowerUsers(requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).fetchPowerUsers(requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, 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 {UserApiFetchPowerUsersLiteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi @@ -1886,8 +2041,8 @@ export class UserApi extends BaseAPI implements UserApiInterface { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-power-users-lite) * */ - public fetchPowerUsersLite(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).fetchPowerUsersLite(options).then((request) => request(this.axios, this.basePath)); + public fetchPowerUsersLite(requestParameters: UserApiFetchPowerUsersLiteRequest = {}, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).fetchPowerUsersLite(requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1903,7 +2058,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public fetchUsersByLocation(requestParameters: UserApiFetchUsersByLocationRequest, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).fetchUsersByLocation(requestParameters.latitude, requestParameters.longitude, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).fetchUsersByLocation(requestParameters.latitude, requestParameters.longitude, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1925,6 +2080,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { /** * Fetches FID to [assign it to new user](https://docs.neynar.com/reference/register-user) * @summary Fetch fresh FID + * @param {UserApiGetFreshAccountFIDRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi @@ -1933,8 +2089,8 @@ export class UserApi extends BaseAPI implements UserApiInterface { * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-fresh-account-fid) * */ - public getFreshAccountFID(options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).getFreshAccountFID(options).then((request) => request(this.axios, this.basePath)); + public getFreshAccountFID(requestParameters: UserApiGetFreshAccountFIDRequest = {}, options?: RawAxiosRequestConfig) { + return UserApiFp(this.configuration).getFreshAccountFID(requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -1966,7 +2122,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public lookupUserByUsername(requestParameters: UserApiLookupUserByUsernameRequest, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).lookupUserByUsername(requestParameters.username, requestParameters.viewer_fid, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).lookupUserByUsername(requestParameters.username, requestParameters.viewer_fid, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** @@ -2014,7 +2170,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * */ public searchUser(requestParameters: UserApiSearchUserRequest, options?: RawAxiosRequestConfig) { - return UserApiFp(this.configuration).searchUser(requestParameters.q, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); + return UserApiFp(this.configuration).searchUser(requestParameters.q, requestParameters.viewer_fid, requestParameters.limit, requestParameters.cursor, requestParameters.x_neynar_experimental, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts index 19f7729..0513e9d 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-member-user.ts @@ -21,6 +21,9 @@ import type { User } from './user'; import type { UserDehydrated } from './user-dehydrated'; // May contain unused imports in some cases // @ts-ignore +import type { UserExperimental } from './user-experimental'; +// May contain unused imports in some cases +// @ts-ignore import type { UserProfile } from './user-profile'; // May contain unused imports in some cases // @ts-ignore diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index a2b5fc4..7ef7af5 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -211,6 +211,7 @@ export * from './update-user-req-body'; export * from './update-user-req-body-location'; export * from './user'; export * from './user-dehydrated'; +export * from './user-experimental'; export * from './user-fidresponse'; export * from './user-power-lite-response'; export * from './user-power-lite-response-result'; diff --git a/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts b/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts index a7c0bfb..9b7feb4 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/searched-user.ts @@ -24,6 +24,9 @@ import type { ProfileUrlPfp } from './profile-url-pfp'; import type { User } from './user'; // May contain unused imports in some cases // @ts-ignore +import type { UserExperimental } from './user-experimental'; +// May contain unused imports in some cases +// @ts-ignore import type { UserProfile } from './user-profile'; // May contain unused imports in some cases // @ts-ignore @@ -119,6 +122,12 @@ export interface SearchedUser { * @memberof SearchedUser */ 'power_badge': boolean; + /** + * + * @type {UserExperimental} + * @memberof SearchedUser + */ + 'experimental'?: UserExperimental; /** * * @type {UserViewerContext} diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-experimental.ts b/src/neynar-api/v2/openapi-farcaster/models/user-experimental.ts new file mode 100644 index 0000000..958c333 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/user-experimental.ts @@ -0,0 +1,30 @@ +/* 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 UserExperimental + */ +export interface UserExperimental { + /** + * Score that represents the probability that the account is not spam. + * @type {number} + * @memberof UserExperimental + */ + 'neynar_user_score': number; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user.ts b/src/neynar-api/v2/openapi-farcaster/models/user.ts index a075c5a..37d9e69 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/user.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/user.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import type { UserExperimental } from './user-experimental'; // May contain unused imports in some cases // @ts-ignore import type { UserProfile } from './user-profile'; @@ -110,6 +113,12 @@ export interface User { * @memberof User */ 'power_badge': boolean; + /** + * + * @type {UserExperimental} + * @memberof User + */ + 'experimental'?: UserExperimental; /** * * @type {UserViewerContext} diff --git a/src/oas b/src/oas index eb75414..081e9c7 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit eb75414a44f953b653631ee1cc0e405d935f8c37 +Subproject commit 081e9c77063a0a84b3e5c754e0420590e74d16ed