UNPKG

@neynar/nodejs-sdk

Version:

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

318 lines (317 loc) 13.7 kB
/** * Neynar API * The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details. * * The version of the OpenAPI document: 3.34.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 { MuteListResponse } from '../models'; import type { MuteReqBody } from '../models'; import type { MuteResponse } from '../models'; /** * MuteApi - axios parameter creator * @export */ export declare const MuteApiAxiosParamCreator: (configuration?: Configuration) => { /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Unmute FID * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute: (muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {number} fid The user\&#39;s FID (identifier) * @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details. * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteListResponse>} A promise that resolves to a `MuteListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList: (fid: number, xNeynarExperimental?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Mute FID * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute: (muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * MuteApi - functional programming interface * @export */ export declare const MuteApiFp: (configuration?: Configuration) => { /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Unmute FID * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MuteResponse>>; /** * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {number} fid The user\&#39;s FID (identifier) * @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details. * @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100) * @param {string} [cursor] Pagination cursor. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteListResponse>} A promise that resolves to a `MuteListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList(fid: number, xNeynarExperimental?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MuteListResponse>>; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Mute FID * @param {MuteReqBody} muteReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute(muteReqBody: MuteReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MuteResponse>>; }; /** * MuteApi - factory interface * @export */ export declare const MuteApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Unmute FID * @param {MuteApiDeleteMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute(requestParameters: MuteApiDeleteMuteRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteResponse>; /** * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {MuteApiFetchMuteListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteListResponse>} A promise that resolves to a `MuteListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList(requestParameters: MuteApiFetchMuteListRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteListResponse>; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Mute FID * @param {MuteApiPublishMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute(requestParameters: MuteApiPublishMuteRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteResponse>; }; /** * MuteApi - interface * @export * @interface MuteApi */ export interface MuteApiInterface { /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Unmute FID * @param {MuteApiDeleteMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApiInterface * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute(requestParameters: MuteApiDeleteMuteRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteResponse>; /** * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {MuteApiFetchMuteListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApiInterface * @returns {Promise<MuteListResponse>} A promise that resolves to a `MuteListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList(requestParameters: MuteApiFetchMuteListRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteListResponse>; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Mute FID * @param {MuteApiPublishMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApiInterface * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute(requestParameters: MuteApiPublishMuteRequest, options?: RawAxiosRequestConfig): AxiosPromise<MuteResponse>; } /** * Request parameters for deleteMute operation in MuteApi. * @export * @interface MuteApiDeleteMuteRequest */ export interface MuteApiDeleteMuteRequest { /** * * * * * @type {MuteReqBody} * @memberof MuteApiDeleteMute */ readonly muteReqBody: MuteReqBody; } /** * Request parameters for fetchMuteList operation in MuteApi. * @export * @interface MuteApiFetchMuteListRequest */ export interface MuteApiFetchMuteListRequest { /** * The user\&#39;s FID (identifier) * * * * @type {number} * @memberof MuteApiFetchMuteList */ readonly fid: number; /** * Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details. * * * @globalHeader * @type {boolean} * @memberof MuteApiFetchMuteList */ readonly xNeynarExperimental?: boolean; /** * Number of results to fetch (Default: 20, Maximum: 100) * * * * @type {number} * @memberof MuteApiFetchMuteList */ readonly limit?: number; /** * Pagination cursor. * * * * @type {string} * @memberof MuteApiFetchMuteList */ readonly cursor?: string; } /** * Request parameters for publishMute operation in MuteApi. * @export * @interface MuteApiPublishMuteRequest */ export interface MuteApiPublishMuteRequest { /** * * * * * @type {MuteReqBody} * @memberof MuteApiPublishMute */ readonly muteReqBody: MuteReqBody; } /** * MuteApi - object-oriented interface * @export * @class MuteApi * @extends {BaseAPI} */ export declare class MuteApi extends BaseAPI implements MuteApiInterface { /** * Deletes a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Unmute FID * @param {MuteApiDeleteMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApi * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-mute) * */ deleteMute(requestParameters: MuteApiDeleteMuteRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<MuteResponse, any>>; /** * Fetches all FIDs that a user has muted. * @summary Muted FIDs of user * @param {MuteApiFetchMuteListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApi * @returns {Promise<MuteListResponse>} A promise that resolves to a `MuteListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-mute-list) * */ fetchMuteList(requestParameters: MuteApiFetchMuteListRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<MuteListResponse, any>>; /** * Adds a mute for a given FID. This is an allowlisted API, reach out if you want access. * @summary Mute FID * @param {MuteApiPublishMuteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MuteApi * @returns {Promise<MuteResponse>} A promise that resolves to a `MuteResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-mute) * */ publishMute(requestParameters: MuteApiPublishMuteRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<MuteResponse, any>>; }