New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apigee-x-module

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apigee-x-module - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

3

dist/lib/apigee-interface.d.ts

@@ -10,3 +10,6 @@ import { ApiProducts, Developers, Developer, Apps, App } from "./apigee-types";

getApps(email: string): Promise<Apps>;
getApp(email: string, appName: string): Promise<App>;
createApp(email: string, appName: string, apiProducts: string[]): Promise<App>;
updateApp(email: string, appName: string, app: App): Promise<App>;
deleteApp(email: string, appName: string): Promise<App>;
}

4

dist/lib/apigee-interface.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Function interfaces
// interface GetRatePlansFunc {
// (token: string, org: string): Promise<Rate[]>;
// }

@@ -15,3 +15,6 @@ import { ApiProducts, App, Developers, Developer, Apps } from "./apigee-types";

createApp(email: string, appName: string, apiProducts: string[]): Promise<App>;
getApp(email: string, appName: string): Promise<App>;
updateApp(email: string, appName: string, app: App): Promise<App>;
deleteApp(email: string, appName: string): Promise<App>;
getToken(): Promise<string>;
}

@@ -264,2 +264,51 @@ "use strict";

}
getApp(email, appName) {
return new Promise((resolve, reject) => {
this.getToken().then((token) => {
axios({
"url": `https://apigee.googleapis.com/v1/organizations/${this.apigeeOrganization}/developers/${email}/apps/${appName}`,
"method": "get",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer " + token
}
}).then((response) => {
let apigeeApp = response.data;
let app = {
appId: apigeeApp.appId,
name: apigeeApp.name,
createdAt: apigeeApp.createdAt,
credentials: [],
apiProducts: apigeeApp.apiProducts
};
apigeeApp.credentials.forEach((apigeeCredential) => {
let appCredential = {
key: apigeeCredential.consumerKey,
secret: apigeeCredential.consumerSecret,
issuedAt: apigeeCredential.issuedAt,
expiresAt: apigeeCredential.expiresAt,
scopes: apigeeCredential.scopes,
status: apigeeCredential.status
};
app.credentials.push(appCredential);
});
resolve(app);
}).catch((error) => {
if (error.response && error.response.data)
resolve(error.response.data);
else
reject(error);
});
}).catch((error) => {
console.error(error);
reject(error);
});
});
}
updateApp(email, appName, app) {
throw new Error("Method not implemented.");
}
deleteApp(email, appName) {
throw new Error("Method not implemented.");
}
getToken() {

@@ -266,0 +315,0 @@ return new Promise((resolve, reject) => {

{
"name": "apigee-x-module",
"version": "0.4.2",
"version": "0.4.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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc