Package Exports
- alloy-sdk
- alloy-sdk/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (alloy-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
alloy-sdk
This is a tiny wrapper that makes a POST request to run an Alloy workflow.
Usage
import {runAlloy} from 'alloy-sdk';
...
await runAlloy({
// You can find this on Step 4 of the Webhook block in your workflow
workflowId : '<workflowId>',
// required for authenticated workflows; found in Forge Settings
apiKey: '<apiKey>',
// each parameterName should match what you entered in the Parameter fields on the Webhook block
data: {
parameterName: 'Parameter Value'
},
// Set this flag to retrieve output from workflow
returnExecutionData:true,
});Workflow Output
If the returnExecutionData option is set, then runAlloy() will return an array of all block output. Be aware that the returnExecutionData flag can add a significant amount of latency, since the function will have to wait for the workflow to finish running.