
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
service-cloud-client
Advanced tools
Allows to call actions of services in the service cloud (service-cloud-service)
Allow to call Service Cloud services (instances of service-cloud-service
) actions.
Let's say there is a serivce called hello-world
in the service cloud (service-cloud-service
) and this service has an action called say
which produces a message with the sentence Hello World!
depending on the language given in the options of the action.
This action can be called 3 different ways :
const client = require('service-cloud-client');
const serviceName = 'hello-world'; // Name of the service
const actionName = 'say'; // Name of the action of the service
const data = { // Options of the action
language: 'fr'
};
const remote = 'http://localhost:1900'; // Entry point of the service cloud
// Direct call
client.ServiceCloudClient.call(serviceName, actionName, remote, data, (e, result) => {
if(e)
return console.error(e);
console.log(result.message);
});
// Call with instance
const helloWorld = new client.ServiceCloudClient(serviceName, remote);
helloWorld.call(actionName, data, (e, result) => {
if(e)
return console.error(e);
console.log(result.message);
});
// Call with expanded methods (methods dynamically added to the object from the information of the remote service)
const helloWorldExpanded = new client.ServiceCloudClient(serviceName, remote);
helloWorldExpanded.expandActions((e) => {
if(e)
return console.error(e);
helloWorldExpanded.say(data, (e, result) => {
if(e)
return console.error(e);
console.log(result.message);
});
});
FAQs
Allows to call actions of services in the service cloud (service-cloud-service)
We found that service-cloud-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.