Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
28 lines
842 B
Markdown
28 lines
842 B
Markdown
All Stripe webhook events are taken from docs:
|
|
[https://stripe.com/docs/api/events/types#event_types](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
|
|
|
|
```js
|
|
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);
|
|
```
|