UNPKG

@forestvpn/forestvpn_api

Version:

A package to interact api.forestvpn.com (manage vpn profiles, check usage statistics, manage locations, ...)

287 lines (286 loc) 12.8 kB
/** * ForestVPN API * ForestVPN - Fast, secure, and modern VPN. It offers Distributed Computing, Crypto Mining, P2P, Ad Blocking, TOR over VPN, 30+ locations, and a free version with unlimited data. * * OpenAPI spec version: 2.0 * Contact: support@forestvpn.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { Referral } from '../models'; import { ReferralProfile } from '../models'; import { ReferralTransaction } from '../models'; import { ReferralTransactionType } from '../models'; /** * ReferralApi - axios parameter creator * @export */ export declare const ReferralApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @summary Apply referral code * @param {string} referral_code * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyReferralCodeForm: (referral_code: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Claim referral transaction * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ claimReferralTransaction: (transactionID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get referral transaction detail * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReferralTransaction: (transactionID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get referral transactions * @param {Array<string>} [sort] Sort by provided field * @param {Array<string>} [currency] Filter by currency * @param {Array<ReferralTransactionType>} [type] Transaction type * @param {Date} [created_at_after] * @param {Date} [created_at_before] * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferralTransactions: (sort?: Array<string>, currency?: Array<string>, type?: Array<ReferralTransactionType>, created_at_after?: Date, created_at_before?: Date, per_page?: number, page?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get referrals list * @param {string} [q] Search query * @param {string} [sort] Sort by provided field * @param {Date} [invited_at_after] Filter by invited date-time after provided value * @param {Date} [invited_at_before] Filter by invited date-time before provided value * @param {boolean} [is_premium] Filter by invitees is_premium status * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferrals: (q?: string, sort?: string, invited_at_after?: Date, invited_at_before?: Date, is_premium?: boolean, per_page?: number, page?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Referral Program. Profile * @param {*} [options] Override http request option. * @throws {RequiredError} */ referralProfileDetail: (options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * ReferralApi - functional programming interface * @export */ export declare const ReferralApiFp: (configuration?: Configuration) => { /** * * @summary Apply referral code * @param {string} referral_code * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyReferralCodeForm(referral_code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>; /** * * @summary Claim referral transaction * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReferralTransaction>>>; /** * * @summary Get referral transaction detail * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReferralTransaction>>>; /** * * @summary Get referral transactions * @param {Array<string>} [sort] Sort by provided field * @param {Array<string>} [currency] Filter by currency * @param {Array<ReferralTransactionType>} [type] Transaction type * @param {Date} [created_at_after] * @param {Date} [created_at_before] * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferralTransactions(sort?: Array<string>, currency?: Array<string>, type?: Array<ReferralTransactionType>, created_at_after?: Date, created_at_before?: Date, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ReferralTransaction>>>>; /** * * @summary Get referrals list * @param {string} [q] Search query * @param {string} [sort] Sort by provided field * @param {Date} [invited_at_after] Filter by invited date-time after provided value * @param {Date} [invited_at_before] Filter by invited date-time before provided value * @param {boolean} [is_premium] Filter by invitees is_premium status * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferrals(q?: string, sort?: string, invited_at_after?: Date, invited_at_before?: Date, is_premium?: boolean, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Referral>>>>; /** * * @summary Referral Program. Profile * @param {*} [options] Override http request option. * @throws {RequiredError} */ referralProfileDetail(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReferralProfile>>>; }; /** * ReferralApi - factory interface * @export */ export declare const ReferralApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @summary Apply referral code * @param {string} referral_code * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyReferralCodeForm(referral_code: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>; /** * * @summary Claim referral transaction * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>>; /** * * @summary Get referral transaction detail * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>>; /** * * @summary Get referral transactions * @param {Array<string>} [sort] Sort by provided field * @param {Array<string>} [currency] Filter by currency * @param {Array<ReferralTransactionType>} [type] Transaction type * @param {Date} [created_at_after] * @param {Date} [created_at_before] * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferralTransactions(sort?: Array<string>, currency?: Array<string>, type?: Array<ReferralTransactionType>, created_at_after?: Date, created_at_before?: Date, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ReferralTransaction>>>; /** * * @summary Get referrals list * @param {string} [q] Search query * @param {string} [sort] Sort by provided field * @param {Date} [invited_at_after] Filter by invited date-time after provided value * @param {Date} [invited_at_before] Filter by invited date-time before provided value * @param {boolean} [is_premium] Filter by invitees is_premium status * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listReferrals(q?: string, sort?: string, invited_at_after?: Date, invited_at_before?: Date, is_premium?: boolean, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Referral>>>; /** * * @summary Referral Program. Profile * @param {*} [options] Override http request option. * @throws {RequiredError} */ referralProfileDetail(options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralProfile>>; }; /** * ReferralApi - object-oriented interface * @export * @class ReferralApi * @extends {BaseAPI} */ export declare class ReferralApi extends BaseAPI { /** * * @summary Apply referral code * @param {string} referral_code * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ applyReferralCodeForm(referral_code: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>; /** * * @summary Claim referral transaction * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>>; /** * * @summary Get referral transaction detail * @param {string} transactionID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ getReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>>; /** * * @summary Get referral transactions * @param {Array<string>} [sort] Sort by provided field * @param {Array<string>} [currency] Filter by currency * @param {Array<ReferralTransactionType>} [type] Transaction type * @param {Date} [created_at_after] * @param {Date} [created_at_before] * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ listReferralTransactions(sort?: Array<string>, currency?: Array<string>, type?: Array<ReferralTransactionType>, created_at_after?: Date, created_at_before?: Date, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ReferralTransaction>>>; /** * * @summary Get referrals list * @param {string} [q] Search query * @param {string} [sort] Sort by provided field * @param {Date} [invited_at_after] Filter by invited date-time after provided value * @param {Date} [invited_at_before] Filter by invited date-time before provided value * @param {boolean} [is_premium] Filter by invitees is_premium status * @param {number} [per_page] * @param {number} [page] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ listReferrals(q?: string, sort?: string, invited_at_after?: Date, invited_at_before?: Date, is_premium?: boolean, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Referral>>>; /** * * @summary Referral Program. Profile * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ReferralApi */ referralProfileDetail(options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralProfile>>; }