@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
300 lines (299 loc) • 15 kB
TypeScript
/**
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.46.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { ConversationSummary } from '../models';
import type { FetchUserInteractions200Response } from '../models';
import type { FramePayTransactionRequestBody } from '../models';
import type { NotificationType } from '../models';
import type { TransactionFrameResponse } from '../models';
/**
* AgentsApi - axios parameter creator
* @export
*/
export declare const AgentsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Creates a new transaction pay mini app that can be used to collect payments through a mini app
* @summary Create transaction pay mini app
* @param {FramePayTransactionRequestBody} framePayTransactionRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
*/
createTransactionPayFrame: (framePayTransactionRequestBody: FramePayTransactionRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns a list of interactions between two users
* @summary User interactions
* @param {string} fids Comma separated list of two FIDs
* @param {Array<NotificationType>} [type] Comma seperated list of Interaction type to fetch
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserInteractions200Response>} A promise that resolves to a `FetchUserInteractions200Response` object
*
*/
fetchUserInteractions: (fids: string, type?: Array<NotificationType>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents.
* @summary Cast conversation summary
* @param {string} identifier Cast identifier (Its either a url or a hash)
* @param {number} [limit] Number of casts to consider in a summary up to a point of target cast (Default: 20, Maximum: 50)
* @param {string} [prompt] Additional prompt used to generate a summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ConversationSummary>} A promise that resolves to a `ConversationSummary` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary)
*
*/
lookupCastConversationSummary: (identifier: string, limit?: number, prompt?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* AgentsApi - functional programming interface
* @export
*/
export declare const AgentsApiFp: (configuration?: Configuration) => {
/**
* Creates a new transaction pay mini app that can be used to collect payments through a mini app
* @summary Create transaction pay mini app
* @param {FramePayTransactionRequestBody} framePayTransactionRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
*/
createTransactionPayFrame(framePayTransactionRequestBody: FramePayTransactionRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionFrameResponse>>;
/**
* Returns a list of interactions between two users
* @summary User interactions
* @param {string} fids Comma separated list of two FIDs
* @param {Array<NotificationType>} [type] Comma seperated list of Interaction type to fetch
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserInteractions200Response>} A promise that resolves to a `FetchUserInteractions200Response` object
*
*/
fetchUserInteractions(fids: string, type?: Array<NotificationType>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchUserInteractions200Response>>;
/**
* Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents.
* @summary Cast conversation summary
* @param {string} identifier Cast identifier (Its either a url or a hash)
* @param {number} [limit] Number of casts to consider in a summary up to a point of target cast (Default: 20, Maximum: 50)
* @param {string} [prompt] Additional prompt used to generate a summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ConversationSummary>} A promise that resolves to a `ConversationSummary` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary)
*
*/
lookupCastConversationSummary(identifier: string, limit?: number, prompt?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConversationSummary>>;
};
/**
* AgentsApi - factory interface
* @export
*/
export declare const AgentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Creates a new transaction pay mini app that can be used to collect payments through a mini app
* @summary Create transaction pay mini app
* @param {AgentsApiCreateTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
*/
createTransactionPayFrame(requestParameters: AgentsApiCreateTransactionPayFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionFrameResponse>;
/**
* Returns a list of interactions between two users
* @summary User interactions
* @param {AgentsApiFetchUserInteractionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserInteractions200Response>} A promise that resolves to a `FetchUserInteractions200Response` object
*
*/
fetchUserInteractions(requestParameters: AgentsApiFetchUserInteractionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserInteractions200Response>;
/**
* Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents.
* @summary Cast conversation summary
* @param {AgentsApiLookupCastConversationSummaryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<ConversationSummary>} A promise that resolves to a `ConversationSummary` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary)
*
*/
lookupCastConversationSummary(requestParameters: AgentsApiLookupCastConversationSummaryRequest, options?: RawAxiosRequestConfig): AxiosPromise<ConversationSummary>;
};
/**
* AgentsApi - interface
* @export
* @interface AgentsApi
*/
export interface AgentsApiInterface {
/**
* Creates a new transaction pay mini app that can be used to collect payments through a mini app
* @summary Create transaction pay mini app
* @param {AgentsApiCreateTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApiInterface
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
*/
createTransactionPayFrame(requestParameters: AgentsApiCreateTransactionPayFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionFrameResponse>;
/**
* Returns a list of interactions between two users
* @summary User interactions
* @param {AgentsApiFetchUserInteractionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApiInterface
* @returns {Promise<FetchUserInteractions200Response>} A promise that resolves to a `FetchUserInteractions200Response` object
*
*/
fetchUserInteractions(requestParameters: AgentsApiFetchUserInteractionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserInteractions200Response>;
/**
* Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents.
* @summary Cast conversation summary
* @param {AgentsApiLookupCastConversationSummaryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApiInterface
* @returns {Promise<ConversationSummary>} A promise that resolves to a `ConversationSummary` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary)
*
*/
lookupCastConversationSummary(requestParameters: AgentsApiLookupCastConversationSummaryRequest, options?: RawAxiosRequestConfig): AxiosPromise<ConversationSummary>;
}
/**
* Request parameters for createTransactionPayFrame operation in AgentsApi.
* @export
* @interface AgentsApiCreateTransactionPayFrameRequest
*/
export interface AgentsApiCreateTransactionPayFrameRequest {
/**
*
*
*
*
* @type {FramePayTransactionRequestBody}
* @memberof AgentsApiCreateTransactionPayFrame
*/
readonly framePayTransactionRequestBody: FramePayTransactionRequestBody;
}
/**
* Request parameters for fetchUserInteractions operation in AgentsApi.
* @export
* @interface AgentsApiFetchUserInteractionsRequest
*/
export interface AgentsApiFetchUserInteractionsRequest {
/**
* Comma separated list of two FIDs
* @acceptAs integer
* @commaSeparated
*
* @type {string}
* @memberof AgentsApiFetchUserInteractions
*/
readonly fids: string;
/**
* Comma seperated list of Interaction type to fetch
*
*
*
* @type {Array<NotificationType>}
* @memberof AgentsApiFetchUserInteractions
*/
readonly type?: Array<NotificationType>;
}
/**
* Request parameters for lookupCastConversationSummary operation in AgentsApi.
* @export
* @interface AgentsApiLookupCastConversationSummaryRequest
*/
export interface AgentsApiLookupCastConversationSummaryRequest {
/**
* Cast identifier (Its either a url or a hash)
*
*
*
* @type {string}
* @memberof AgentsApiLookupCastConversationSummary
*/
readonly identifier: string;
/**
* Number of casts to consider in a summary up to a point of target cast (Default: 20, Maximum: 50)
*
*
*
* @type {number}
* @memberof AgentsApiLookupCastConversationSummary
*/
readonly limit?: number;
/**
* Additional prompt used to generate a summary
*
*
*
* @type {string}
* @memberof AgentsApiLookupCastConversationSummary
*/
readonly prompt?: string;
}
/**
* AgentsApi - object-oriented interface
* @export
* @class AgentsApi
* @extends {BaseAPI}
*/
export declare class AgentsApi extends BaseAPI implements AgentsApiInterface {
/**
* Creates a new transaction pay mini app that can be used to collect payments through a mini app
* @summary Create transaction pay mini app
* @param {AgentsApiCreateTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApi
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
*/
createTransactionPayFrame(requestParameters: AgentsApiCreateTransactionPayFrameRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TransactionFrameResponse, any>>;
/**
* Returns a list of interactions between two users
* @summary User interactions
* @param {AgentsApiFetchUserInteractionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApi
* @returns {Promise<FetchUserInteractions200Response>} A promise that resolves to a `FetchUserInteractions200Response` object
*
*/
fetchUserInteractions(requestParameters: AgentsApiFetchUserInteractionsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchUserInteractions200Response, any>>;
/**
* Generates a summary of all casts related to a conversation surrounding a cast by passing in a cast hash or Farcaster URL. Summary is generated by an LLM and is intended to be passed as a context to AI agents.
* @summary Cast conversation summary
* @param {AgentsApiLookupCastConversationSummaryRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AgentsApi
* @returns {Promise<ConversationSummary>} A promise that resolves to a `ConversationSummary` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-cast-conversation-summary)
*
*/
lookupCastConversationSummary(requestParameters: AgentsApiLookupCastConversationSummaryRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ConversationSummary, any>>;
}