UNPKG

@neynar/nodejs-sdk

Version:

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

226 lines (225 loc) 11 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.175.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 { Upgrade200Response } from '../models'; import type { UpgradePreview200Response } from '../models'; import type { UpgradeRequest } from '../models'; /** * SubscriptionApi - axios parameter creator * @export */ export declare const SubscriptionApiAxiosParamCreator: (configuration?: Configuration) => { /** * Applies a subscription plan change for the current organization and returns the applied credit, charge amount, and whether the change takes effect immediately. * @summary Process subscription upgrade with credit * @param {UpgradeRequest} upgradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<Upgrade200Response>} A promise that resolves to a `Upgrade200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade) * */ upgrade: (upgradeRequest: UpgradeRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Calculates the billing impact of changing to a new subscription plan, including available credit, charge amount, and whether the billing date or usage carryover changes. * @summary Get upgrade preview with credit calculation * @param {string} newPlan * @param {UpgradePreviewProductCategoryEnum} [productCategory] * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpgradePreview200Response>} A promise that resolves to a `UpgradePreview200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade-preview) * */ upgradePreview: (newPlan: string, productCategory?: UpgradePreviewProductCategoryEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * SubscriptionApi - functional programming interface * @export */ export declare const SubscriptionApiFp: (configuration?: Configuration) => { /** * Applies a subscription plan change for the current organization and returns the applied credit, charge amount, and whether the change takes effect immediately. * @summary Process subscription upgrade with credit * @param {UpgradeRequest} upgradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<Upgrade200Response>} A promise that resolves to a `Upgrade200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade) * */ upgrade(upgradeRequest: UpgradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Upgrade200Response>>; /** * Calculates the billing impact of changing to a new subscription plan, including available credit, charge amount, and whether the billing date or usage carryover changes. * @summary Get upgrade preview with credit calculation * @param {string} newPlan * @param {UpgradePreviewProductCategoryEnum} [productCategory] * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpgradePreview200Response>} A promise that resolves to a `UpgradePreview200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade-preview) * */ upgradePreview(newPlan: string, productCategory?: UpgradePreviewProductCategoryEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpgradePreview200Response>>; }; /** * SubscriptionApi - factory interface * @export */ export declare const SubscriptionApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Applies a subscription plan change for the current organization and returns the applied credit, charge amount, and whether the change takes effect immediately. * @summary Process subscription upgrade with credit * @param {SubscriptionApiUpgradeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<Upgrade200Response>} A promise that resolves to a `Upgrade200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade) * */ upgrade(requestParameters: SubscriptionApiUpgradeRequest, options?: RawAxiosRequestConfig): AxiosPromise<Upgrade200Response>; /** * Calculates the billing impact of changing to a new subscription plan, including available credit, charge amount, and whether the billing date or usage carryover changes. * @summary Get upgrade preview with credit calculation * @param {SubscriptionApiUpgradePreviewRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpgradePreview200Response>} A promise that resolves to a `UpgradePreview200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade-preview) * */ upgradePreview(requestParameters: SubscriptionApiUpgradePreviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<UpgradePreview200Response>; }; /** * SubscriptionApi - interface * @export * @interface SubscriptionApi */ export interface SubscriptionApiInterface { /** * Applies a subscription plan change for the current organization and returns the applied credit, charge amount, and whether the change takes effect immediately. * @summary Process subscription upgrade with credit * @param {SubscriptionApiUpgradeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SubscriptionApiInterface * @returns {Promise<Upgrade200Response>} A promise that resolves to a `Upgrade200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade) * */ upgrade(requestParameters: SubscriptionApiUpgradeRequest, options?: RawAxiosRequestConfig): AxiosPromise<Upgrade200Response>; /** * Calculates the billing impact of changing to a new subscription plan, including available credit, charge amount, and whether the billing date or usage carryover changes. * @summary Get upgrade preview with credit calculation * @param {SubscriptionApiUpgradePreviewRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SubscriptionApiInterface * @returns {Promise<UpgradePreview200Response>} A promise that resolves to a `UpgradePreview200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade-preview) * */ upgradePreview(requestParameters: SubscriptionApiUpgradePreviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<UpgradePreview200Response>; } /** * Request parameters for upgrade operation in SubscriptionApi. * @export * @interface SubscriptionApiUpgradeRequest */ export interface SubscriptionApiUpgradeRequest { /** * * * * * @type {UpgradeRequest} * @memberof SubscriptionApiUpgrade */ readonly upgradeRequest: UpgradeRequest; } /** * Request parameters for upgradePreview operation in SubscriptionApi. * @export * @interface SubscriptionApiUpgradePreviewRequest */ export interface SubscriptionApiUpgradePreviewRequest { /** * * * * * @type {string} * @memberof SubscriptionApiUpgradePreview */ readonly newPlan: string; /** * * * * * @type {'API' | 'STUDIO'} * @memberof SubscriptionApiUpgradePreview */ readonly productCategory?: UpgradePreviewProductCategoryEnum; } /** * SubscriptionApi - object-oriented interface * @export * @class SubscriptionApi * @extends {BaseAPI} */ export declare class SubscriptionApi extends BaseAPI implements SubscriptionApiInterface { /** * Applies a subscription plan change for the current organization and returns the applied credit, charge amount, and whether the change takes effect immediately. * @summary Process subscription upgrade with credit * @param {SubscriptionApiUpgradeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SubscriptionApi * @returns {Promise<Upgrade200Response>} A promise that resolves to a `Upgrade200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade) * */ upgrade(requestParameters: SubscriptionApiUpgradeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Upgrade200Response, any, {}>>; /** * Calculates the billing impact of changing to a new subscription plan, including available credit, charge amount, and whether the billing date or usage carryover changes. * @summary Get upgrade preview with credit calculation * @param {SubscriptionApiUpgradePreviewRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SubscriptionApi * @returns {Promise<UpgradePreview200Response>} A promise that resolves to a `UpgradePreview200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upgrade-preview) * */ upgradePreview(requestParameters: SubscriptionApiUpgradePreviewRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UpgradePreview200Response, any, {}>>; } /** * @export */ export declare const UpgradePreviewProductCategoryEnum: { readonly Api: "API"; readonly Studio: "STUDIO"; }; export type UpgradePreviewProductCategoryEnum = typeof UpgradePreviewProductCategoryEnum[keyof typeof UpgradePreviewProductCategoryEnum];