Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.0.0 to 1.0.1

2

dist/lib/interfaces.d.ts

@@ -290,2 +290,4 @@ export interface ApigeeApiProducts {

deployProxyRevision(environmentName: string, proxyName: string, proxyVersion: string, serviceAccountEmail?: string): Promise<ProxyDeployment>;
updateFlow(flowName: string, bundlePath: string): Promise<ProxyRevision>;
deployFlowRevision(environmentName: string, flowNameName: string, flowVersion: string, serviceAccountEmail?: string): Promise<ProxyDeployment>;
}

@@ -89,2 +89,11 @@ import { ApiManagementInterface, ApiProducts, ApiProduct, App, Developers, Developer, Apps, AppCredential, ProxyRevision, ProxyDeployment, EnvironmentGroup, EnvironmentGroupAttachment } from "./interfaces";

/**
* Uploads and updates a proxy bundle to an org, creating a new version that can be deployed
* @date 2/9/2022 - 8:30:43 AM
*
* @param {string} proxyName The name of the proxy (will be created or updated if it already exists)
* @param {string} bundlePath The path to the bundle zip file
* @returns {Promise<ProxyRevision>} New proxy revision update information
*/
updateFlow(flowName: string, bundlePath: string): Promise<ProxyRevision>;
/**
* Deploys a revision of a proxy to an environment

@@ -100,2 +109,12 @@ * @date 2/9/2022 - 8:31:54 AM

/**
* Deploys a revision of a proxy to an environment
* @date 2/9/2022 - 8:31:54 AM
*
* @param {string} environmentName The environment to deploy to
* @param {string} proxyName The name of the proxy to deploy
* @param {string} proxyRevision The revision of the proxy to deploy
* @returns {Promise<ProxyDeployment>} Information on the status of the proxy deployment
*/
deployFlowRevision(environmentName: string, flowName: string, flowRevision: string, serviceAccountEmail?: string): Promise<ProxyDeployment>;
/**
* Gets all of the API Products from an org

@@ -102,0 +121,0 @@ * @date 2/9/2022 - 8:34:45 AM

@@ -182,2 +182,31 @@ import FormData from 'form-data';

/**
* Uploads and updates a proxy bundle to an org, creating a new version that can be deployed
* @date 2/9/2022 - 8:30:43 AM
*
* @param {string} proxyName The name of the proxy (will be created or updated if it already exists)
* @param {string} bundlePath The path to the bundle zip file
* @returns {Promise<ProxyRevision>} New proxy revision update information
*/
updateFlow(flowName, bundlePath) {
return new Promise((resolve, reject) => {
this.getOrg().then((projectId) => {
this.getToken().then((token) => {
const form = new FormData();
form.append('file', fs.createReadStream(bundlePath), `${flowName + ".zip"}`);
axios.request({
url: `https://apigee.googleapis.com/v1/organizations/${projectId}/sharedflows?name=${flowName}&action=import`,
method: "POST",
headers: Object.assign({ "Authorization": `Bearer ${token}` }, form.getHeaders()),
data: form
}).then((response) => {
let proxyRevision = response.data;
resolve(proxyRevision);
}).catch((error) => {
reject(error);
});
});
});
});
}
/**
* Deploys a revision of a proxy to an environment

@@ -215,2 +244,34 @@ * @date 2/9/2022 - 8:31:54 AM

/**
* Deploys a revision of a proxy to an environment
* @date 2/9/2022 - 8:31:54 AM
*
* @param {string} environmentName The environment to deploy to
* @param {string} proxyName The name of the proxy to deploy
* @param {string} proxyRevision The revision of the proxy to deploy
* @returns {Promise<ProxyDeployment>} Information on the status of the proxy deployment
*/
deployFlowRevision(environmentName, flowName, flowRevision, serviceAccountEmail) {
return new Promise((resolve, reject) => {
this.getOrg().then((projectId) => {
this.getToken().then((token) => {
let url = `https://apigee.googleapis.com/v1/organizations/${projectId}/environments/${environmentName}/sharedflows/${flowName}/revisions/${flowRevision}/deployments?override=true`;
if (serviceAccountEmail)
url += `&serviceAccount=${serviceAccountEmail}`;
axios.request({
url: url,
method: "POST",
headers: {
"Authorization": `Bearer ${token}`
}
}).then((response) => {
let apigeeDeployment = response.data;
resolve(apigeeDeployment);
}).catch((error) => {
reject(error);
});
});
});
});
}
/**
* Gets all of the API Products from an org

@@ -217,0 +278,0 @@ * @date 2/9/2022 - 8:34:45 AM

2

package.json
{
"name": "apigee-x-module",
"version": "1.0.0",
"version": "1.0.1",
"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