n8n/packages/nodes-base/nodes/Stripe
Iván Ovejero 0d9eeea024
refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)
* 📘 Set up overload

* 🔥 Remove inferrable record assertions

* 👕 Fix semicolon

* 👕 Fix another semicolon
2022-11-18 16:29:44 +01:00
..
descriptions refactor(nodes-base): Apply lint rule node-param-operation-option-description-wrong-for-get-many (#4064) 2022-09-13 12:36:36 +02:00
helpers.ts refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647) 2022-11-18 14:31:38 +01:00
README.md Fix indentation on Stripe-Trigger Node 2020-05-12 00:06:51 +02:00
Stripe.node.json fix(nodes-base): fix and harmonize all primaryDocumentation links (#4191) 2022-09-29 13:33:16 +03:00
Stripe.node.ts refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648) 2022-11-18 16:29:44 +01:00
stripe.svg Add Stripe regular node (#1470) 2021-07-10 13:15:14 +02:00
StripeTrigger.node.json fix(nodes-base): fix and harmonize all primaryDocumentation links (#4191) 2022-09-29 13:33:16 +03:00
StripeTrigger.node.ts refactor(core): Update rule typescript-eslint/no-unused-vars to not error when variable starts with _ (#4523) 2022-11-08 15:28:21 +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)