@prepress/automation-sdk
v0.5.9
Published
Workflow Connect SDK. A TypeScript/JavaScript SDK for interacting with the Workflow Public API.
Readme
Workflow Connect | Automation SDK
The Automation SDK provides an interface to the PPD Workflow Automation API. Additional to the Automation API, this tool provides seamless integration of the FileWarehouse API which is required for Print Item handling.
Installation
npm install @prepress/automation-sdkUsage
This SDK includes callables for ESM and CommonJS builds.
import { WFCAutomationSdk } from '@prepress/automation-sdk';
// Construct a SDK instance
const sdk = new WFCAutomationSdk({
username: '<USERNAME>', // Your workflow user account to authenticate
password: '<PASSWORD>', // The users passwoed
apiBaseUrl: 'http://localhost:8081/pms', // The running workflow instance
httpTimeout: 30000 // Optionally, set a global HTTP timeout
});
// Make an Automation API request
// Here we load a list of all available "Product Definitions"
const logProductDefinitions = async () => {
const definitions = await sdk.listProductDefinitions();
console.log('Product Definitions', definitions);
};
// Execute async function
logProductDefinitions();
