@forestvpn/forestvpn_api
Version:
A package to interact api.forestvpn.com (manage vpn profiles, check usage statistics, manage locations, ...)
451 lines (450 loc) • 18.5 kB
TypeScript
/**
* 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 { AggregatedFunctionStats } from '../models';
import { ModelFunction } from '../models';
import { Task } from '../models';
/**
* CloudApi - axios parameter creator
* @export
*/
export declare const CloudApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Create function
* @param {ModelFunction} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFunction: (body: ModelFunction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Delete Function
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteFunction: (functionID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Delete Task
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteTask: (taskID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Function Info
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunction: (functionID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Functions stats for each function
* @summary Function Stats
* @param {string} aggr_interval No more than 3 days for hour aggregation type
* @param {string} [assignment_date_after] No more than 3 months between assignment_date_after and assignment_date_before
* @param {string} [assignment_date_before] No more than 3 months between assignment_date_after and assignment_date_before
* @param {Array<string>} [function__in] Filter by function
* @param {string} [sort_by] Sort output by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunctionStats: (aggr_interval: string, assignment_date_after?: string, assignment_date_before?: string, function__in?: Array<string>, sort_by?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Task Info
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTask: (taskID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Std data
* @param {string} task_id
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTaskStdDataCache: (task_id: string, per_page?: number, page?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieve cloud functions list
* @summary Functions List
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listFunctions: (per_page?: number, page?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieve cloud tasks list
* @summary Tasks List
* @param {number} [per_page]
* @param {number} [page]
* @param {Array<string>} [function__in] Filter by function
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tasksFunctions: (per_page?: number, page?: number, function__in?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Update function properties
* @param {ModelFunction} body
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateFunction: (body: ModelFunction, functionID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Update task properties
* @param {Task} body
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateTask: (body: Task, taskID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* CloudApi - functional programming interface
* @export
*/
export declare const CloudApiFp: (configuration?: Configuration) => {
/**
*
* @summary Create function
* @param {ModelFunction} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFunction(body: ModelFunction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ModelFunction>>>;
/**
*
* @summary Delete Function
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteFunction(functionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
/**
*
* @summary Delete Task
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteTask(taskID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
/**
*
* @summary Function Info
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunction(functionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ModelFunction>>>;
/**
* Functions stats for each function
* @summary Function Stats
* @param {string} aggr_interval No more than 3 days for hour aggregation type
* @param {string} [assignment_date_after] No more than 3 months between assignment_date_after and assignment_date_before
* @param {string} [assignment_date_before] No more than 3 months between assignment_date_after and assignment_date_before
* @param {Array<string>} [function__in] Filter by function
* @param {string} [sort_by] Sort output by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunctionStats(aggr_interval: string, assignment_date_after?: string, assignment_date_before?: string, function__in?: Array<string>, sort_by?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<AggregatedFunctionStats>>>>;
/**
*
* @summary Task Info
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTask(taskID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Task>>>;
/**
*
* @summary Std data
* @param {string} task_id
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTaskStdDataCache(task_id: string, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<string>>>>;
/**
* Retrieve cloud functions list
* @summary Functions List
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listFunctions(per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ModelFunction>>>>;
/**
* Retrieve cloud tasks list
* @summary Tasks List
* @param {number} [per_page]
* @param {number} [page]
* @param {Array<string>} [function__in] Filter by function
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tasksFunctions(per_page?: number, page?: number, function__in?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Task>>>>;
/**
*
* @summary Update function properties
* @param {ModelFunction} body
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateFunction(body: ModelFunction, functionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ModelFunction>>>;
/**
*
* @summary Update task properties
* @param {Task} body
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateTask(body: Task, taskID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Task>>>;
};
/**
* CloudApi - factory interface
* @export
*/
export declare const CloudApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Create function
* @param {ModelFunction} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFunction(body: ModelFunction, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
*
* @summary Delete Function
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteFunction(functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
/**
*
* @summary Delete Task
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteTask(taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
/**
*
* @summary Function Info
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunction(functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
* Functions stats for each function
* @summary Function Stats
* @param {string} aggr_interval No more than 3 days for hour aggregation type
* @param {string} [assignment_date_after] No more than 3 months between assignment_date_after and assignment_date_before
* @param {string} [assignment_date_before] No more than 3 months between assignment_date_after and assignment_date_before
* @param {Array<string>} [function__in] Filter by function
* @param {string} [sort_by] Sort output by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFunctionStats(aggr_interval: string, assignment_date_after?: string, assignment_date_before?: string, function__in?: Array<string>, sort_by?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<AggregatedFunctionStats>>>;
/**
*
* @summary Task Info
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTask(taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Task>>;
/**
*
* @summary Std data
* @param {string} task_id
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTaskStdDataCache(task_id: string, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<string>>>;
/**
* Retrieve cloud functions list
* @summary Functions List
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listFunctions(per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ModelFunction>>>;
/**
* Retrieve cloud tasks list
* @summary Tasks List
* @param {number} [per_page]
* @param {number} [page]
* @param {Array<string>} [function__in] Filter by function
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tasksFunctions(per_page?: number, page?: number, function__in?: Array<string>, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Task>>>;
/**
*
* @summary Update function properties
* @param {ModelFunction} body
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateFunction(body: ModelFunction, functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
*
* @summary Update task properties
* @param {Task} body
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateTask(body: Task, taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Task>>;
};
/**
* CloudApi - object-oriented interface
* @export
* @class CloudApi
* @extends {BaseAPI}
*/
export declare class CloudApi extends BaseAPI {
/**
*
* @summary Create function
* @param {ModelFunction} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
createFunction(body: ModelFunction, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
*
* @summary Delete Function
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
deleteFunction(functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
/**
*
* @summary Delete Task
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
deleteTask(taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
/**
*
* @summary Function Info
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
getFunction(functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
* Functions stats for each function
* @summary Function Stats
* @param {string} aggr_interval No more than 3 days for hour aggregation type
* @param {string} [assignment_date_after] No more than 3 months between assignment_date_after and assignment_date_before
* @param {string} [assignment_date_before] No more than 3 months between assignment_date_after and assignment_date_before
* @param {Array<string>} [function__in] Filter by function
* @param {string} [sort_by] Sort output by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
getFunctionStats(aggr_interval: string, assignment_date_after?: string, assignment_date_before?: string, function__in?: Array<string>, sort_by?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<AggregatedFunctionStats>>>;
/**
*
* @summary Task Info
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
getTask(taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Task>>;
/**
*
* @summary Std data
* @param {string} task_id
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
getTaskStdDataCache(task_id: string, per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<string>>>;
/**
* Retrieve cloud functions list
* @summary Functions List
* @param {number} [per_page]
* @param {number} [page]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
listFunctions(per_page?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ModelFunction>>>;
/**
* Retrieve cloud tasks list
* @summary Tasks List
* @param {number} [per_page]
* @param {number} [page]
* @param {Array<string>} [function__in] Filter by function
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
tasksFunctions(per_page?: number, page?: number, function__in?: Array<string>, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Task>>>;
/**
*
* @summary Update function properties
* @param {ModelFunction} body
* @param {string} functionID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
updateFunction(body: ModelFunction, functionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ModelFunction>>;
/**
*
* @summary Update task properties
* @param {Task} body
* @param {string} taskID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CloudApi
*/
updateTask(body: Task, taskID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Task>>;
}