Closed buildmaster closed 9 years ago
{
"connectors": {
"chargify": {
"token": "abkjs"
},
"xero": {
"token": "eljrs"
}
},
"modules": [
{
"name": "saveChargifyPaymentDetails",
"src": "../scripts1.js",
"defaultContext": "admin@hoi.io",
}, {
"name": "processBatchPayments",
"src": "../scripts2.js",
"overrideContext": "admin@hoi.io"
}, {
"name": "saveToXero",
"src": "../scripts3.js",
"defaultContext": "admin@hoi.io"
}, {
"name": "getFromXero",
"src": "../scripts4.js",
"defaultContext": "admin@hoi.io"
}
],
"on": {
"chargify.payment.success": {
"modules": ["saveChargifyPaymentDetails"]
},
"nightly.batch.start": {
"modules": ["processBatchPayments"]
},
"new.invoice": {
"modules": ["saveToXero"]
},
"get.invoices": {
"modules": ["getFromXero"]
}
},
"endpoints": {
"/:product/getLatestInvoices": {
"methods": ["GET"],
"event": "get.invoices",
"authenticated": true
}
},
"schedules": {
"0 0 * * *": {
"events": [
"nightly.batch.start"
]
}
}
}
Could/should the events be defined inside each module definition?
events can link to more than one module or to an endpoint or webhook so they're not synonymous
what should the hoist.json file look like?