node wrapper around cloud2sign REST-ful APIs
All the methods have a single object parameter, used as a way to improve readability and have optional parameters.
All methods return a Promise/A+ but accept an optional Node-style callback(err, data)
parameter.
All methods accept a user
parameter used to specify the user the request is made on the behalf of (to be used if and only if the authentication user is root).
Login to the service.
Arguments
username
: the name of the Cloud2Sign userpassword
: the password associated tousername
Returns
Full session data, with token
to identify the session, and user
data with companies
info and permissions.
Logout from the service.
Arguments
token
: the token associated with the session
Returns
logoutSuccessful
flag.
Retrieves the workflows list for a given company.
Arguments
token
: the token associated with the sessioncid
: company iddateMin
: the starting date for searching Workflow (mandatory), in "milliseconds since Unix Epoch" formatdateMax
: the ending date for searching Workflow, in "milliseconds since Unix Epoch" formatmeta
: optional metadata for searching
Returns
Workflows list.
Retrieves a Buffer with the content of a workflow.
Arguments
token
: the token associated with the sessionwfid
: the workflow id to be downloaded
Returns
Full workflow data (in zip format)