@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
395 lines (394 loc) • 16.8 kB
TypeScript
/**
* Farcaster Hub API
* Perform basic queries of Farcaster state via the REST API of a Farcaster hub. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.35.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 { FetchUserFollowing200Response } from '../models';
import type { LinkAdd } from '../models';
import type { LinkType } from '../models';
/**
* LinksApi - axios parameter creator
* @export
*/
export declare const LinksApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Fetch a list of users that are following a user.
* @summary To target FID
* @param {number} targetFid The FID of the target user for this link
* @param {LinkType} [linkType]
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers)
*
*/
fetchUserFollowers: (targetFid: number, linkType?: LinkType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch a list of users that a user is following.
* @summary From source FID
* @param {number} fid The FID of the link\'s originator
* @param {LinkType} [linkType]
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following)
*
*/
fetchUserFollowing: (fid: number, linkType?: LinkType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Lookup a link by its FID and target FID.
* @summary By its FID and target FID
* @param {number} fid The FID of the link\'s originator
* @param {number} targetFid The FID of the target user for this link
* @param {LinkType} linkType
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<LinkAdd>} A promise that resolves to a `LinkAdd` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-relation)
*
*/
lookupUserRelation: (fid: number, targetFid: number, linkType: LinkType, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* LinksApi - functional programming interface
* @export
*/
export declare const LinksApiFp: (configuration?: Configuration) => {
/**
* Fetch a list of users that are following a user.
* @summary To target FID
* @param {number} targetFid The FID of the target user for this link
* @param {LinkType} [linkType]
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers)
*
*/
fetchUserFollowers(targetFid: number, linkType?: LinkType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchUserFollowing200Response>>;
/**
* Fetch a list of users that a user is following.
* @summary From source FID
* @param {number} fid The FID of the link\'s originator
* @param {LinkType} [linkType]
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following)
*
*/
fetchUserFollowing(fid: number, linkType?: LinkType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchUserFollowing200Response>>;
/**
* Lookup a link by its FID and target FID.
* @summary By its FID and target FID
* @param {number} fid The FID of the link\'s originator
* @param {number} targetFid The FID of the target user for this link
* @param {LinkType} linkType
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<LinkAdd>} A promise that resolves to a `LinkAdd` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-relation)
*
*/
lookupUserRelation(fid: number, targetFid: number, linkType: LinkType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LinkAdd>>;
};
/**
* LinksApi - factory interface
* @export
*/
export declare const LinksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Fetch a list of users that are following a user.
* @summary To target FID
* @param {LinksApiFetchUserFollowersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers)
*
*/
fetchUserFollowers(requestParameters: LinksApiFetchUserFollowersRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserFollowing200Response>;
/**
* Fetch a list of users that a user is following.
* @summary From source FID
* @param {LinksApiFetchUserFollowingRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following)
*
*/
fetchUserFollowing(requestParameters: LinksApiFetchUserFollowingRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserFollowing200Response>;
/**
* Lookup a link by its FID and target FID.
* @summary By its FID and target FID
* @param {LinksApiLookupUserRelationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<LinkAdd>} A promise that resolves to a `LinkAdd` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-relation)
*
*/
lookupUserRelation(requestParameters: LinksApiLookupUserRelationRequest, options?: RawAxiosRequestConfig): AxiosPromise<LinkAdd>;
};
/**
* LinksApi - interface
* @export
* @interface LinksApi
*/
export interface LinksApiInterface {
/**
* Fetch a list of users that are following a user.
* @summary To target FID
* @param {LinksApiFetchUserFollowersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApiInterface
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers)
*
*/
fetchUserFollowers(requestParameters: LinksApiFetchUserFollowersRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserFollowing200Response>;
/**
* Fetch a list of users that a user is following.
* @summary From source FID
* @param {LinksApiFetchUserFollowingRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApiInterface
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following)
*
*/
fetchUserFollowing(requestParameters: LinksApiFetchUserFollowingRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserFollowing200Response>;
/**
* Lookup a link by its FID and target FID.
* @summary By its FID and target FID
* @param {LinksApiLookupUserRelationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApiInterface
* @returns {Promise<LinkAdd>} A promise that resolves to a `LinkAdd` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-relation)
*
*/
lookupUserRelation(requestParameters: LinksApiLookupUserRelationRequest, options?: RawAxiosRequestConfig): AxiosPromise<LinkAdd>;
}
/**
* Request parameters for fetchUserFollowers operation in LinksApi.
* @export
* @interface LinksApiFetchUserFollowersRequest
*/
export interface LinksApiFetchUserFollowersRequest {
/**
* The FID of the target user for this link
*
*
*
* @type {number}
* @memberof LinksApiFetchUserFollowers
*/
readonly targetFid: number;
/**
*
*
*
*
* @type {LinkType}
* @memberof LinksApiFetchUserFollowers
*/
readonly linkType?: LinkType;
/**
* Maximum number of messages to return in a single response
*
*
*
* @type {number}
* @memberof LinksApiFetchUserFollowers
*/
readonly pageSize?: number;
/**
* Reverse the sort order, returning latest messages first
*
*
*
* @type {boolean}
* @memberof LinksApiFetchUserFollowers
*/
readonly reverse?: boolean;
/**
* The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
*
*
*
* @type {string}
* @memberof LinksApiFetchUserFollowers
*/
readonly pageToken?: string;
}
/**
* Request parameters for fetchUserFollowing operation in LinksApi.
* @export
* @interface LinksApiFetchUserFollowingRequest
*/
export interface LinksApiFetchUserFollowingRequest {
/**
* The FID of the link\'s originator
*
*
*
* @type {number}
* @memberof LinksApiFetchUserFollowing
*/
readonly fid: number;
/**
*
*
*
*
* @type {LinkType}
* @memberof LinksApiFetchUserFollowing
*/
readonly linkType?: LinkType;
/**
* Maximum number of messages to return in a single response
*
*
*
* @type {number}
* @memberof LinksApiFetchUserFollowing
*/
readonly pageSize?: number;
/**
* Reverse the sort order, returning latest messages first
*
*
*
* @type {boolean}
* @memberof LinksApiFetchUserFollowing
*/
readonly reverse?: boolean;
/**
* The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
*
*
*
* @type {string}
* @memberof LinksApiFetchUserFollowing
*/
readonly pageToken?: string;
}
/**
* Request parameters for lookupUserRelation operation in LinksApi.
* @export
* @interface LinksApiLookupUserRelationRequest
*/
export interface LinksApiLookupUserRelationRequest {
/**
* The FID of the link\'s originator
*
*
*
* @type {number}
* @memberof LinksApiLookupUserRelation
*/
readonly fid: number;
/**
* The FID of the target user for this link
*
*
*
* @type {number}
* @memberof LinksApiLookupUserRelation
*/
readonly targetFid: number;
/**
*
*
*
*
* @type {LinkType}
* @memberof LinksApiLookupUserRelation
*/
readonly linkType: LinkType;
}
/**
* LinksApi - object-oriented interface
* @export
* @class LinksApi
* @extends {BaseAPI}
*/
export declare class LinksApi extends BaseAPI implements LinksApiInterface {
/**
* Fetch a list of users that are following a user.
* @summary To target FID
* @param {LinksApiFetchUserFollowersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApi
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-followers)
*
*/
fetchUserFollowers(requestParameters: LinksApiFetchUserFollowersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchUserFollowing200Response, any, {}>>;
/**
* Fetch a list of users that a user is following.
* @summary From source FID
* @param {LinksApiFetchUserFollowingRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApi
* @returns {Promise<FetchUserFollowing200Response>} A promise that resolves to a `FetchUserFollowing200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following)
*
*/
fetchUserFollowing(requestParameters: LinksApiFetchUserFollowingRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchUserFollowing200Response, any, {}>>;
/**
* Lookup a link by its FID and target FID.
* @summary By its FID and target FID
* @param {LinksApiLookupUserRelationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LinksApi
* @returns {Promise<LinkAdd>} A promise that resolves to a `LinkAdd` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-relation)
*
*/
lookupUserRelation(requestParameters: LinksApiLookupUserRelationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<LinkAdd, any, {}>>;
}