@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
307 lines (306 loc) • 13.4 kB
TypeScript
/**
* 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.115.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 { BanListResponse } from '../models';
import type { BanReqBody } from '../models';
import type { BanResponse } from '../models';
/**
* BanApi - axios parameter creator
* @export
*/
export declare const BanApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Deletes a list of FIDs from the app associated with your API key.
* @summary Unban FIDs from app
* @param {BanReqBody} banReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans)
*
*/
deleteBans: (banReqBody: BanReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetches all FIDs that your app has banned.
* @summary Banned FIDs of app
* @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<BanListResponse>} A promise that resolves to a `BanListResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list)
*
*/
fetchBanList: (xNeynarExperimental?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds.
* @summary Ban FIDs from app
* @param {BanReqBody} banReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans)
*
*/
publishBans: (banReqBody: BanReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* BanApi - functional programming interface
* @export
*/
export declare const BanApiFp: (configuration?: Configuration) => {
/**
* Deletes a list of FIDs from the app associated with your API key.
* @summary Unban FIDs from app
* @param {BanReqBody} banReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans)
*
*/
deleteBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>>;
/**
* Fetches all FIDs that your app has banned.
* @summary Banned FIDs of app
* @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<BanListResponse>} A promise that resolves to a `BanListResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list)
*
*/
fetchBanList(xNeynarExperimental?: boolean, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanListResponse>>;
/**
* Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds.
* @summary Ban FIDs from app
* @param {BanReqBody} banReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans)
*
*/
publishBans(banReqBody: BanReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BanResponse>>;
};
/**
* BanApi - factory interface
* @export
*/
export declare const BanApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Deletes a list of FIDs from the app associated with your API key.
* @summary Unban FIDs from app
* @param {BanApiDeleteBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans)
*
*/
deleteBans(requestParameters: BanApiDeleteBansRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse>;
/**
* Fetches all FIDs that your app has banned.
* @summary Banned FIDs of app
* @param {BanApiFetchBanListRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanListResponse>} A promise that resolves to a `BanListResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list)
*
*/
fetchBanList(requestParameters?: BanApiFetchBanListRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanListResponse>;
/**
* Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds.
* @summary Ban FIDs from app
* @param {BanApiPublishBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans)
*
*/
publishBans(requestParameters: BanApiPublishBansRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse>;
};
/**
* BanApi - interface
* @export
* @interface BanApi
*/
export interface BanApiInterface {
/**
* Deletes a list of FIDs from the app associated with your API key.
* @summary Unban FIDs from app
* @param {BanApiDeleteBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApiInterface
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans)
*
*/
deleteBans(requestParameters: BanApiDeleteBansRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse>;
/**
* Fetches all FIDs that your app has banned.
* @summary Banned FIDs of app
* @param {BanApiFetchBanListRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApiInterface
* @returns {Promise<BanListResponse>} A promise that resolves to a `BanListResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list)
*
*/
fetchBanList(requestParameters?: BanApiFetchBanListRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanListResponse>;
/**
* Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds.
* @summary Ban FIDs from app
* @param {BanApiPublishBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApiInterface
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans)
*
*/
publishBans(requestParameters: BanApiPublishBansRequest, options?: RawAxiosRequestConfig): AxiosPromise<BanResponse>;
}
/**
* Request parameters for deleteBans operation in BanApi.
* @export
* @interface BanApiDeleteBansRequest
*/
export interface BanApiDeleteBansRequest {
/**
*
*
*
*
* @type {BanReqBody}
* @memberof BanApiDeleteBans
*/
readonly banReqBody: BanReqBody;
}
/**
* Request parameters for fetchBanList operation in BanApi.
* @export
* @interface BanApiFetchBanListRequest
*/
export interface BanApiFetchBanListRequest {
/**
* 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 BanApiFetchBanList
*/
readonly xNeynarExperimental?: boolean;
/**
* Number of results to fetch (Default: 20, Maximum: 100)
*
*
*
* @type {number}
* @memberof BanApiFetchBanList
*/
readonly limit?: number;
/**
* Pagination cursor.
*
*
*
* @type {string}
* @memberof BanApiFetchBanList
*/
readonly cursor?: string;
}
/**
* Request parameters for publishBans operation in BanApi.
* @export
* @interface BanApiPublishBansRequest
*/
export interface BanApiPublishBansRequest {
/**
*
*
*
*
* @type {BanReqBody}
* @memberof BanApiPublishBans
*/
readonly banReqBody: BanReqBody;
}
/**
* BanApi - object-oriented interface
* @export
* @class BanApi
* @extends {BaseAPI}
*/
export declare class BanApi extends BaseAPI implements BanApiInterface {
/**
* Deletes a list of FIDs from the app associated with your API key.
* @summary Unban FIDs from app
* @param {BanApiDeleteBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApi
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-bans)
*
*/
deleteBans(requestParameters: BanApiDeleteBansRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BanResponse, any, {}>>;
/**
* Fetches all FIDs that your app has banned.
* @summary Banned FIDs of app
* @param {BanApiFetchBanListRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApi
* @returns {Promise<BanListResponse>} A promise that resolves to a `BanListResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-ban-list)
*
*/
fetchBanList(requestParameters?: BanApiFetchBanListRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BanListResponse, any, {}>>;
/**
* Bans a list of FIDs from the app associated with your API key. Banned users, their casts and reactions will not appear in feeds.
* @summary Ban FIDs from app
* @param {BanApiPublishBansRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BanApi
* @returns {Promise<BanResponse>} A promise that resolves to a `BanResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-bans)
*
*/
publishBans(requestParameters: BanApiPublishBansRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BanResponse, any, {}>>;
}