UNPKG

@neynar/nodejs-sdk

Version:

SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)

172 lines (171 loc) 8.56 kB
/** * 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 { FetchUserData200Response } from '../models'; import type { UserDataType } from '../models'; /** * UserDataApi - axios parameter creator * @export */ export declare const UserDataApiAxiosParamCreator: (configuration?: Configuration) => { /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead. * @summary Fetch UserData for a FID * @param {number} fid The FID that\&#39;s being requested * @param {UserDataType} [userDataType] The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned * @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<FetchUserData200Response>} A promise that resolves to a `FetchUserData200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-data) * */ fetchUserData: (fid: number, userDataType?: UserDataType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * UserDataApi - functional programming interface * @export */ export declare const UserDataApiFp: (configuration?: Configuration) => { /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead. * @summary Fetch UserData for a FID * @param {number} fid The FID that\&#39;s being requested * @param {UserDataType} [userDataType] The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned * @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<FetchUserData200Response>} A promise that resolves to a `FetchUserData200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-data) * */ fetchUserData(fid: number, userDataType?: UserDataType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchUserData200Response>>; }; /** * UserDataApi - factory interface * @export */ export declare const UserDataApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead. * @summary Fetch UserData for a FID * @param {UserDataApiFetchUserDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<FetchUserData200Response>} A promise that resolves to a `FetchUserData200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-data) * */ fetchUserData(requestParameters: UserDataApiFetchUserDataRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserData200Response>; }; /** * UserDataApi - interface * @export * @interface UserDataApi */ export interface UserDataApiInterface { /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead. * @summary Fetch UserData for a FID * @param {UserDataApiFetchUserDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserDataApiInterface * @returns {Promise<FetchUserData200Response>} A promise that resolves to a `FetchUserData200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-data) * */ fetchUserData(requestParameters: UserDataApiFetchUserDataRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchUserData200Response>; } /** * Request parameters for fetchUserData operation in UserDataApi. * @export * @interface UserDataApiFetchUserDataRequest */ export interface UserDataApiFetchUserDataRequest { /** * The FID that\&#39;s being requested * * * * @type {number} * @memberof UserDataApiFetchUserData */ readonly fid: number; /** * The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned * * * * @type {UserDataType} * @memberof UserDataApiFetchUserData */ readonly userDataType?: UserDataType; /** * Maximum number of messages to return in a single response * * * * @type {number} * @memberof UserDataApiFetchUserData */ readonly pageSize?: number; /** * Reverse the sort order, returning latest messages first * * * * @type {boolean} * @memberof UserDataApiFetchUserData */ 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 UserDataApiFetchUserData */ readonly pageToken?: string; } /** * UserDataApi - object-oriented interface * @export * @class UserDataApi * @extends {BaseAPI} */ export declare class UserDataApi extends BaseAPI implements UserDataApiInterface { /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead. * @summary Fetch UserData for a FID * @param {UserDataApiFetchUserDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserDataApi * @returns {Promise<FetchUserData200Response>} A promise that resolves to a `FetchUserData200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-data) * */ fetchUserData(requestParameters: UserDataApiFetchUserDataRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchUserData200Response, any, {}>>; }