diff --git a/package.json b/package.json index 028510ae..d16fa8ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/nodejs-sdk", - "version": "1.14.0", + "version": "1.15.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/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index 50e2f031..d9f7afd5 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -44,6 +44,7 @@ import { WebhookResponse, WebhookSubscriptionFilters, WebhookListResponse, + Conversation, } from "./v2/openapi-farcaster"; import { @@ -311,6 +312,9 @@ export class NeynarAPIClient { } /** + * @deprecated + * Now deprecated, use `lookupCastConversation` instead. + * * Retrieves all casts, including root cast and all replies for a given thread hash. No limit to the depth of replies. * **Note :** The parent provided by the caller is included in the response. * @@ -1243,7 +1247,7 @@ export class NeynarAPIClient { * * @example * // Example: Search for users with a specific query - * client.searchUser('ris', 19960).then(response => { + * client.searchUser('ris', 19960, { limit: 10 }).then(response => { * console.log('User Search Results:', response); // Outputs the results of the user search * }); * @@ -1251,10 +1255,52 @@ export class NeynarAPIClient { */ public async searchUser( q: string, - viewerFid: number + viewerFid?: number, + options?: { limit?: number, cursor?: string} ): Promise { - return await this.clients.v2.searchUser(q, viewerFid); - } + return await this.clients.v2.searchUser(q, viewerFid, options); + } + +/** + * Retrieves comprehensive details about a specific cast conversation, identified by either a hash or a URL. This method is instrumental in accessing the full depth of a conversation, including initial casts and subsequent replies, up to a user-defined depth. By allowing the specification of the identifier type and the depth of replies to fetch, it offers flexibility in how conversation data is retrieved, making it suitable for applications requiring detailed conversation analysis or display. + * + * @param {string} castHashOrUrl - The unique hash or URL identifying the cast conversation to retrieve. This identifier enables precise targeting of the conversation of interest. + * @param {CastParamType} type - Enumerates the identifier type, specifying whether the provided value is a hash or a URL, thus guiding the retrieval process appropriately. + * @param {Object} [options] - An optional parameter object to refine the query. + * @param {number} [options.replyDepth] - An optional parameter within the options object, specifying the desired depth of replies to fetch within the conversation. This allows for tailored retrieval of conversation data, ranging from top-level casts only to deeper, more comprehensive conversation threads. + * @param {boolean} [options.includeChronologicalParentCasts] - An optional parameter within the options object, indicating whether to include chronological parent casts in the response. This parameter is useful for applications requiring a structured view of the conversation, including parent casts that provide context for the replies. + * @returns {Promise} A promise resolving to a `Conversation` object. This object encapsulates detailed information about the cast conversation, including the content of the conversation itself and any replies, structured up to the specified depth. + * + * @example + * // Example usage: Retrieve detailed information about a cast conversation via URL, including replies up to two levels deep + * import { CastParamType } from "@neynar/nodejs-sdk"; + * + * client.lookupCastConversation( + * 'https://warpcast.com/rish/0x9288c1', + * CastParamType.Url, + * { replyDepth: 2, includeChronologicalParentCasts: true} + * ).then(response => { + * console.log('Cast Conversation Information:', response); // Displays the detailed structure of the specified cast conversation + * }); + * + * // Refer to the Neynar API documentation for more details and advanced options: + * // https://docs.neynar.com/reference/cast-conversation + */ +public async lookupCastConversation( + castHashOrUrl: string, + type: CastParamType, + options?: { + replyDepth?: number; + includeChronologicalParentCasts?: boolean; + } +): Promise { + return await this.clients.v2.lookupCastConversation( + castHashOrUrl, + type, + options + ); +} + /** * Looks up a user by their custody address. diff --git a/src/neynar-api/v1/client.ts b/src/neynar-api/v1/client.ts index aa6a871a..cbb5152e 100644 --- a/src/neynar-api/v1/client.ts +++ b/src/neynar-api/v1/client.ts @@ -328,6 +328,9 @@ export class NeynarV1APIClient { } /** + * @deprecated + * Now deprecated, use `lookupCastConversation` instead. + * * Retrieves all casts, including root cast and all replies for a given thread hash. No limit to the depth of replies. * **Note :** The parent provided by the caller is included in the response. * diff --git a/src/neynar-api/v1/openapi/apis/cast-api.ts b/src/neynar-api/v1/openapi/apis/cast-api.ts index 832f792c..14ca4aae 100644 --- a/src/neynar-api/v1/openapi/apis/cast-api.ts +++ b/src/neynar-api/v1/openapi/apis/cast-api.ts @@ -38,8 +38,8 @@ import { RecentCastsResponse } from '../models'; export const CastApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary Retrieve all casts in a given thread hash + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Retrieve all casts in a given thread hash * @param {string} apiKey API key required for authentication. * @param {string} threadHash The hash of the thread to retrieve casts from. * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. @@ -263,8 +263,8 @@ export const CastApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CastApiAxiosParamCreator(configuration) return { /** - * Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary Retrieve all casts in a given thread hash + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Retrieve all casts in a given thread hash * @param {string} apiKey API key required for authentication. * @param {string} threadHash The hash of the thread to retrieve casts from. * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. @@ -330,8 +330,8 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? const localVarFp = CastApiFp(configuration) return { /** - * Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary Retrieve all casts in a given thread hash + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Retrieve all casts in a given thread hash * @param {string} apiKey API key required for authentication. * @param {string} threadHash The hash of the thread to retrieve casts from. * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. @@ -393,8 +393,8 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? */ export class CastApi extends BaseAPI { /** - * Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. - * @summary Retrieve all casts in a given thread hash + * Now deprecated, use [v2/cast/conversation](https://docs.neynar.com/reference/cast-conversation). Gets all casts, including root cast and all replies for a given thread hash. No limit the depth of replies. + * @summary DEPRECATED - Retrieve all casts in a given thread hash * @param {string} apiKey API key required for authentication. * @param {string} threadHash The hash of the thread to retrieve casts from. * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index badb83d1..5565bc40 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -60,6 +60,7 @@ import { WebhookListResponse, WebhookPatchReqBody, WebhookPatchReqBodyActiveEnum, + Conversation, } from "./openapi-farcaster"; import axios, { AxiosError, AxiosInstance } from "axios"; import { silentLogger, Logger } from "../common/logger"; @@ -811,9 +812,13 @@ export class NeynarV2APIClient { */ public async searchUser( q: string, - viewerFid: number + viewerFid?: number, + options?: { + limit?: number; + cursor?: string; + } ): Promise { - const response = await this.apis.user.userSearch(this.apiKey, q, viewerFid); + const response = await this.apis.user.userSearch(this.apiKey, q, viewerFid, options?.limit, options?.cursor); return response.data; } @@ -927,6 +932,49 @@ export class NeynarV2APIClient { return response.data; } +/** + * Retrieves detailed information about a cast conversation based on a specified hash or URL. Useful + * for fetching in-depth details of a single cast conversation, including replies up to a specified depth. The method + * allows for specifying the type of the provided identifier (e.g., a hash or URL) and how deep the reply chain should + * be fetched. + * + * @param {string} castHashOrUrl - The hash or URL of the cast conversation to be retrieved. + * @param {CastParamType} type - Specifies the type of the provided identifier, indicating whether it's a hash or URL. + * @param {number} [replyDepth] - Optional parameter to specify how deep the reply chain should be fetched. + * @param {boolean} [includeChronologicalParentCasts] - Optional parameter to include chronological parent casts in the response. + * @returns {Promise} A promise that resolves to a `Conversation` object, + * containing detailed information about the requested cast conversation, including replies up to the specified depth. + * + * @example + * // Fetch detailed information about a cast conversation using a given hash or URL, with a reply depth of 2 + * client.lookupCastConversation( + * 'https://warpcast.com/rish/0x9288c1', + * CastParamType.Url, + * { replyDepth: 2, includeChronologicalParentCasts: true } + * ).then(response => { + * console.log('Cast Conversation Information:', response); // Outputs detailed information about the specified cast conversation + * }); + * + * For more information, refer to the [Neynar documentation](https://docs.neynar.com/reference/cast-conversation). + */ +public async lookupCastConversation( + castHashOrUrl: string, + type: CastParamType, + options?: { + replyDepth?: number; + includeChronologicalParentCasts?: boolean; + } +): Promise { + const response = await this.apis.cast.castConversation( + this.apiKey, + castHashOrUrl, + type, + options?.replyDepth, + options?.includeChronologicalParentCasts + ); + return response.data; +} + /** * Publishes a cast for the currently authenticated user. This method allows users to post * content, including text and embeds, and can also be used to reply to existing casts. diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 3c0f8cef..f7e108ba 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -34,6 +34,7 @@ models/cast-parent-author-all-of.ts models/cast-parent-author.ts models/cast-response.ts models/cast-with-interactions-all-of.ts +models/cast-with-interactions-and-conversations.ts models/cast-with-interactions-reactions.ts models/cast-with-interactions-replies.ts models/cast-with-interactions.ts @@ -43,6 +44,8 @@ models/casts-response.ts models/channel-list-response.ts models/channel-response.ts models/channel.ts +models/conversation-response.ts +models/conversation.ts models/dehydrated-follower.ts models/delete-cast-req-body.ts models/delete-frame-response.ts diff --git a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts index 5e1fc681..fd3815c8 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/cast-api.ts @@ -28,6 +28,8 @@ import { CastResponse } from '../models'; // @ts-ignore import { CastsResponse } from '../models'; // @ts-ignore +import { Conversation } from '../models'; +// @ts-ignore import { DeleteCastReqBody } from '../models'; // @ts-ignore import { ErrorRes } from '../models'; @@ -85,6 +87,67 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Retrieve the conversation for a given cast + * @param {string} apiKey API key required for authentication. + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castConversation: async (apiKey: string, identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'apiKey' is not null or undefined + assertParamExists('castConversation', 'apiKey', apiKey) + // verify required parameter 'identifier' is not null or undefined + assertParamExists('castConversation', 'identifier', identifier) + // verify required parameter 'type' is not null or undefined + assertParamExists('castConversation', 'type', type) + const localVarPath = `/farcaster/cast/conversation`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (identifier !== undefined) { + localVarQueryParameter['identifier'] = identifier; + } + + if (type !== undefined) { + localVarQueryParameter['type'] = type; + } + + if (replyDepth !== undefined) { + localVarQueryParameter['reply_depth'] = replyDepth; + } + + if (includeChronologicalParentCasts !== undefined) { + localVarQueryParameter['include_chronological_parent_casts'] = includeChronologicalParentCasts; + } + + if (apiKey != null) { + localVarHeaderParameter['api_key'] = String(apiKey); + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -257,6 +320,21 @@ export const CastApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.cast(apiKey, identifier, type, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Retrieve the conversation for a given cast + * @param {string} apiKey API key required for authentication. + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async castConversation(apiKey: string, identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.castConversation(apiKey, identifier, type, replyDepth, includeChronologicalParentCasts, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Retrieve multiple casts using their respective hashes. * @summary Gets information about an array of casts @@ -317,6 +395,20 @@ export const CastApiFactory = function (configuration?: Configuration, basePath? cast(apiKey: string, identifier: string, type: CastParamType, options?: any): AxiosPromise { return localVarFp.cast(apiKey, identifier, type, options).then((request) => request(axios, basePath)); }, + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Retrieve the conversation for a given cast + * @param {string} apiKey API key required for authentication. + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + castConversation(apiKey: string, identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, options?: any): AxiosPromise { + return localVarFp.castConversation(apiKey, identifier, type, replyDepth, includeChronologicalParentCasts, options).then((request) => request(axios, basePath)); + }, /** * Retrieve multiple casts using their respective hashes. * @summary Gets information about an array of casts @@ -376,6 +468,22 @@ export class CastApi extends BaseAPI { return CastApiFp(this.configuration).cast(apiKey, identifier, type, options).then((request) => request(this.axios, this.basePath)); } + /** + * Gets all casts related to a conversation surrounding a cast by passing in a cast hash or Warpcast URL. Includes all the ancestors of a cast up to the root parent in a chronological order. Includes all direct_replies to the cast up to the reply_depth specified in the query parameter. + * @summary Retrieve the conversation for a given cast + * @param {string} apiKey API key required for authentication. + * @param {string} identifier Cast identifier (Its either a url or a hash) + * @param {CastParamType} type + * @param {number} [replyDepth] The depth of replies in the conversation that will be returned (default 2) + * @param {boolean} [includeChronologicalParentCasts] Include all parent casts in chronological order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CastApi + */ + public castConversation(apiKey: string, identifier: string, type: CastParamType, replyDepth?: number, includeChronologicalParentCasts?: boolean, options?: AxiosRequestConfig) { + return CastApiFp(this.configuration).castConversation(apiKey, identifier, type, replyDepth, includeChronologicalParentCasts, options).then((request) => request(this.axios, this.basePath)); + } + /** * Retrieve multiple casts using their respective hashes. * @summary Gets information about an array of casts 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 957c645f..60565187 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -593,17 +593,17 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @summary Search for Usernames * @param {string} apiKey API key required for authentication. * @param {string} q - * @param {number} viewerFid + * @param {number} [viewerFid] + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userSearch: async (apiKey: string, q: string, viewerFid: number, options: AxiosRequestConfig = {}): Promise => { + userSearch: async (apiKey: string, q: string, viewerFid?: number, limit?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'apiKey' is not null or undefined assertParamExists('userSearch', 'apiKey', apiKey) // verify required parameter 'q' is not null or undefined assertParamExists('userSearch', 'q', q) - // verify required parameter 'viewerFid' is not null or undefined - assertParamExists('userSearch', 'viewerFid', viewerFid) const localVarPath = `/farcaster/user/search`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -624,6 +624,14 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) localVarQueryParameter['viewer_fid'] = viewerFid; } + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + if (apiKey != null) { localVarHeaderParameter['api_key'] = String(apiKey); } @@ -801,12 +809,14 @@ export const UserApiFp = function(configuration?: Configuration) { * @summary Search for Usernames * @param {string} apiKey API key required for authentication. * @param {string} q - * @param {number} viewerFid + * @param {number} [viewerFid] + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userSearch(apiKey: string, q: string, viewerFid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userSearch(apiKey, q, viewerFid, options); + async userSearch(apiKey: string, q: string, viewerFid?: number, limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userSearch(apiKey, q, viewerFid, limit, cursor, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -959,12 +969,14 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * @summary Search for Usernames * @param {string} apiKey API key required for authentication. * @param {string} q - * @param {number} viewerFid + * @param {number} [viewerFid] + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userSearch(apiKey: string, q: string, viewerFid: number, options?: any): AxiosPromise { - return localVarFp.userSearch(apiKey, q, viewerFid, options).then((request) => request(axios, basePath)); + userSearch(apiKey: string, q: string, viewerFid?: number, limit?: number, cursor?: string, options?: any): AxiosPromise { + return localVarFp.userSearch(apiKey, q, viewerFid, limit, cursor, options).then((request) => request(axios, basePath)); }, }; }; @@ -1140,12 +1152,14 @@ export class UserApi extends BaseAPI { * @summary Search for Usernames * @param {string} apiKey API key required for authentication. * @param {string} q - * @param {number} viewerFid + * @param {number} [viewerFid] + * @param {number} [limit] + * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ - public userSearch(apiKey: string, q: string, viewerFid: number, options?: AxiosRequestConfig) { - return UserApiFp(this.configuration).userSearch(apiKey, q, viewerFid, options).then((request) => request(this.axios, this.basePath)); + public userSearch(apiKey: string, q: string, viewerFid?: number, limit?: number, cursor?: string, options?: AxiosRequestConfig) { + return UserApiFp(this.configuration).userSearch(apiKey, q, viewerFid, limit, cursor, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts new file mode 100644 index 00000000..4824f89f --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { CastNotificationType } from './cast-notification-type'; +// May contain unused imports in some cases +// @ts-ignore +import { CastParentAuthor } from './cast-parent-author'; +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractionsReplies } from './cast-with-interactions-replies'; +// May contain unused imports in some cases +// @ts-ignore +import { EmbeddedCast } from './embedded-cast'; +// May contain unused imports in some cases +// @ts-ignore +import { Frame } from './frame'; +// May contain unused imports in some cases +// @ts-ignore +import { User } from './user'; + +/** + * @type CastWithInteractionsAndConversations + * @export + */ +export type CastWithInteractionsAndConversations = CastWithInteractions; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts new file mode 100644 index 00000000..754c9006 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractions } from './cast-with-interactions'; + +/** + * + * @export + * @interface ConversationResponse + */ +export interface ConversationResponse { + /** + * + * @type {CastWithInteractions} + * @memberof ConversationResponse + */ + 'cast': CastWithInteractions; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts new file mode 100644 index 00000000..3440202b --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractionsAndConversations } from './cast-with-interactions-and-conversations'; + +/** + * + * @export + * @interface Conversation + */ +export interface Conversation { + /** + * + * @type {CastWithInteractionsAndConversations} + * @memberof Conversation + */ + 'cast': CastWithInteractionsAndConversations; + /** + * + * @type {Array} + * @memberof Conversation + */ + 'chronological_parent_casts'?: Array; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index 65e7821c..8b116fab 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -13,6 +13,7 @@ export * from './cast-parent-author-all-of'; export * from './cast-response'; export * from './cast-with-interactions'; export * from './cast-with-interactions-all-of'; +export * from './cast-with-interactions-and-conversations'; export * from './cast-with-interactions-reactions'; export * from './cast-with-interactions-replies'; export * from './casts-response'; @@ -20,6 +21,8 @@ export * from './casts-response-result'; export * from './channel'; export * from './channel-list-response'; export * from './channel-response'; +export * from './conversation'; +export * from './conversation-response'; export * from './dehydrated-follower'; export * from './delete-cast-req-body'; export * from './delete-frame-response'; diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts b/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts index 08074f50..61e9263c 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/user-search-response-result.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { NextCursor } from './next-cursor'; // May contain unused imports in some cases // @ts-ignore import { SearchedUser } from './searched-user'; @@ -29,5 +32,11 @@ export interface UserSearchResponseResult { * @memberof UserSearchResponseResult */ 'users': Array; + /** + * + * @type {NextCursor} + * @memberof UserSearchResponseResult + */ + 'next'?: NextCursor; } diff --git a/src/oas b/src/oas index 36d6fd25..94c77e26 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit 36d6fd25595f3d963881cb33c66f84075c667aa6 +Subproject commit 94c77e267614119ab4ac286d482a7e91d344e2df