apigee-x-module
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -18,3 +18,3 @@ import { ApiManagementInterface, ApiProducts, ApiProduct, App, Developers, Developer, Apps, AppCredential, ProxyRevision, ProxyDeployment, EnvironmentGroup, EnvironmentGroupAttachment } from "./apigee.types"; | ||
*/ | ||
org: string; | ||
_org: string; | ||
/** | ||
@@ -27,13 +27,20 @@ * Optional OAuth token to be used for API calls (if not set then token is fetched using GOOGLE_APPLICATION_CREDENTIALS) | ||
*/ | ||
private token; | ||
private _token; | ||
/** | ||
* Creates an instance of ApigeeService. | ||
* @date 2/9/2022 - 8:13:37 AM | ||
* Setter for the org | ||
* @date 2/11/2022 - 10:26:01 AM | ||
* | ||
* @constructor | ||
* @param {string} org Optional org (if none is given then GCP project from service account is used) | ||
* @param {string} token Optional OAuth token to be used for the request (if none is given then Google Application Credentials are used to get a token) | ||
* @public | ||
* @type {string} The new org to set | ||
*/ | ||
constructor(org: string, token: string); | ||
set org(newOrg: string); | ||
/** | ||
* Setter for the GCP access token for Apigee API calls | ||
* @date 2/11/2022 - 10:26:24 AM | ||
* | ||
* @public | ||
* @type {string} The new token to use | ||
*/ | ||
set token(newToken: string); | ||
/** | ||
* Gets the org that is available to be used (either set or from Google Auth project) | ||
@@ -40,0 +47,0 @@ * @date 2/9/2022 - 8:25:42 AM |
@@ -22,14 +22,22 @@ "use strict"; | ||
/** | ||
* Creates an instance of ApigeeService. | ||
* @date 2/9/2022 - 8:13:37 AM | ||
* Setter for the org | ||
* @date 2/11/2022 - 10:26:01 AM | ||
* | ||
* @constructor | ||
* @param {string} org Optional org (if none is given then GCP project from service account is used) | ||
* @param {string} token Optional OAuth token to be used for the request (if none is given then Google Application Credentials are used to get a token) | ||
* @public | ||
* @type {string} The new org to set | ||
*/ | ||
constructor(org, token) { | ||
this.org = org; | ||
this.token = token; | ||
set org(newOrg) { | ||
this._org = newOrg; | ||
} | ||
/** | ||
* Setter for the GCP access token for Apigee API calls | ||
* @date 2/11/2022 - 10:26:24 AM | ||
* | ||
* @public | ||
* @type {string} The new token to use | ||
*/ | ||
set token(newToken) { | ||
this._token = newToken; | ||
} | ||
/** | ||
* Gets the org that is available to be used (either set or from Google Auth project) | ||
@@ -42,4 +50,4 @@ * @date 2/9/2022 - 8:25:42 AM | ||
return new Promise((resolve, reject) => { | ||
if (this.org) | ||
resolve(this.org); | ||
if (this._org) | ||
resolve(this._org); | ||
else | ||
@@ -59,4 +67,4 @@ auth.getProjectId().then((projectId) => { | ||
return new Promise((resolve, reject) => { | ||
if (this.token) | ||
resolve(this.token); | ||
if (this._token) | ||
resolve(this._token); | ||
else | ||
@@ -63,0 +71,0 @@ auth.getAccessToken().then((token) => { |
{ | ||
"name": "apigee-x-module", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Module for integrating with the Apigee X platform for TS/JS developer portal integrations.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/tyayers/apigee-x-module", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1351
0
65548