apigee-x-module
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -289,2 +289,3 @@ export interface ApigeeApiProducts { | ||
deleteApp(email: string, appName: string): Promise<App>; | ||
addAppCredential(email: string, appName: string, app: App): Promise<App>; | ||
getAppCredential(email: string, appName: string, keyName: string): Promise<AppCredential>; | ||
@@ -291,0 +292,0 @@ deleteAppCredential(email: string, appName: string, keyName: string): Promise<AppCredential>; |
@@ -224,2 +224,12 @@ import { ApiManagementInterface, ApiProducts, ApiProduct, App, Developers, Developer, Apps, AppCredential, ProxyRevision, ProxyDeployment, EnvironmentGroup, EnvironmentGroupAttachment } from "./interfaces"; | ||
/** | ||
* Updates a developer app object with a new credential key | ||
* @date 2/9/2022 - 8:48:31 AM | ||
* | ||
* @param {string} email The developer email | ||
* @param {string} appName The name of the app | ||
* @param {App} app The app definition | ||
* @returns {Promise<App>} The updated app object | ||
*/ | ||
addAppCredential(email: string, appName: string, app: App): Promise<App>; | ||
/** | ||
* Gets credentials from an app | ||
@@ -226,0 +236,0 @@ * @date 2/9/2022 - 8:49:13 AM |
@@ -733,2 +733,37 @@ import FormData from 'form-data'; | ||
/** | ||
* Updates a developer app object with a new credential key | ||
* @date 2/9/2022 - 8:48:31 AM | ||
* | ||
* @param {string} email The developer email | ||
* @param {string} appName The name of the app | ||
* @param {App} app The app definition | ||
* @returns {Promise<App>} The updated app object | ||
*/ | ||
addAppCredential(email, appName, app) { | ||
return new Promise((resolve, reject) => { | ||
this.getOrg().then((projectId) => { | ||
this.getToken().then((token) => { | ||
axios.request({ | ||
"url": `https://apigee.googleapis.com/v1/organizations/${projectId}/developers/${email}/apps/${appName}`, | ||
"method": "POST", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Authorization": `Bearer ${token}` | ||
}, | ||
"data": app | ||
}).then((response) => { | ||
let apigeeApp = response.data; | ||
let app = apigeeApp; | ||
resolve(app); | ||
}).catch((error) => { | ||
if (error.response && error.response.data) | ||
resolve(error.response.data); | ||
else | ||
reject(error); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
/** | ||
* Gets credentials from an app | ||
@@ -735,0 +770,0 @@ * @date 2/9/2022 - 8:49:13 AM |
{ | ||
"name": "apigee-x-module", | ||
"version": "1.1.3", | ||
"version": "1.2.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", |
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
76632
1600