-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1893 from dubinc/webhooks-e2e
Webhooks e2e
- Loading branch information
Showing
14 changed files
with
379 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,72 @@ | ||
{ | ||
"eventName": "Sign up", | ||
"eventName": "Signup", | ||
"customer": { | ||
"id": "oU5P0SqI8fpwx5bxw1", | ||
"name": "John", | ||
"email": "[email protected]", | ||
"avatar": "https://example.com/john.jpeg" | ||
"id": "cus_Ql3PvCTbPXBpp6vn7x5oHb5G", | ||
"externalId": "cus_BH6tDUWc9n0Y2pf55tVbk1hc", | ||
"name": "Tiny Beige Badger", | ||
"email": "[email protected]", | ||
"avatar": "https://api.dicebear.com/9.x/notionists/png?seed=cus_BH6tDUWc9n0Y2pf55tVbk1hc", | ||
"createdAt": "2025-01-14T04:49:23.385Z" | ||
}, | ||
"click": { | ||
"id": "d0UtZqE0BZuBPrJS", | ||
"id": "GWGrkftJdYlZD2mq", | ||
"url": "https://github.com/dubinc/dub", | ||
"ip": "63.141.57.109", | ||
"continent": "NA", | ||
"country": "US", | ||
"city": "San Francisco", | ||
"city": "San Jose", | ||
"region": "sfo1", | ||
"continent": "NA", | ||
"device": "Desktop", | ||
"browser": "Chrome", | ||
"os": "Mac OS", | ||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36", | ||
"bot": false, | ||
"referer": "(direct)", | ||
"refererUrl": "(direct)", | ||
"qr": false, | ||
"referer": "(direct)" | ||
"ip": "185.211.32.242" | ||
}, | ||
"link": { | ||
"id": "cm0faqkyn0001txvfwjfeq7gl", | ||
"id": "cm0lcuvtz000xcutmqw4a7wi3", | ||
"domain": "dub.sh", | ||
"key": "79ys3WA", | ||
"externalId": null, | ||
"key": "track-test", | ||
"url": "https://github.com/dubinc/dub", | ||
"trackConversion": true, | ||
"externalId": null, | ||
"tenantId": null, | ||
"archived": false, | ||
"expiresAt": null, | ||
"expiresAt": "1970-01-01T00:00:00.000Z", | ||
"expiredUrl": null, | ||
"password": null, | ||
"proxy": false, | ||
"title": null, | ||
"description": null, | ||
"image": null, | ||
"title": "GitHub - dubinc/dub: Open-source link management infrastructure. Loved by modern marketing teams like Vercel, Raycast...", | ||
"description": "Open-source link management infrastructure. Loved by modern marketing teams like Vercel, Raycast, and Perplexity. - dubinc/dub", | ||
"image": "https://repository-images.githubusercontent.com/529708137/419e9be4-a9d1-4c85-9f83-47a78ad92583", | ||
"video": null, | ||
"rewrite": false, | ||
"doIndex": false, | ||
"ios": null, | ||
"android": null, | ||
"geo": null, | ||
"publicStats": false, | ||
"tagId": null, | ||
"tags": [], | ||
"webhookIds": [], | ||
"comments": null, | ||
"shortLink": "https://dub.sh/79ys3WA", | ||
"qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1", | ||
"shortLink": "https://dub.sh/track-test", | ||
"qrCode": "https://api.dub.co/qr?url=https://dub.sh/track-test?qr=1", | ||
"utm_source": null, | ||
"utm_medium": null, | ||
"utm_campaign": null, | ||
"utm_term": null, | ||
"utm_content": null, | ||
"userId": "cm022rkcw0000ikt14mscg9sg", | ||
"workspaceId": "ws_cm022sis60003ikt1syy7kfhl", | ||
"clicks": 10, | ||
"lastClicked": "2024-08-30T07:45:09.000Z", | ||
"leads": 5, | ||
"sales": 0, | ||
"saleAmount": 0, | ||
"createdAt": "2024-08-29T13:03:59.098Z", | ||
"updatedAt": "2024-08-30T09:53:49.505Z" | ||
"userId": "cludszk1h0000wmd2e0ea2b0p", | ||
"workspaceId": "ws_clrei1gld0002vs9mzn93p8ik", | ||
"clicks": 882, | ||
"lastClicked": "2025-01-14T04:49:10.000Z", | ||
"leads": 3632, | ||
"sales": 2811, | ||
"saleAmount": 290300, | ||
"createdAt": "2024-09-02T18:49:56.136Z", | ||
"updatedAt": "2025-01-14T04:49:23.740Z", | ||
"projectId": "clrei1gld0002vs9mzn93p8ik", | ||
"programId": "prog_CYCu7IMAapjkRpTnr8F1azjN" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,78 @@ | ||
{ | ||
"eventName": "Purchased", | ||
"eventName": "Subscription", | ||
"customer": { | ||
"id": "cm0gjdvr20001dkbha2n9gt2b", | ||
"name": "John", | ||
"email": "[email protected]", | ||
"avatar": "https://example.com/john.jpeg" | ||
"id": "cm25onzuv0001s1bbxchrc0ae", | ||
"externalId": "cus_jTrfVKYN3Buc3F80JoqBiY0g", | ||
"name": "Rural Red Goldfish", | ||
"email": "[email protected]", | ||
"avatar": "https://api.dicebear.com/9.x/notionists/png?seed=cus_jTrfVKYN3Buc3F80JoqBiY0g", | ||
"createdAt": "2024-10-12T04:55:36.007Z" | ||
}, | ||
"click": { | ||
"id": "d0UtZqE0BZuBPrJS", | ||
"id": "GWGrkftJdYlZD2mq", | ||
"url": "https://github.com/dubinc/dub", | ||
"ip": "63.141.57.109", | ||
"continent": "NA", | ||
"country": "US", | ||
"city": "San Francisco", | ||
"city": "San Jose", | ||
"region": "sfo1", | ||
"continent": "NA", | ||
"device": "Desktop", | ||
"browser": "Chrome", | ||
"os": "Mac OS", | ||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36", | ||
"bot": false, | ||
"referer": "(direct)", | ||
"refererUrl": "(direct)", | ||
"qr": false, | ||
"referer": "(direct)" | ||
"ip": "185.211.32.242" | ||
}, | ||
"link": { | ||
"id": "cm0faqkyn0001txvfwjfeq7gl", | ||
"id": "cm0lcuvtz000xcutmqw4a7wi3", | ||
"domain": "dub.sh", | ||
"key": "79ys3WA", | ||
"externalId": null, | ||
"key": "track-test", | ||
"url": "https://github.com/dubinc/dub", | ||
"trackConversion": true, | ||
"externalId": null, | ||
"tenantId": null, | ||
"archived": false, | ||
"expiresAt": null, | ||
"expiresAt": "1970-01-01T00:00:00.000Z", | ||
"expiredUrl": null, | ||
"password": null, | ||
"proxy": false, | ||
"title": null, | ||
"description": null, | ||
"image": null, | ||
"title": "GitHub - dubinc/dub: Open-source link management infrastructure. Loved by modern marketing teams like Vercel, Raycast...", | ||
"description": "Open-source link management infrastructure. Loved by modern marketing teams like Vercel, Raycast, and Perplexity. - dubinc/dub", | ||
"image": "https://repository-images.githubusercontent.com/529708137/419e9be4-a9d1-4c85-9f83-47a78ad92583", | ||
"video": null, | ||
"rewrite": false, | ||
"doIndex": false, | ||
"ios": null, | ||
"android": null, | ||
"geo": null, | ||
"publicStats": false, | ||
"tagId": null, | ||
"tags": [], | ||
"webhookIds": [], | ||
"comments": null, | ||
"shortLink": "https://dub.sh/79ys3WA", | ||
"qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1", | ||
"shortLink": "https://dub.sh/track-test", | ||
"qrCode": "https://api.dub.co/qr?url=https://dub.sh/track-test?qr=1", | ||
"utm_source": null, | ||
"utm_medium": null, | ||
"utm_campaign": null, | ||
"utm_term": null, | ||
"utm_content": null, | ||
"userId": "cm022rkcw0000ikt14mscg9sg", | ||
"workspaceId": "ws_cm022sis60003ikt1syy7kfhl", | ||
"clicks": 10, | ||
"lastClicked": "2024-08-30T07:45:09.000Z", | ||
"leads": 5, | ||
"sales": 1, | ||
"saleAmount": 20000, | ||
"createdAt": "2024-08-29T13:03:59.098Z", | ||
"updatedAt": "2024-08-30T09:57:50.891Z" | ||
"userId": "cludszk1h0000wmd2e0ea2b0p", | ||
"workspaceId": "ws_clrei1gld0002vs9mzn93p8ik", | ||
"clicks": 882, | ||
"lastClicked": "2025-01-14T04:49:10.000Z", | ||
"leads": 3632, | ||
"sales": 2812, | ||
"saleAmount": 290400, | ||
"createdAt": "2024-09-02T18:49:56.136Z", | ||
"updatedAt": "2025-01-14T04:49:30.459Z", | ||
"projectId": "clrei1gld0002vs9mzn93p8ik", | ||
"programId": "prog_CYCu7IMAapjkRpTnr8F1azjN" | ||
}, | ||
"sale": { | ||
"amount": 4500, | ||
"amount": 100, | ||
"currency": "usd", | ||
"paymentProcessor": "stripe", | ||
"invoiceId": null | ||
"invoiceId": "INV_AUTi534JCiBUVdYmevCSYQ9G" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import crypto from "node:crypto"; | ||
|
||
Object.defineProperty(globalThis, "crypto", { | ||
value: crypto, | ||
writable: false, // Ensure it's not writable | ||
configurable: true, // Allow reconfiguration if needed | ||
}); |
Oops, something went wrong.