@forestvpn/forestvpn_api
Advanced tools
Comparing version 3.11.0 to 3.11.1
@@ -79,2 +79,86 @@ /* tslint:disable */ | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
claimReferralTransaction: async (transactionID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
// verify required parameter 'transactionID' is not null or undefined | ||
if (transactionID === null || transactionID === undefined) { | ||
throw new RequiredError('transactionID','Required parameter transactionID was null or undefined when calling claimReferralTransaction.'); | ||
} | ||
const localVarPath = `/referral/transactions/{transactionID}/claim/` | ||
.replace(`{${"transactionID"}}`, encodeURIComponent(String(transactionID))); | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, 'https://example.com'); | ||
let baseOptions; | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; | ||
const localVarHeaderParameter = {} as any; | ||
const localVarQueryParameter = {} as any; | ||
// authentication bearerAuth required | ||
const query = new URLSearchParams(localVarUrlObj.search); | ||
for (const key in localVarQueryParameter) { | ||
query.set(key, localVarQueryParameter[key]); | ||
} | ||
for (const key in options.params) { | ||
query.set(key, options.params[key]); | ||
} | ||
localVarUrlObj.search = (new URLSearchParams(query)).toString(); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
return { | ||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getReferralTransaction: async (transactionID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
// verify required parameter 'transactionID' is not null or undefined | ||
if (transactionID === null || transactionID === undefined) { | ||
throw new RequiredError('transactionID','Required parameter transactionID was null or undefined when calling getReferralTransaction.'); | ||
} | ||
const localVarPath = `/referral/transactions/{transactionID}/` | ||
.replace(`{${"transactionID"}}`, encodeURIComponent(String(transactionID))); | ||
// use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
const localVarUrlObj = new URL(localVarPath, 'https://example.com'); | ||
let baseOptions; | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; | ||
const localVarHeaderParameter = {} as any; | ||
const localVarQueryParameter = {} as any; | ||
// authentication bearerAuth required | ||
const query = new URLSearchParams(localVarUrlObj.search); | ||
for (const key in localVarQueryParameter) { | ||
query.set(key, localVarQueryParameter[key]); | ||
} | ||
for (const key in options.params) { | ||
query.set(key, options.params[key]); | ||
} | ||
localVarUrlObj.search = (new URLSearchParams(query)).toString(); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
return { | ||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, | ||
options: localVarRequestOptions, | ||
}; | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -270,2 +354,30 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReferralTransaction>>> { | ||
const localVarAxiosArgs = await ReferralApiAxiosParamCreator(configuration).claimReferralTransaction(transactionID, options); | ||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { | ||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; | ||
return axios.request(axiosRequestArgs); | ||
}; | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async getReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReferralTransaction>>> { | ||
const localVarAxiosArgs = await ReferralApiAxiosParamCreator(configuration).getReferralTransaction(transactionID, options); | ||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { | ||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; | ||
return axios.request(axiosRequestArgs); | ||
}; | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -340,2 +452,22 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>> { | ||
return ReferralApiFp(configuration).claimReferralTransaction(transactionID, options).then((request) => request(axios, basePath)); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async getReferralTransaction(transactionID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReferralTransaction>> { | ||
return ReferralApiFp(configuration).getReferralTransaction(transactionID, options).then((request) => request(axios, basePath)); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -400,2 +532,24 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof ReferralApi | ||
*/ | ||
public async claimReferralTransaction(transactionID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReferralTransaction>> { | ||
return ReferralApiFp(this.configuration).claimReferralTransaction(transactionID, options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof ReferralApi | ||
*/ | ||
public async getReferralTransaction(transactionID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReferralTransaction>> { | ||
return ReferralApiFp(this.configuration).getReferralTransaction(transactionID, options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -402,0 +556,0 @@ * @param {string} [q] Search query |
@@ -33,2 +33,18 @@ /** | ||
* | ||
* @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 | ||
@@ -80,2 +96,18 @@ * @param {string} [q] Search query | ||
* | ||
* @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 | ||
@@ -127,2 +159,18 @@ * @param {string} [q] Search query | ||
* | ||
* @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 | ||
@@ -177,2 +225,20 @@ * @param {string} [q] Search query | ||
* | ||
* @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 | ||
@@ -179,0 +245,0 @@ * @param {string} [q] Search query |
@@ -138,2 +138,86 @@ "use strict"; | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
claimReferralTransaction: function (transactionID, options) { | ||
if (options === void 0) { options = {}; } | ||
return __awaiter(_this, void 0, void 0, function () { | ||
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions; | ||
return __generator(this, function (_a) { | ||
// verify required parameter 'transactionID' is not null or undefined | ||
if (transactionID === null || transactionID === undefined) { | ||
throw new base_1.RequiredError('transactionID', 'Required parameter transactionID was null or undefined when calling claimReferralTransaction.'); | ||
} | ||
localVarPath = "/referral/transactions/{transactionID}/claim/" | ||
.replace("{" + "transactionID" + "}", encodeURIComponent(String(transactionID))); | ||
localVarUrlObj = new URL(localVarPath, 'https://example.com'); | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options); | ||
localVarHeaderParameter = {}; | ||
localVarQueryParameter = {}; | ||
query = new URLSearchParams(localVarUrlObj.search); | ||
for (key in localVarQueryParameter) { | ||
query.set(key, localVarQueryParameter[key]); | ||
} | ||
for (key in options.params) { | ||
query.set(key, options.params[key]); | ||
} | ||
localVarUrlObj.search = (new URLSearchParams(query)).toString(); | ||
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); | ||
return [2 /*return*/, { | ||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, | ||
options: localVarRequestOptions, | ||
}]; | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getReferralTransaction: function (transactionID, options) { | ||
if (options === void 0) { options = {}; } | ||
return __awaiter(_this, void 0, void 0, function () { | ||
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, query, key, key, headersFromBaseOptions; | ||
return __generator(this, function (_a) { | ||
// verify required parameter 'transactionID' is not null or undefined | ||
if (transactionID === null || transactionID === undefined) { | ||
throw new base_1.RequiredError('transactionID', 'Required parameter transactionID was null or undefined when calling getReferralTransaction.'); | ||
} | ||
localVarPath = "/referral/transactions/{transactionID}/" | ||
.replace("{" + "transactionID" + "}", encodeURIComponent(String(transactionID))); | ||
localVarUrlObj = new URL(localVarPath, 'https://example.com'); | ||
if (configuration) { | ||
baseOptions = configuration.baseOptions; | ||
} | ||
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options); | ||
localVarHeaderParameter = {}; | ||
localVarQueryParameter = {}; | ||
query = new URLSearchParams(localVarUrlObj.search); | ||
for (key in localVarQueryParameter) { | ||
query.set(key, localVarQueryParameter[key]); | ||
} | ||
for (key in options.params) { | ||
query.set(key, options.params[key]); | ||
} | ||
localVarUrlObj.search = (new URLSearchParams(query)).toString(); | ||
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); | ||
return [2 /*return*/, { | ||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, | ||
options: localVarRequestOptions, | ||
}]; | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -330,2 +414,52 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
claimReferralTransaction: function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var localVarAxiosArgs; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, exports.ReferralApiAxiosParamCreator(configuration).claimReferralTransaction(transactionID, options)]; | ||
case 1: | ||
localVarAxiosArgs = _a.sent(); | ||
return [2 /*return*/, function (axios, basePath) { | ||
if (axios === void 0) { axios = axios_1.default; } | ||
if (basePath === void 0) { basePath = base_1.BASE_PATH; } | ||
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); | ||
return axios.request(axiosRequestArgs); | ||
}]; | ||
} | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getReferralTransaction: function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var localVarAxiosArgs; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, exports.ReferralApiAxiosParamCreator(configuration).getReferralTransaction(transactionID, options)]; | ||
case 1: | ||
localVarAxiosArgs = _a.sent(); | ||
return [2 /*return*/, function (axios, basePath) { | ||
if (axios === void 0) { axios = axios_1.default; } | ||
if (basePath === void 0) { basePath = base_1.BASE_PATH; } | ||
var axiosRequestArgs = __assign(__assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url }); | ||
return axios.request(axiosRequestArgs); | ||
}]; | ||
} | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -436,2 +570,30 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
claimReferralTransaction: function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, exports.ReferralApiFp(configuration).claimReferralTransaction(transactionID, options).then(function (request) { return request(axios, basePath); })]; | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
getReferralTransaction: function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, exports.ReferralApiFp(configuration).getReferralTransaction(transactionID, options).then(function (request) { return request(axios, basePath); })]; | ||
}); | ||
}); | ||
}, | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -516,2 +678,34 @@ * @param {string} [q] Search query | ||
* | ||
* @summary Claim referral transaction | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof ReferralApi | ||
*/ | ||
ReferralApi.prototype.claimReferralTransaction = function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, exports.ReferralApiFp(this.configuration).claimReferralTransaction(transactionID, options).then(function (request) { return request(_this.axios, _this.basePath); })]; | ||
}); | ||
}); | ||
}; | ||
/** | ||
* | ||
* @summary Get referral transaction detail | ||
* @param {string} transactionID | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
* @memberof ReferralApi | ||
*/ | ||
ReferralApi.prototype.getReferralTransaction = function (transactionID, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, exports.ReferralApiFp(this.configuration).getReferralTransaction(transactionID, options).then(function (request) { return request(_this.axios, _this.basePath); })]; | ||
}); | ||
}); | ||
}; | ||
/** | ||
* | ||
* @summary Get referral transactions | ||
@@ -518,0 +712,0 @@ * @param {string} [q] Search query |
{ | ||
"name": "@forestvpn/forestvpn_api", | ||
"version": "3.11.0", | ||
"version": "3.11.1", | ||
"description": "A package to interact api.forestvpn.com (manage vpn profiles, check usage statistics, manage locations, ...)", | ||
@@ -5,0 +5,0 @@ "author": "ForestVPN", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1662518
38818