@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
851 lines (850 loc) • 43 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 { FetchRelevantFrames200Response } from '../models';
import type { FrameCatalogResponse } from '../models';
import type { FrameNotificationTokens } from '../models';
import type { GetNotificationCampaignStats200Response } from '../models';
import type { SendFrameNotificationsReqBody } from '../models';
import type { SendFrameNotificationsResponse } from '../models';
import type { TransactionFrameResponse } from '../models';
/**
* FrameApi - axios parameter creator
* @export
*/
export declare const FrameApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* A curated list of featured mini apps
* @summary Mini apps catalog
* @param {number} [limit] Number of results to fetch (Default: 100, Maximum: 100)
* @param {string} [cursor] Pagination cursor
* @param {FetchFrameCatalogTimeWindowEnum} [timeWindow] Time window used to calculate the change in trending score for each mini app, used to sort mini app results
* @param {Array<FetchFrameCatalogCategoriesEnum>} [categories] Comma separated list of categories to include in the results. Includes all if left blank. Example: categories=games,social OR categories=games&categories=social
* @param {Array<FetchFrameCatalogNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog)
*
*/
fetchFrameCatalog: (limit?: number, cursor?: string, timeWindow?: FetchFrameCatalogTimeWindowEnum, categories?: Array<FetchFrameCatalogCategoriesEnum>, networks?: Array<FetchFrameCatalogNetworksEnum>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns a list of notifications tokens related to a mini app
* @summary List of mini app notification tokens
* @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100)
* @param {string} [fids] Comma separated list of FIDs, up to 100 at a time. If you pass in FIDs, you will get back the notification tokens for those FIDs. If you don\'t pass in FIDs, you will get back all the notification tokens for the mini app.
* @param {string} [cursor] Pagination cursor
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameNotificationTokens>} A promise that resolves to a `FrameNotificationTokens` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens)
*
*/
fetchNotificationTokens: (limit?: number, fids?: string, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user
* @summary Relevant mini apps
* @param {number} viewerFid FID of the user to fetch relevant mini apps for
* @param {FetchRelevantFramesTimeWindowEnum} [timeWindow] Time window used to limit statistics used to calculate mini app relevance
* @param {Array<FetchRelevantFramesNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchRelevantFrames200Response>} A promise that resolves to a `FetchRelevantFrames200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames)
*
*/
fetchRelevantFrames: (viewerFid: number, timeWindow?: FetchRelevantFramesTimeWindowEnum, networks?: Array<FetchRelevantFramesNetworksEnum>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieve notification delivery and opened stats for notification campaigns
* @summary Get notification campaign stats
* @param {string} [campaignId] An ID of a specific notification campaign to query
* @param {number} [limit] The number of results to return (Default: 100, Maximum: 1000)
* @param {string} [cursor] Pagination cursor
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<GetNotificationCampaignStats200Response>} A promise that resolves to a `GetNotificationCampaignStats200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats)
*
*/
getNotificationCampaignStats: (campaignId?: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieves details about a transaction pay mini app by ID
* @summary Get transaction pay mini app
* @param {string} id ID of the transaction mini app to retrieve
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame)
*
*/
getTransactionPayFrame: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Send notifications to interactors of a mini app
* @summary Send notifications
* @param {SendFrameNotificationsReqBody} sendFrameNotificationsReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SendFrameNotificationsResponse>} A promise that resolves to a `SendFrameNotificationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications)
*
*/
publishFrameNotifications: (sendFrameNotificationsReqBody: SendFrameNotificationsReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Search for mini apps based on a query string
* @summary Search mini apps
* @param {string} q Query string to search for mini apps
* @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100)
* @param {string} [cursor] Pagination cursor
* @param {Array<SearchFramesNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames)
*
*/
searchFrames: (q: string, limit?: number, cursor?: string, networks?: Array<SearchFramesNetworksEnum>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* FrameApi - functional programming interface
* @export
*/
export declare const FrameApiFp: (configuration?: Configuration) => {
/**
* A curated list of featured mini apps
* @summary Mini apps catalog
* @param {number} [limit] Number of results to fetch (Default: 100, Maximum: 100)
* @param {string} [cursor] Pagination cursor
* @param {FetchFrameCatalogTimeWindowEnum} [timeWindow] Time window used to calculate the change in trending score for each mini app, used to sort mini app results
* @param {Array<FetchFrameCatalogCategoriesEnum>} [categories] Comma separated list of categories to include in the results. Includes all if left blank. Example: categories=games,social OR categories=games&categories=social
* @param {Array<FetchFrameCatalogNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog)
*
*/
fetchFrameCatalog(limit?: number, cursor?: string, timeWindow?: FetchFrameCatalogTimeWindowEnum, categories?: Array<FetchFrameCatalogCategoriesEnum>, networks?: Array<FetchFrameCatalogNetworksEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FrameCatalogResponse>>;
/**
* Returns a list of notifications tokens related to a mini app
* @summary List of mini app notification tokens
* @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100)
* @param {string} [fids] Comma separated list of FIDs, up to 100 at a time. If you pass in FIDs, you will get back the notification tokens for those FIDs. If you don\'t pass in FIDs, you will get back all the notification tokens for the mini app.
* @param {string} [cursor] Pagination cursor
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameNotificationTokens>} A promise that resolves to a `FrameNotificationTokens` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens)
*
*/
fetchNotificationTokens(limit?: number, fids?: string, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FrameNotificationTokens>>;
/**
* Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user
* @summary Relevant mini apps
* @param {number} viewerFid FID of the user to fetch relevant mini apps for
* @param {FetchRelevantFramesTimeWindowEnum} [timeWindow] Time window used to limit statistics used to calculate mini app relevance
* @param {Array<FetchRelevantFramesNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchRelevantFrames200Response>} A promise that resolves to a `FetchRelevantFrames200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames)
*
*/
fetchRelevantFrames(viewerFid: number, timeWindow?: FetchRelevantFramesTimeWindowEnum, networks?: Array<FetchRelevantFramesNetworksEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchRelevantFrames200Response>>;
/**
* Retrieve notification delivery and opened stats for notification campaigns
* @summary Get notification campaign stats
* @param {string} [campaignId] An ID of a specific notification campaign to query
* @param {number} [limit] The number of results to return (Default: 100, Maximum: 1000)
* @param {string} [cursor] Pagination cursor
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<GetNotificationCampaignStats200Response>} A promise that resolves to a `GetNotificationCampaignStats200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats)
*
*/
getNotificationCampaignStats(campaignId?: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetNotificationCampaignStats200Response>>;
/**
* Retrieves details about a transaction pay mini app by ID
* @summary Get transaction pay mini app
* @param {string} id ID of the transaction mini app to retrieve
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame)
*
*/
getTransactionPayFrame(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionFrameResponse>>;
/**
* Send notifications to interactors of a mini app
* @summary Send notifications
* @param {SendFrameNotificationsReqBody} sendFrameNotificationsReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SendFrameNotificationsResponse>} A promise that resolves to a `SendFrameNotificationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications)
*
*/
publishFrameNotifications(sendFrameNotificationsReqBody: SendFrameNotificationsReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendFrameNotificationsResponse>>;
/**
* Search for mini apps based on a query string
* @summary Search mini apps
* @param {string} q Query string to search for mini apps
* @param {number} [limit] Number of results to fetch (Default: 20, Maximum: 100)
* @param {string} [cursor] Pagination cursor
* @param {Array<SearchFramesNetworksEnum>} [networks] List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames)
*
*/
searchFrames(q: string, limit?: number, cursor?: string, networks?: Array<SearchFramesNetworksEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FrameCatalogResponse>>;
};
/**
* FrameApi - factory interface
* @export
*/
export declare const FrameApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* A curated list of featured mini apps
* @summary Mini apps catalog
* @param {FrameApiFetchFrameCatalogRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog)
*
*/
fetchFrameCatalog(requestParameters?: FrameApiFetchFrameCatalogRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameCatalogResponse>;
/**
* Returns a list of notifications tokens related to a mini app
* @summary List of mini app notification tokens
* @param {FrameApiFetchNotificationTokensRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameNotificationTokens>} A promise that resolves to a `FrameNotificationTokens` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens)
*
*/
fetchNotificationTokens(requestParameters?: FrameApiFetchNotificationTokensRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameNotificationTokens>;
/**
* Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user
* @summary Relevant mini apps
* @param {FrameApiFetchRelevantFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchRelevantFrames200Response>} A promise that resolves to a `FetchRelevantFrames200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames)
*
*/
fetchRelevantFrames(requestParameters: FrameApiFetchRelevantFramesRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchRelevantFrames200Response>;
/**
* Retrieve notification delivery and opened stats for notification campaigns
* @summary Get notification campaign stats
* @param {FrameApiGetNotificationCampaignStatsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<GetNotificationCampaignStats200Response>} A promise that resolves to a `GetNotificationCampaignStats200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats)
*
*/
getNotificationCampaignStats(requestParameters?: FrameApiGetNotificationCampaignStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetNotificationCampaignStats200Response>;
/**
* Retrieves details about a transaction pay mini app by ID
* @summary Get transaction pay mini app
* @param {FrameApiGetTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame)
*
*/
getTransactionPayFrame(requestParameters: FrameApiGetTransactionPayFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionFrameResponse>;
/**
* Send notifications to interactors of a mini app
* @summary Send notifications
* @param {FrameApiPublishFrameNotificationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SendFrameNotificationsResponse>} A promise that resolves to a `SendFrameNotificationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications)
*
*/
publishFrameNotifications(requestParameters: FrameApiPublishFrameNotificationsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SendFrameNotificationsResponse>;
/**
* Search for mini apps based on a query string
* @summary Search mini apps
* @param {FrameApiSearchFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames)
*
*/
searchFrames(requestParameters: FrameApiSearchFramesRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameCatalogResponse>;
};
/**
* FrameApi - interface
* @export
* @interface FrameApi
*/
export interface FrameApiInterface {
/**
* A curated list of featured mini apps
* @summary Mini apps catalog
* @param {FrameApiFetchFrameCatalogRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog)
*
*/
fetchFrameCatalog(requestParameters?: FrameApiFetchFrameCatalogRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameCatalogResponse>;
/**
* Returns a list of notifications tokens related to a mini app
* @summary List of mini app notification tokens
* @param {FrameApiFetchNotificationTokensRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<FrameNotificationTokens>} A promise that resolves to a `FrameNotificationTokens` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens)
*
*/
fetchNotificationTokens(requestParameters?: FrameApiFetchNotificationTokensRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameNotificationTokens>;
/**
* Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user
* @summary Relevant mini apps
* @param {FrameApiFetchRelevantFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<FetchRelevantFrames200Response>} A promise that resolves to a `FetchRelevantFrames200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames)
*
*/
fetchRelevantFrames(requestParameters: FrameApiFetchRelevantFramesRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchRelevantFrames200Response>;
/**
* Retrieve notification delivery and opened stats for notification campaigns
* @summary Get notification campaign stats
* @param {FrameApiGetNotificationCampaignStatsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<GetNotificationCampaignStats200Response>} A promise that resolves to a `GetNotificationCampaignStats200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats)
*
*/
getNotificationCampaignStats(requestParameters?: FrameApiGetNotificationCampaignStatsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetNotificationCampaignStats200Response>;
/**
* Retrieves details about a transaction pay mini app by ID
* @summary Get transaction pay mini app
* @param {FrameApiGetTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame)
*
*/
getTransactionPayFrame(requestParameters: FrameApiGetTransactionPayFrameRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionFrameResponse>;
/**
* Send notifications to interactors of a mini app
* @summary Send notifications
* @param {FrameApiPublishFrameNotificationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<SendFrameNotificationsResponse>} A promise that resolves to a `SendFrameNotificationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications)
*
*/
publishFrameNotifications(requestParameters: FrameApiPublishFrameNotificationsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SendFrameNotificationsResponse>;
/**
* Search for mini apps based on a query string
* @summary Search mini apps
* @param {FrameApiSearchFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApiInterface
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames)
*
*/
searchFrames(requestParameters: FrameApiSearchFramesRequest, options?: RawAxiosRequestConfig): AxiosPromise<FrameCatalogResponse>;
}
/**
* Request parameters for fetchFrameCatalog operation in FrameApi.
* @export
* @interface FrameApiFetchFrameCatalogRequest
*/
export interface FrameApiFetchFrameCatalogRequest {
/**
* Number of results to fetch (Default: 100, Maximum: 100)
*
*
*
* @type {number}
* @memberof FrameApiFetchFrameCatalog
*/
readonly limit?: number;
/**
* Pagination cursor
*
*
*
* @type {string}
* @memberof FrameApiFetchFrameCatalog
*/
readonly cursor?: string;
/**
* Time window used to calculate the change in trending score for each mini app, used to sort mini app results
*
*
*
* @type {'1h' | '6h' | '12h' | '24h' | '7d'}
* @memberof FrameApiFetchFrameCatalog
*/
readonly timeWindow?: FetchFrameCatalogTimeWindowEnum;
/**
* Comma separated list of categories to include in the results. Includes all if left blank. Example: categories=games,social OR categories=games&categories=social
*
*
*
* @type {Array<'games' | 'social' | 'finance' | 'utility' | 'productivity' | 'health-fitness' | 'news-media' | 'music' | 'shopping' | 'education' | 'developer-tools' | 'entertainment' | 'art-creativity'>}
* @memberof FrameApiFetchFrameCatalog
*/
readonly categories?: Array<FetchFrameCatalogCategoriesEnum>;
/**
* List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
*
*
*
* @type {Array<'ethereum' | 'base' | 'arbitrum' | 'arbitrum-sepolia' | 'base-sepolia' | 'degen' | 'gnosis' | 'optimism' | 'optimism-sepolia' | 'polygon' | 'ethereum-sepolia' | 'zora' | 'unichain' | 'monad-testnet' | 'celo' | 'solana'>}
* @memberof FrameApiFetchFrameCatalog
*/
readonly networks?: Array<FetchFrameCatalogNetworksEnum>;
}
/**
* Request parameters for fetchNotificationTokens operation in FrameApi.
* @export
* @interface FrameApiFetchNotificationTokensRequest
*/
export interface FrameApiFetchNotificationTokensRequest {
/**
* Number of results to fetch (Default: 20, Maximum: 100)
*
*
*
* @type {number}
* @memberof FrameApiFetchNotificationTokens
*/
readonly limit?: number;
/**
* Comma separated list of FIDs, up to 100 at a time. If you pass in FIDs, you will get back the notification tokens for those FIDs. If you don\'t pass in FIDs, you will get back all the notification tokens for the mini app.
* @acceptAs integer
* @commaSeparated
*
* @type {string}
* @memberof FrameApiFetchNotificationTokens
*/
readonly fids?: string;
/**
* Pagination cursor
*
*
*
* @type {string}
* @memberof FrameApiFetchNotificationTokens
*/
readonly cursor?: string;
}
/**
* Request parameters for fetchRelevantFrames operation in FrameApi.
* @export
* @interface FrameApiFetchRelevantFramesRequest
*/
export interface FrameApiFetchRelevantFramesRequest {
/**
* FID of the user to fetch relevant mini apps for
*
*
*
* @type {number}
* @memberof FrameApiFetchRelevantFrames
*/
readonly viewerFid: number;
/**
* Time window used to limit statistics used to calculate mini app relevance
*
*
*
* @type {'1h' | '6h' | '12h' | '24h' | '7d'}
* @memberof FrameApiFetchRelevantFrames
*/
readonly timeWindow?: FetchRelevantFramesTimeWindowEnum;
/**
* List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
*
*
*
* @type {Array<'ethereum' | 'base' | 'arbitrum' | 'arbitrum-sepolia' | 'base-sepolia' | 'degen' | 'gnosis' | 'optimism' | 'optimism-sepolia' | 'polygon' | 'ethereum-sepolia' | 'zora' | 'unichain' | 'monad-testnet' | 'celo' | 'solana'>}
* @memberof FrameApiFetchRelevantFrames
*/
readonly networks?: Array<FetchRelevantFramesNetworksEnum>;
}
/**
* Request parameters for getNotificationCampaignStats operation in FrameApi.
* @export
* @interface FrameApiGetNotificationCampaignStatsRequest
*/
export interface FrameApiGetNotificationCampaignStatsRequest {
/**
* An ID of a specific notification campaign to query
*
*
*
* @type {string}
* @memberof FrameApiGetNotificationCampaignStats
*/
readonly campaignId?: string;
/**
* The number of results to return (Default: 100, Maximum: 1000)
*
*
*
* @type {number}
* @memberof FrameApiGetNotificationCampaignStats
*/
readonly limit?: number;
/**
* Pagination cursor
*
*
*
* @type {string}
* @memberof FrameApiGetNotificationCampaignStats
*/
readonly cursor?: string;
}
/**
* Request parameters for getTransactionPayFrame operation in FrameApi.
* @export
* @interface FrameApiGetTransactionPayFrameRequest
*/
export interface FrameApiGetTransactionPayFrameRequest {
/**
* ID of the transaction mini app to retrieve
*
*
*
* @type {string}
* @memberof FrameApiGetTransactionPayFrame
*/
readonly id: string;
}
/**
* Request parameters for publishFrameNotifications operation in FrameApi.
* @export
* @interface FrameApiPublishFrameNotificationsRequest
*/
export interface FrameApiPublishFrameNotificationsRequest {
/**
*
*
*
*
* @type {SendFrameNotificationsReqBody}
* @memberof FrameApiPublishFrameNotifications
*/
readonly sendFrameNotificationsReqBody: SendFrameNotificationsReqBody;
}
/**
* Request parameters for searchFrames operation in FrameApi.
* @export
* @interface FrameApiSearchFramesRequest
*/
export interface FrameApiSearchFramesRequest {
/**
* Query string to search for mini apps
*
*
*
* @type {string}
* @memberof FrameApiSearchFrames
*/
readonly q: string;
/**
* Number of results to fetch (Default: 20, Maximum: 100)
*
*
*
* @type {number}
* @memberof FrameApiSearchFrames
*/
readonly limit?: number;
/**
* Pagination cursor
*
*
*
* @type {string}
* @memberof FrameApiSearchFrames
*/
readonly cursor?: string;
/**
* List of blockchain networks by which to filter results. Mini apps included in the results will specify at least one of the supplied networks or specify none. The list can be provided as comma-separated string or array.
*
*
*
* @type {Array<'ethereum' | 'base' | 'arbitrum' | 'arbitrum-sepolia' | 'base-sepolia' | 'degen' | 'gnosis' | 'optimism' | 'optimism-sepolia' | 'polygon' | 'ethereum-sepolia' | 'zora' | 'unichain' | 'monad-testnet' | 'celo' | 'solana'>}
* @memberof FrameApiSearchFrames
*/
readonly networks?: Array<SearchFramesNetworksEnum>;
}
/**
* FrameApi - object-oriented interface
* @export
* @class FrameApi
* @extends {BaseAPI}
*/
export declare class FrameApi extends BaseAPI implements FrameApiInterface {
/**
* A curated list of featured mini apps
* @summary Mini apps catalog
* @param {FrameApiFetchFrameCatalogRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-frame-catalog)
*
*/
fetchFrameCatalog(requestParameters?: FrameApiFetchFrameCatalogRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FrameCatalogResponse, any, {}>>;
/**
* Returns a list of notifications tokens related to a mini app
* @summary List of mini app notification tokens
* @param {FrameApiFetchNotificationTokensRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<FrameNotificationTokens>} A promise that resolves to a `FrameNotificationTokens` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-notification-tokens)
*
*/
fetchNotificationTokens(requestParameters?: FrameApiFetchNotificationTokensRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FrameNotificationTokens, any, {}>>;
/**
* Fetch a list of mini apps relevant to the user based on casts by users with strong affinity score for the user
* @summary Relevant mini apps
* @param {FrameApiFetchRelevantFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<FetchRelevantFrames200Response>} A promise that resolves to a `FetchRelevantFrames200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-frames)
*
*/
fetchRelevantFrames(requestParameters: FrameApiFetchRelevantFramesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchRelevantFrames200Response, any, {}>>;
/**
* Retrieve notification delivery and opened stats for notification campaigns
* @summary Get notification campaign stats
* @param {FrameApiGetNotificationCampaignStatsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<GetNotificationCampaignStats200Response>} A promise that resolves to a `GetNotificationCampaignStats200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-notification-campaign-stats)
*
*/
getNotificationCampaignStats(requestParameters?: FrameApiGetNotificationCampaignStatsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNotificationCampaignStats200Response, any, {}>>;
/**
* Retrieves details about a transaction pay mini app by ID
* @summary Get transaction pay mini app
* @param {FrameApiGetTransactionPayFrameRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<TransactionFrameResponse>} A promise that resolves to a `TransactionFrameResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-transaction-pay-frame)
*
*/
getTransactionPayFrame(requestParameters: FrameApiGetTransactionPayFrameRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TransactionFrameResponse, any, {}>>;
/**
* Send notifications to interactors of a mini app
* @summary Send notifications
* @param {FrameApiPublishFrameNotificationsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<SendFrameNotificationsResponse>} A promise that resolves to a `SendFrameNotificationsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/publish-frame-notifications)
*
*/
publishFrameNotifications(requestParameters: FrameApiPublishFrameNotificationsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SendFrameNotificationsResponse, any, {}>>;
/**
* Search for mini apps based on a query string
* @summary Search mini apps
* @param {FrameApiSearchFramesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FrameApi
* @returns {Promise<FrameCatalogResponse>} A promise that resolves to a `FrameCatalogResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/search-frames)
*
*/
searchFrames(requestParameters: FrameApiSearchFramesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FrameCatalogResponse, any, {}>>;
}
/**
* @export
*/
export declare const FetchFrameCatalogTimeWindowEnum: {
readonly _1h: "1h";
readonly _6h: "6h";
readonly _12h: "12h";
readonly _24h: "24h";
readonly _7d: "7d";
};
export type FetchFrameCatalogTimeWindowEnum = typeof FetchFrameCatalogTimeWindowEnum[keyof typeof FetchFrameCatalogTimeWindowEnum];
/**
* @export
*/
export declare const FetchFrameCatalogCategoriesEnum: {
readonly Games: "games";
readonly Social: "social";
readonly Finance: "finance";
readonly Utility: "utility";
readonly Productivity: "productivity";
readonly HealthFitness: "health-fitness";
readonly NewsMedia: "news-media";
readonly Music: "music";
readonly Shopping: "shopping";
readonly Education: "education";
readonly DeveloperTools: "developer-tools";
readonly Entertainment: "entertainment";
readonly ArtCreativity: "art-creativity";
};
export type FetchFrameCatalogCategoriesEnum = typeof FetchFrameCatalogCategoriesEnum[keyof typeof FetchFrameCatalogCategoriesEnum];
/**
* @export
*/
export declare const FetchFrameCatalogNetworksEnum: {
readonly Ethereum: "ethereum";
readonly Base: "base";
readonly Arbitrum: "arbitrum";
readonly ArbitrumSepolia: "arbitrum-sepolia";
readonly BaseSepolia: "base-sepolia";
readonly Degen: "degen";
readonly Gnosis: "gnosis";
readonly Optimism: "optimism";
readonly OptimismSepolia: "optimism-sepolia";
readonly Polygon: "polygon";
readonly EthereumSepolia: "ethereum-sepolia";
readonly Zora: "zora";
readonly Unichain: "unichain";
readonly MonadTestnet: "monad-testnet";
readonly Celo: "celo";
readonly Solana: "solana";
};
export type FetchFrameCatalogNetworksEnum = typeof FetchFrameCatalogNetworksEnum[keyof typeof FetchFrameCatalogNetworksEnum];
/**
* @export
*/
export declare const FetchRelevantFramesTimeWindowEnum: {
readonly _1h: "1h";
readonly _6h: "6h";
readonly _12h: "12h";
readonly _24h: "24h";
readonly _7d: "7d";
};
export type FetchRelevantFramesTimeWindowEnum = typeof FetchRelevantFramesTimeWindowEnum[keyof typeof FetchRelevantFramesTimeWindowEnum];
/**
* @export
*/
export declare const FetchRelevantFramesNetworksEnum: {
readonly Ethereum: "ethereum";
readonly Base: "base";
readonly Arbitrum: "arbitrum";
readonly ArbitrumSepolia: "arbitrum-sepolia";
readonly BaseSepolia: "base-sepolia";
readonly Degen: "degen";
readonly Gnosis: "gnosis";
readonly Optimism: "optimism";
readonly OptimismSepolia: "optimism-sepolia";
readonly Polygon: "polygon";
readonly EthereumSepolia: "ethereum-sepolia";
readonly Zora: "zora";
readonly Unichain: "unichain";
readonly MonadTestnet: "monad-testnet";
readonly Celo: "celo";
readonly Solana: "solana";
};
export type FetchRelevantFramesNetworksEnum = typeof FetchRelevantFramesNetworksEnum[keyof typeof FetchRelevantFramesNetworksEnum];
/**
* @export
*/
export declare const SearchFramesNetworksEnum: {
readonly Ethereum: "ethereum";
readonly Base: "base";
readonly Arbitrum: "arbitrum";
readonly ArbitrumSepolia: "arbitrum-sepolia";
readonly BaseSepolia: "base-sepolia";
readonly Degen: "degen";
readonly Gnosis: "gnosis";
readonly Optimism: "optimism";
readonly OptimismSepolia: "optimism-sepolia";
readonly Polygon: "polygon";
readonly EthereumSepolia: "ethereum-sepolia";
readonly Zora: "zora";
readonly Unichain: "unichain";
readonly MonadTestnet: "monad-testnet";
readonly Celo: "celo";
readonly Solana: "solana";
};
export type SearchFramesNetworksEnum = typeof SearchFramesNetworksEnum[keyof typeof SearchFramesNetworksEnum];