@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
296 lines (295 loc) • 14.2 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 { BuyStorageReqBody } from '../models';
import type { StorageAllocationsResponse } from '../models';
import type { StorageUsageResponse } from '../models';
/**
* StorageApi - axios parameter creator
* @export
*/
export declare const StorageApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.
* @summary Buy storage
* @param {string} xWalletId Wallet ID to use for transactions
* @param {BuyStorageReqBody} buyStorageReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage)
*
*/
buyStorage: (xWalletId: string, buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetches storage allocations for a given user
* @summary Allocation of user
* @param {number} fid The unique identifier of a farcaster user or app (unsigned integer)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations)
*
*/
lookupUserStorageAllocations: (fid: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetches storage usage for a given user
* @summary Usage of user
* @param {number} fid The unique identifier of a farcaster user or app (unsigned integer)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageUsageResponse>} A promise that resolves to a `StorageUsageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage)
*
*/
lookupUserStorageUsage: (fid: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* StorageApi - functional programming interface
* @export
*/
export declare const StorageApiFp: (configuration?: Configuration) => {
/**
* This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.
* @summary Buy storage
* @param {string} xWalletId Wallet ID to use for transactions
* @param {BuyStorageReqBody} buyStorageReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage)
*
*/
buyStorage(xWalletId: string, buyStorageReqBody: BuyStorageReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageAllocationsResponse>>;
/**
* Fetches storage allocations for a given user
* @summary Allocation of user
* @param {number} fid The unique identifier of a farcaster user or app (unsigned integer)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations)
*
*/
lookupUserStorageAllocations(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageAllocationsResponse>>;
/**
* Fetches storage usage for a given user
* @summary Usage of user
* @param {number} fid The unique identifier of a farcaster user or app (unsigned integer)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageUsageResponse>} A promise that resolves to a `StorageUsageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage)
*
*/
lookupUserStorageUsage(fid: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StorageUsageResponse>>;
};
/**
* StorageApi - factory interface
* @export
*/
export declare const StorageApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.
* @summary Buy storage
* @param {StorageApiBuyStorageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage)
*
*/
buyStorage(requestParameters: StorageApiBuyStorageRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageAllocationsResponse>;
/**
* Fetches storage allocations for a given user
* @summary Allocation of user
* @param {StorageApiLookupUserStorageAllocationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations)
*
*/
lookupUserStorageAllocations(requestParameters: StorageApiLookupUserStorageAllocationsRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageAllocationsResponse>;
/**
* Fetches storage usage for a given user
* @summary Usage of user
* @param {StorageApiLookupUserStorageUsageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<StorageUsageResponse>} A promise that resolves to a `StorageUsageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage)
*
*/
lookupUserStorageUsage(requestParameters: StorageApiLookupUserStorageUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageUsageResponse>;
};
/**
* StorageApi - interface
* @export
* @interface StorageApi
*/
export interface StorageApiInterface {
/**
* This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.
* @summary Buy storage
* @param {StorageApiBuyStorageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApiInterface
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage)
*
*/
buyStorage(requestParameters: StorageApiBuyStorageRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageAllocationsResponse>;
/**
* Fetches storage allocations for a given user
* @summary Allocation of user
* @param {StorageApiLookupUserStorageAllocationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApiInterface
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations)
*
*/
lookupUserStorageAllocations(requestParameters: StorageApiLookupUserStorageAllocationsRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageAllocationsResponse>;
/**
* Fetches storage usage for a given user
* @summary Usage of user
* @param {StorageApiLookupUserStorageUsageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApiInterface
* @returns {Promise<StorageUsageResponse>} A promise that resolves to a `StorageUsageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage)
*
*/
lookupUserStorageUsage(requestParameters: StorageApiLookupUserStorageUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<StorageUsageResponse>;
}
/**
* Request parameters for buyStorage operation in StorageApi.
* @export
* @interface StorageApiBuyStorageRequest
*/
export interface StorageApiBuyStorageRequest {
/**
* Wallet ID to use for transactions
*
*
* @globalHeader
* @type {string}
* @memberof StorageApiBuyStorage
*/
readonly xWalletId: string;
/**
*
*
*
*
* @type {BuyStorageReqBody}
* @memberof StorageApiBuyStorage
*/
readonly buyStorageReqBody: BuyStorageReqBody;
}
/**
* Request parameters for lookupUserStorageAllocations operation in StorageApi.
* @export
* @interface StorageApiLookupUserStorageAllocationsRequest
*/
export interface StorageApiLookupUserStorageAllocationsRequest {
/**
* The unique identifier of a farcaster user or app (unsigned integer)
*
*
*
* @type {number}
* @memberof StorageApiLookupUserStorageAllocations
*/
readonly fid: number;
}
/**
* Request parameters for lookupUserStorageUsage operation in StorageApi.
* @export
* @interface StorageApiLookupUserStorageUsageRequest
*/
export interface StorageApiLookupUserStorageUsageRequest {
/**
* The unique identifier of a farcaster user or app (unsigned integer)
*
*
*
* @type {number}
* @memberof StorageApiLookupUserStorageUsage
*/
readonly fid: number;
}
/**
* StorageApi - object-oriented interface
* @export
* @class StorageApi
* @extends {BaseAPI}
*/
export declare class StorageApi extends BaseAPI implements StorageApiInterface {
/**
* This api will help you rent units of storage for an year for a specific FID. A storage unit lets you store 5000 casts, 2500 reactions and 2500 links. Requires x-wallet-id header.
* @summary Buy storage
* @param {StorageApiBuyStorageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApi
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/buy-storage)
*
*/
buyStorage(requestParameters: StorageApiBuyStorageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StorageAllocationsResponse, any, {}>>;
/**
* Fetches storage allocations for a given user
* @summary Allocation of user
* @param {StorageApiLookupUserStorageAllocationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApi
* @returns {Promise<StorageAllocationsResponse>} A promise that resolves to a `StorageAllocationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-allocations)
*
*/
lookupUserStorageAllocations(requestParameters: StorageApiLookupUserStorageAllocationsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StorageAllocationsResponse, any, {}>>;
/**
* Fetches storage usage for a given user
* @summary Usage of user
* @param {StorageApiLookupUserStorageUsageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof StorageApi
* @returns {Promise<StorageUsageResponse>} A promise that resolves to a `StorageUsageResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-user-storage-usage)
*
*/
lookupUserStorageUsage(requestParameters: StorageApiLookupUserStorageUsageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StorageUsageResponse, any, {}>>;
}