n8n/packages/nodes-base/nodes/Stripe
कारतोफ्फेलस्क्रिप्ट™ 7a4e9ef5fa
refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649)
2023-03-09 18:13:15 +01:00
..
descriptions
helpers.ts refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649) 2023-03-09 18:13:15 +01:00
README.md
Stripe.node.json
Stripe.node.ts refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649) 2023-03-09 18:13:15 +01:00
stripe.svg
StripeTrigger.node.json
StripeTrigger.node.ts refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649) 2023-03-09 18:13:15 +01:00

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:

  1. manually add the id #event-types to <ul> that contains all event types
  2. copy-paste the function in the JS console
  3. the result is copied into in the clipboard
  4. 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);