Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@serverless/platform-client

Package Overview
Dependencies
Maintainers
7
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/platform-client - npm Package Compare versions

Comparing version 3.6.1 to 3.7.0

src/accessKeys.js

2

package.json
{
"name": "@serverless/platform-client",
"version": "3.6.1",
"version": "3.7.0",
"main": "./src/index.js",

@@ -5,0 +5,0 @@ "jsdelivr": "dist-web/serverless-platform-client.min.js",

@@ -13,3 +13,4 @@ {

"providers": "https://sp-providers-v1.serverless-platform-dev.com",
"event-webhooks": "https://event-webhooks-v1.serverless-platform-dev.com"
"event-webhooks": "https://event-webhooks-v1.serverless-platform-dev.com",
"connections": "https://connections-v1.serverless-platform-dev.com"
},

@@ -24,4 +25,5 @@ "prod": {

"providers": "https://sp-providers-v1.serverless-platform.com",
"event-webhooks": "https://event-webhooks-v1.serverless-platform.com"
"event-webhooks": "https://event-webhooks-v1.serverless-platform.com",
"connections": "https://connections-v1.serverless-platform.com"
}
}

@@ -14,2 +14,5 @@ 'use strict';

const webhooks = require('./webhooks');
const accessKeys = require('./accessKeys');
const connections = require('./connections');
const sessions = require('./sessions');
const utils = require('./utils');

@@ -63,2 +66,19 @@

/**
* Methods to create, update, delete User Sessions on the Serverless Platform
* @namespace
*/
this.session = {
/**
* Uses a Refresh Token to generate a new ID Token for a User within a specific Serverless Organization.
*
* @param {string} refreshToken The refresh token used to create a new ID Token.
* @returns {Promise<object>}
*
* @example
* const tokenData = await sdk.session.refreshToken(refreshToken);
*/
refreshToken: (refreshToken) => sessions.refreshToken(this, refreshToken),
};
/**
* Publish and retrieve Serverless Platform Events

@@ -425,2 +445,119 @@ * @namespace

};
/**
* Create, get and delete Serverless Platform Access Keys for an Organization
* @namespace
*/
this.accessKeys = {
/**
* Creates a new Access Key for a User within a Serverless Organization.
*
* @param {string} orgName The name of the Serverless Organization to create the Access Key for
* @param {string} userName The name of the User within the Serverless Organization to create the Access Key for
* @param {string} accessKeyName The name of the Access Key you would like to create
* @returns {Promise<object>}
*
* @example
* const accessKey = await sdk.accessKeys.create(orgName, accessKeyName);
*/
create: (orgName, userName, accessKeyName) =>
accessKeys.create(this, orgName, userName, accessKeyName),
/**
* Lists all Access Keys within a Serverless Organization.
*
* @param {string} orgName The name of the Serverless Organization to list Access Keys
* @returns {Promise<object>}
*
* @example
* const accessKeys = await sdk.accessKeys.list(orgName);
*/
list: (orgName) => accessKeys.list(this, orgName),
/**
* Delete an Access Key from a Serverless Organization.
*
* @param {string} orgName The name of the Serverless Organization that the Access Key belongs to
* @param {string} uid The UID of the of the Access Key
* @returns {Promise<object>}
*
* @example
* const accessKeys = await sdk.accessKeys.remove(orgName, uid);
*/
remove: (orgName, uid) => accessKeys.remove(this, orgName, uid),
};
/**
* Create, manage and sync Serverless Platform Connections between vendor accounts and their Serverless Organization.
* @namespace
*/
this.connections = {
/**
* Creates a new Connection between a vendor account and a Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to create a Connection in.
* @param {string} providerUid The UID of an existing Serverless Provider tied to a vendor account within the Organization to use for this Connection. A vendor account (e.g. an AWS account) can only be registered once with a Connection, across all Serverless Organizations. They are globally unique.
* @param {string} accountAlias An alias or nickname of the vendor account used to conveniently identify which account this Connection is used with. This must be unique within the Serverless Organization.
* @returns {Promise<object>}
*/
create: (orgUid, providerUid, accountAlias) =>
connections.create(this, orgUid, providerUid, accountAlias),
/**
* List all Connections within the Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to create a Connection in.
* @returns {Promise<object>}
*/
list: (orgUid) => connections.list(this, orgUid),
/**
* Get a single Connection within the Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to get a Connection in.
* @param {string} connectionUid The UID of the Connection to get within the Serverless Organization.
* @returns {Promise<object>}
*/
get: (orgUid, connectionUid) => connections.get(this, orgUid, connectionUid),
/**
* Get a single Connection by Organization UID and vendor account alias within the Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to get a Connection in.
* @param {string} accountAlias The alias of the Connection to get within the Serverless Organization.
* @returns {Promise<object>}
*/
getByOrgAndAccountAlias: (orgUid, accountAlias) =>
connections.getByOrgAndAccountAlias(this, orgUid, accountAlias),
/**
* Update a single Connection within the Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to update a Connection in.
* @param {string} connectionUid The UID of the Connection to update within the Serverless Organization.
* @param {string} providerUid The updated Provider UID within the Connection.
* @param {string} accountAlias The updated alias of the Connection.
* @param {string} status The updated status of the Connection.
* @returns {Promise<object>}
*/
update: (orgUid, connectionUid, providerUid, accountAlias, status) =>
connections.update(this, orgUid, connectionUid, providerUid, accountAlias, status),
/**
* Remove a single Connection within the Serverless Organization.
*
* @param {string} orgUid The UID of the Serverless Organization to remove a Connection in.
* @param {string} connectionUid The UID of the Connection to remove within the Serverless Organization.
* @returns {Promise<object>}
*/
remove: (orgName, connectionUid) => connections.remove(this, orgName, connectionUid),
/**
* Run a sync operation across all Connections within the Serverless Organization. This only runs sync on Connections with an "inactive", "synced", "unsynced", "error" state. Call `connections.list()` to view status of all Connections.
*
* @param {string} orgUid The UID of the Serverless Organization to sync all Connections in.
* @returns {Promise<object>}
*/
syncAll: (orgUid) => connections.syncAll(this, orgUid),
/**
* Run an unsync operation on a specific Connection within the Serverless Organization. This only runs sync on Connections with an "synced", "error" state. Call `connections.list()` to view status of all Connections.
*
* @param {string} orgUid The UID of the Serverless Organization to sync all Connections in.
* @param {string} connectionUid The UID of the Connection to unsync within the Serverless Organization.
* @returns {Promise<object>}
*/
unsync: (orgUid, connectionUid) => connections.unsync(this, orgUid, connectionUid),
};
}

@@ -427,0 +564,0 @@

@@ -56,3 +56,2 @@ 'use strict';

}
try {

@@ -59,0 +58,0 @@ const res = await axios(requestOptions);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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