mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 00:24:07 -08:00
7ce7285f7a
* Changes to types so that credentials can be always loaded from DB This first commit changes all return types from the execute functions and calls to get credentials to be async so we can use await. This is a first step as previously credentials were loaded in memory and always available. We will now be loading them from the DB which requires turning the whole call chain async. * Fix updated files * Removed unnecessary credential loading to improve performance * Fix typo * ⚡ Fix issue * Updated new nodes to load credentials async * ⚡ Remove not needed comment Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> |
||
---|---|---|
.. | ||
descriptions | ||
helpers.ts | ||
README.md | ||
Stripe.node.json | ||
Stripe.node.ts | ||
stripe.svg | ||
StripeTrigger.node.json | ||
StripeTrigger.node.ts |
All Stripe webhook events are taken from docs: https://stripe.com/docs/api/events/types#event_types
To get the entire list of events as a JS array, scrape the website:
- manually add the id #event-types to
<ul>
that contains all event types - copy-paste the function in the JS console
- the result is copied into in the clipboard
- paste the prepared array in StripeTrigger.node.ts
types = []
$$('ul#event-types li').forEach(el => {
const value = el.querySelector('.method-list-item-label-name').innerText
types.push({
name: value
.replace(/(\.|_)/, ' ')
.split(' ')
.map((s) => s.charAt(0).toUpperCase() + s.substring(1))
.join(' '),
value,
description: el.querySelector('.method-list-item-description').innerText
})
})
copy(types)