UNPKG

@neynar/nodejs-sdk

Version:

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

329 lines (328 loc) 14.1 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 { BlockListResponse } from '../models'; import type { BlockReqBody } from '../models'; import type { OperationResponse } from '../models'; /** * BlockApi - axios parameter creator * @export */ export declare const BlockApiAxiosParamCreator: (configuration?: Configuration) => { /** * Deletes a block for a given FID. * @summary Unblock FID * @param {BlockReqBody} blockReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock: (blockReqBody: BlockReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Fetches all FIDs that a user has blocked or has been blocked by * @summary Blocked / Blocked by FIDs * @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} [blockerFid] Providing this will return the users that this user has blocked * @param {number} [blockedFid] Providing this will return the users that have blocked this user * @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<BlockListResponse>} A promise that resolves to a `BlockListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList: (xNeynarExperimental?: boolean, blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Adds a block for a given FID. * @summary Block FID * @param {BlockReqBody} blockReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock: (blockReqBody: BlockReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * BlockApi - functional programming interface * @export */ export declare const BlockApiFp: (configuration?: Configuration) => { /** * Deletes a block for a given FID. * @summary Unblock FID * @param {BlockReqBody} blockReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock(blockReqBody: BlockReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OperationResponse>>; /** * Fetches all FIDs that a user has blocked or has been blocked by * @summary Blocked / Blocked by FIDs * @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} [blockerFid] Providing this will return the users that this user has blocked * @param {number} [blockedFid] Providing this will return the users that have blocked this user * @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<BlockListResponse>} A promise that resolves to a `BlockListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList(xNeynarExperimental?: boolean, blockerFid?: number, blockedFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BlockListResponse>>; /** * Adds a block for a given FID. * @summary Block FID * @param {BlockReqBody} blockReqBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock(blockReqBody: BlockReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OperationResponse>>; }; /** * BlockApi - factory interface * @export */ export declare const BlockApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Deletes a block for a given FID. * @summary Unblock FID * @param {BlockApiDeleteBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock(requestParameters: BlockApiDeleteBlockRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResponse>; /** * Fetches all FIDs that a user has blocked or has been blocked by * @summary Blocked / Blocked by FIDs * @param {BlockApiFetchBlockListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<BlockListResponse>} A promise that resolves to a `BlockListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList(requestParameters?: BlockApiFetchBlockListRequest, options?: RawAxiosRequestConfig): AxiosPromise<BlockListResponse>; /** * Adds a block for a given FID. * @summary Block FID * @param {BlockApiPublishBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock(requestParameters: BlockApiPublishBlockRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResponse>; }; /** * BlockApi - interface * @export * @interface BlockApi */ export interface BlockApiInterface { /** * Deletes a block for a given FID. * @summary Unblock FID * @param {BlockApiDeleteBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApiInterface * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock(requestParameters: BlockApiDeleteBlockRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResponse>; /** * Fetches all FIDs that a user has blocked or has been blocked by * @summary Blocked / Blocked by FIDs * @param {BlockApiFetchBlockListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApiInterface * @returns {Promise<BlockListResponse>} A promise that resolves to a `BlockListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList(requestParameters?: BlockApiFetchBlockListRequest, options?: RawAxiosRequestConfig): AxiosPromise<BlockListResponse>; /** * Adds a block for a given FID. * @summary Block FID * @param {BlockApiPublishBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApiInterface * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock(requestParameters: BlockApiPublishBlockRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResponse>; } /** * Request parameters for deleteBlock operation in BlockApi. * @export * @interface BlockApiDeleteBlockRequest */ export interface BlockApiDeleteBlockRequest { /** * * * * * @type {BlockReqBody} * @memberof BlockApiDeleteBlock */ readonly blockReqBody: BlockReqBody; } /** * Request parameters for fetchBlockList operation in BlockApi. * @export * @interface BlockApiFetchBlockListRequest */ export interface BlockApiFetchBlockListRequest { /** * 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 BlockApiFetchBlockList */ readonly xNeynarExperimental?: boolean; /** * Providing this will return the users that this user has blocked * * * * @type {number} * @memberof BlockApiFetchBlockList */ readonly blockerFid?: number; /** * Providing this will return the users that have blocked this user * * * * @type {number} * @memberof BlockApiFetchBlockList */ readonly blockedFid?: number; /** * Number of results to fetch (Default: 20, Maximum: 100) * * * * @type {number} * @memberof BlockApiFetchBlockList */ readonly limit?: number; /** * Pagination cursor. * * * * @type {string} * @memberof BlockApiFetchBlockList */ readonly cursor?: string; } /** * Request parameters for publishBlock operation in BlockApi. * @export * @interface BlockApiPublishBlockRequest */ export interface BlockApiPublishBlockRequest { /** * * * * * @type {BlockReqBody} * @memberof BlockApiPublishBlock */ readonly blockReqBody: BlockReqBody; } /** * BlockApi - object-oriented interface * @export * @class BlockApi * @extends {BaseAPI} */ export declare class BlockApi extends BaseAPI implements BlockApiInterface { /** * Deletes a block for a given FID. * @summary Unblock FID * @param {BlockApiDeleteBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApi * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-block) * */ deleteBlock(requestParameters: BlockApiDeleteBlockRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OperationResponse, any>>; /** * Fetches all FIDs that a user has blocked or has been blocked by * @summary Blocked / Blocked by FIDs * @param {BlockApiFetchBlockListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApi * @returns {Promise<BlockListResponse>} A promise that resolves to a `BlockListResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-block-list) * */ fetchBlockList(requestParameters?: BlockApiFetchBlockListRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BlockListResponse, any>>; /** * Adds a block for a given FID. * @summary Block FID * @param {BlockApiPublishBlockRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockApi * @returns {Promise<OperationResponse>} A promise that resolves to a `OperationResponse` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-block) * */ publishBlock(requestParameters: BlockApiPublishBlockRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OperationResponse, any>>; }