apigee-x-module
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -290,2 +290,3 @@ export interface ApigeeApiProducts { | ||
getAppCredential(email: string, appName: string, keyName: string): Promise<AppCredential>; | ||
deleteAppCredential(email: string, appName: string, keyName: string): Promise<AppCredential>; | ||
updateAppCredential(email: string, appName: string, key: AppCredential): Promise<AppCredential>; | ||
@@ -292,0 +293,0 @@ updateAppCredentialAddProducts(email: string, appName: string, keyName: string, apiProducts: string[]): Promise<AppCredential>; |
@@ -244,2 +244,12 @@ import { ApiManagementInterface, ApiProducts, ApiProduct, App, Developers, Developer, Apps, AppCredential, ProxyRevision, ProxyDeployment, EnvironmentGroup, EnvironmentGroupAttachment } from "./interfaces"; | ||
/** | ||
* Delete a credential from an app | ||
* @date 2/9/2022 - 8:49:13 AM | ||
* | ||
* @param {string} email The developer's email | ||
* @param {string} appName The name of the app | ||
* @param {string} keyName The name of the key | ||
* @returns {Promise<AppCredential>} App credential object | ||
*/ | ||
deleteAppCredential(email: string, appName: string, keyName: string): Promise<AppCredential>; | ||
/** | ||
* Update an app credential API product affiliation | ||
@@ -246,0 +256,0 @@ * @date 2/9/2022 - 8:51:04 AM |
@@ -827,2 +827,36 @@ import FormData from 'form-data'; | ||
/** | ||
* Delete a credential from an app | ||
* @date 2/9/2022 - 8:49:13 AM | ||
* | ||
* @param {string} email The developer's email | ||
* @param {string} appName The name of the app | ||
* @param {string} keyName The name of the key | ||
* @returns {Promise<AppCredential>} App credential object | ||
*/ | ||
deleteAppCredential(email, appName, keyName) { | ||
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}/keys/${keyName}`, | ||
"method": "DELETE", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Authorization": `Bearer ${token}` | ||
} | ||
}).then((response) => { | ||
let apigeeAppCredential = response.data; | ||
let appCredential = apigeeAppCredential; | ||
resolve(appCredential); | ||
}).catch((error) => { | ||
if (error.response && error.response.data) | ||
resolve(error.response.data); | ||
else | ||
reject(error); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
/** | ||
* Update an app credential API product affiliation | ||
@@ -829,0 +863,0 @@ * @date 2/9/2022 - 8:51:04 AM |
{ | ||
"name": "apigee-x-module", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"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
74712
1554