Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

improve the test sending webhooks

Kiran K42e80152c42c
diff --git a/apps/web/lib/actions/send-test-webhook.ts b/apps/web/lib/actions/send-test-webhook.ts
index ac7315caf6..0c437de322 100644
--- a/apps/web/lib/actions/send-test-webhook.ts
+++ b/apps/web/lib/actions/send-test-webhook.ts
@@ -1,9 +1,8 @@
"use server";
import { prisma } from "@/lib/prisma";
-import { webhookPayloadSchema } from "@/lib/webhook/schemas";
import { WEBHOOK_TRIGGERS } from "../webhook/constants";
-import { publishWebhookEventToQStash } from "../webhook/qstash";
+import { sendWebhooks } from "../webhook/qstash";
import { samplePayload } from "../webhook/sample-events/payload";
import z from "../zod";
import { authActionClient } from "./safe-action";
@@ -33,9 +32,10 @@ export const sendTestWebhookEvent = authActionClient
},
});
- await publishWebhookEventToQStash({
- webhook,
- payload: webhookPayloadSchema.parse(samplePayload[trigger]),
+ await sendWebhooks({
+ webhooks: [webhook],
+ trigger,
+ data: samplePayload[trigger],
});
return { ok: true };
diff --git a/apps/web/lib/webhook/sample-events/lead-created.json b/apps/web/lib/webhook/sample-events/lead-created.json
index da95905f4a..de07874092 100644
--- a/apps/web/lib/webhook/sample-events/lead-created.json
+++ b/apps/web/lib/webhook/sample-events/lead-created.json
@@ -1,69 +1,64 @@
{
- "id": "evt_P343bmyae40ALQYr5HT4vRXRd",
- "event": "lead.created",
- "createdAt": "2024-08-30T09:53:50.343Z",
- "data": {
- "eventName": "Sign up",
- "customer": {
- "id": "oU5P0SqI8fpwx5bxw1",
- "name": "John",
- "email": "[email protected]",
- "avatar": "https://example.com/john.jpeg"
- },
- "click": {
- "id": "d0UtZqE0BZuBPrJS",
- "url": "https://github.com/dubinc/dub",
- "ip": "63.141.57.109",
- "continent": "NA",
- "country": "US",
- "city": "San Francisco",
- "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,
- "qr": false,
- "referer": "(direct)"
- },
- "link": {
- "id": "cm0faqkyn0001txvfwjfeq7gl",
- "domain": "dub.sh",
- "key": "79ys3WA",
- "externalId": null,
- "url": "https://github.com/dubinc/dub",
- "trackConversion": true,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "comments": null,
- "shortLink": "https://dub.sh/79ys3WA",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?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"
- }
+ "eventName": "Sign up",
+ "customer": {
+ "id": "oU5P0SqI8fpwx5bxw1",
+ "name": "John",
+ "email": "[email protected]",
+ "avatar": "https://example.com/john.jpeg"
+ },
+ "click": {
+ "id": "d0UtZqE0BZuBPrJS",
+ "url": "https://github.com/dubinc/dub",
+ "ip": "63.141.57.109",
+ "continent": "NA",
+ "country": "US",
+ "city": "San Francisco",
+ "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,
+ "qr": false,
+ "referer": "(direct)"
+ },
+ "link": {
+ "id": "cm0faqkyn0001txvfwjfeq7gl",
+ "domain": "dub.sh",
+ "key": "79ys3WA",
+ "externalId": null,
+ "url": "https://github.com/dubinc/dub",
+ "trackConversion": true,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "comments": null,
+ "shortLink": "https://dub.sh/79ys3WA",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?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"
}
}
diff --git a/apps/web/lib/webhook/sample-events/link-clicked.json b/apps/web/lib/webhook/sample-events/link-clicked.json
index b4fb85c3b1..1e4c9ccd5a 100644
--- a/apps/web/lib/webhook/sample-events/link-clicked.json
+++ b/apps/web/lib/webhook/sample-events/link-clicked.json
@@ -1,61 +1,56 @@
{
- "id": "evt_b9ywgxWqai2glUpCQjclB17kM",
- "event": "link.clicked",
- "createdAt": "2024-08-30T10:16:13.149Z",
- "data": {
- "timestamp": "2024-08-30T10:16:12.124Z",
- "clickId": "d0UtZqE0BZuBPrJS",
+ "timestamp": "2024-08-30T10:16:12.124Z",
+ "clickId": "d0UtZqE0BZuBPrJS",
+ "url": "https://github.com/dubinc/dub",
+ "ip": "63.141.57.109",
+ "continent": "NA",
+ "country": "US",
+ "city": "San Francisco",
+ "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,
+ "qr": false,
+ "referer": "(direct)",
+ "link": {
+ "id": "cm0faqkyn0001txvfwjfeq7gl",
+ "domain": "dub.sh",
+ "key": "79ys3WA",
+ "externalId": null,
"url": "https://github.com/dubinc/dub",
- "ip": "63.141.57.109",
- "continent": "NA",
- "country": "US",
- "city": "San Francisco",
- "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,
- "qr": false,
- "referer": "(direct)",
- "link": {
- "id": "cm0faqkyn0001txvfwjfeq7gl",
- "domain": "dub.sh",
- "key": "79ys3WA",
- "externalId": null,
- "url": "https://github.com/dubinc/dub",
- "trackConversion": true,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "comments": null,
- "shortLink": "https://dub.sh/79ys3WA",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
- "utm_source": null,
- "utm_medium": null,
- "utm_campaign": null,
- "utm_term": null,
- "utm_content": null,
- "userId": "cm022rkcw0000ikt14mscg9sg",
- "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
- "clicks": 11,
- "lastClicked": "2024-08-30T07:45:09.000Z",
- "leads": 6,
- "sales": 10,
- "saleAmount": 200000,
- "createdAt": "2024-08-29T13:03:59.098Z",
- "updatedAt": "2024-08-30T10:16:12.126Z"
- }
+ "trackConversion": true,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "comments": null,
+ "shortLink": "https://dub.sh/79ys3WA",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
+ "utm_source": null,
+ "utm_medium": null,
+ "utm_campaign": null,
+ "utm_term": null,
+ "utm_content": null,
+ "userId": "cm022rkcw0000ikt14mscg9sg",
+ "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
+ "clicks": 11,
+ "lastClicked": "2024-08-30T07:45:09.000Z",
+ "leads": 6,
+ "sales": 10,
+ "saleAmount": 200000,
+ "createdAt": "2024-08-29T13:03:59.098Z",
+ "updatedAt": "2024-08-30T10:16:12.126Z"
}
}
diff --git a/apps/web/lib/webhook/sample-events/link-created.json b/apps/web/lib/webhook/sample-events/link-created.json
index f33855801c..f8b5cefa6d 100644
--- a/apps/web/lib/webhook/sample-events/link-created.json
+++ b/apps/web/lib/webhook/sample-events/link-created.json
@@ -1,48 +1,43 @@
{
- "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
- "event": "link.created",
- "createdAt": "2024-08-26T16:41:52.346Z",
- "data": {
- "id": "cm0b87844000dismqhkviju54",
- "domain": "dub.sh",
- "key": "sOvvXDT",
- "externalId": null,
- "url": "https://github.com/stack-auth/stack",
- "trackConversion": false,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "tagId": null,
- "tags": [],
- "comments": null,
- "shortLink": "https://dub.sh/sOvvXDT",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
- "utm_source": null,
- "utm_medium": null,
- "utm_campaign": null,
- "utm_term": null,
- "utm_content": null,
- "userId": "cm022rkcw0000ikt14mscg9sg",
- "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
- "clicks": 0,
- "lastClicked": null,
- "leads": 0,
- "sales": 0,
- "saleAmount": 0,
- "createdAt": "2024-08-26T16:41:52.084Z",
- "updatedAt": "2024-08-26T16:41:52.084Z",
- "projectId": "cm022sis60003ikt1syy7kfhl"
- }
+ "id": "cm0b87844000dismqhkviju54",
+ "domain": "dub.sh",
+ "key": "sOvvXDT",
+ "externalId": null,
+ "url": "https://github.com/stack-auth/stack",
+ "trackConversion": false,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "tagId": null,
+ "tags": [],
+ "comments": null,
+ "shortLink": "https://dub.sh/sOvvXDT",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
+ "utm_source": null,
+ "utm_medium": null,
+ "utm_campaign": null,
+ "utm_term": null,
+ "utm_content": null,
+ "userId": "cm022rkcw0000ikt14mscg9sg",
+ "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
+ "clicks": 0,
+ "lastClicked": null,
+ "leads": 0,
+ "sales": 0,
+ "saleAmount": 0,
+ "createdAt": "2024-08-26T16:41:52.084Z",
+ "updatedAt": "2024-08-26T16:41:52.084Z",
+ "projectId": "cm022sis60003ikt1syy7kfhl"
}
diff --git a/apps/web/lib/webhook/sample-events/link-deleted.json b/apps/web/lib/webhook/sample-events/link-deleted.json
index 21b566cc55..f8b5cefa6d 100644
--- a/apps/web/lib/webhook/sample-events/link-deleted.json
+++ b/apps/web/lib/webhook/sample-events/link-deleted.json
@@ -1,48 +1,43 @@
{
- "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
- "event": "link.deleted",
- "createdAt": "2024-08-26T16:41:52.346Z",
- "data": {
- "id": "cm0b87844000dismqhkviju54",
- "domain": "dub.sh",
- "key": "sOvvXDT",
- "externalId": null,
- "url": "https://github.com/stack-auth/stack",
- "trackConversion": false,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "tagId": null,
- "tags": [],
- "comments": null,
- "shortLink": "https://dub.sh/sOvvXDT",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
- "utm_source": null,
- "utm_medium": null,
- "utm_campaign": null,
- "utm_term": null,
- "utm_content": null,
- "userId": "cm022rkcw0000ikt14mscg9sg",
- "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
- "clicks": 0,
- "lastClicked": null,
- "leads": 0,
- "sales": 0,
- "saleAmount": 0,
- "createdAt": "2024-08-26T16:41:52.084Z",
- "updatedAt": "2024-08-26T16:41:52.084Z",
- "projectId": "cm022sis60003ikt1syy7kfhl"
- }
+ "id": "cm0b87844000dismqhkviju54",
+ "domain": "dub.sh",
+ "key": "sOvvXDT",
+ "externalId": null,
+ "url": "https://github.com/stack-auth/stack",
+ "trackConversion": false,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "tagId": null,
+ "tags": [],
+ "comments": null,
+ "shortLink": "https://dub.sh/sOvvXDT",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
+ "utm_source": null,
+ "utm_medium": null,
+ "utm_campaign": null,
+ "utm_term": null,
+ "utm_content": null,
+ "userId": "cm022rkcw0000ikt14mscg9sg",
+ "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
+ "clicks": 0,
+ "lastClicked": null,
+ "leads": 0,
+ "sales": 0,
+ "saleAmount": 0,
+ "createdAt": "2024-08-26T16:41:52.084Z",
+ "updatedAt": "2024-08-26T16:41:52.084Z",
+ "projectId": "cm022sis60003ikt1syy7kfhl"
}
diff --git a/apps/web/lib/webhook/sample-events/link-updated.json b/apps/web/lib/webhook/sample-events/link-updated.json
index 247c982491..f8b5cefa6d 100644
--- a/apps/web/lib/webhook/sample-events/link-updated.json
+++ b/apps/web/lib/webhook/sample-events/link-updated.json
@@ -1,48 +1,43 @@
{
- "id": "event_KleiO4HBwZFbO1vZLWIPZ2AtX",
- "event": "link.updated",
- "createdAt": "2024-08-26T16:41:52.346Z",
- "data": {
- "id": "cm0b87844000dismqhkviju54",
- "domain": "dub.sh",
- "key": "sOvvXDT",
- "externalId": null,
- "url": "https://github.com/stack-auth/stack",
- "trackConversion": false,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "tagId": null,
- "tags": [],
- "comments": null,
- "shortLink": "https://dub.sh/sOvvXDT",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
- "utm_source": null,
- "utm_medium": null,
- "utm_campaign": null,
- "utm_term": null,
- "utm_content": null,
- "userId": "cm022rkcw0000ikt14mscg9sg",
- "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
- "clicks": 0,
- "lastClicked": null,
- "leads": 0,
- "sales": 0,
- "saleAmount": 0,
- "createdAt": "2024-08-26T16:41:52.084Z",
- "updatedAt": "2024-08-26T16:41:52.084Z",
- "projectId": "cm022sis60003ikt1syy7kfhl"
- }
+ "id": "cm0b87844000dismqhkviju54",
+ "domain": "dub.sh",
+ "key": "sOvvXDT",
+ "externalId": null,
+ "url": "https://github.com/stack-auth/stack",
+ "trackConversion": false,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "tagId": null,
+ "tags": [],
+ "comments": null,
+ "shortLink": "https://dub.sh/sOvvXDT",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
+ "utm_source": null,
+ "utm_medium": null,
+ "utm_campaign": null,
+ "utm_term": null,
+ "utm_content": null,
+ "userId": "cm022rkcw0000ikt14mscg9sg",
+ "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
+ "clicks": 0,
+ "lastClicked": null,
+ "leads": 0,
+ "sales": 0,
+ "saleAmount": 0,
+ "createdAt": "2024-08-26T16:41:52.084Z",
+ "updatedAt": "2024-08-26T16:41:52.084Z",
+ "projectId": "cm022sis60003ikt1syy7kfhl"
}
diff --git a/apps/web/lib/webhook/sample-events/payload.ts b/apps/web/lib/webhook/sample-events/payload.ts
index 190a7398f2..3c5e669c0c 100644
--- a/apps/web/lib/webhook/sample-events/payload.ts
+++ b/apps/web/lib/webhook/sample-events/payload.ts
@@ -5,6 +5,8 @@ import linkDeleted from "./link-deleted.json";
import linkUpdated from "./link-updated.json";
import saleCreated from "./sale-created.json";
+// TODO:
+// Make this more typesafe
export const samplePayload = {
"link.created": linkCreated,
"link.updated": linkUpdated,
@@ -12,4 +14,4 @@ export const samplePayload = {
"link.clicked": linkClicked,
"lead.created": leadCreated,
"sale.created": saleCreated,
-};
+} as any;
diff --git a/apps/web/lib/webhook/sample-events/sale-created.json b/apps/web/lib/webhook/sample-events/sale-created.json
index 60afa05983..906774dd3b 100644
--- a/apps/web/lib/webhook/sample-events/sale-created.json
+++ b/apps/web/lib/webhook/sample-events/sale-created.json
@@ -1,69 +1,64 @@
{
- "id": "evt_WHjyHhqsfYOrlJOOVJSoHXysD",
- "event": "sale.created",
- "createdAt": "2024-08-30T09:57:51.245Z",
- "data": {
- "eventName": "Purchased",
- "customer": {
- "id": "cm0gjdvr20001dkbha2n9gt2b",
- "name": "John",
- "email": "[email protected]",
- "avatar": "https://example.com/john.jpeg"
- },
- "click": {
- "id": "d0UtZqE0BZuBPrJS",
- "url": "https://github.com/dubinc/dub",
- "ip": "63.141.57.109",
- "continent": "NA",
- "country": "US",
- "city": "San Francisco",
- "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,
- "qr": false,
- "referer": "(direct)"
- },
- "link": {
- "id": "cm0faqkyn0001txvfwjfeq7gl",
- "domain": "dub.sh",
- "key": "79ys3WA",
- "externalId": null,
- "url": "https://github.com/dubinc/dub",
- "trackConversion": true,
- "archived": false,
- "expiresAt": null,
- "expiredUrl": null,
- "password": null,
- "proxy": false,
- "title": null,
- "description": null,
- "image": null,
- "video": null,
- "rewrite": false,
- "doIndex": false,
- "ios": null,
- "android": null,
- "geo": null,
- "publicStats": false,
- "comments": null,
- "shortLink": "https://dub.sh/79ys3WA",
- "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?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"
- }
+ "eventName": "Purchased",
+ "customer": {
+ "id": "cm0gjdvr20001dkbha2n9gt2b",
+ "name": "John",
+ "email": "[email protected]",
+ "avatar": "https://example.com/john.jpeg"
+ },
+ "click": {
+ "id": "d0UtZqE0BZuBPrJS",
+ "url": "https://github.com/dubinc/dub",
+ "ip": "63.141.57.109",
+ "continent": "NA",
+ "country": "US",
+ "city": "San Francisco",
+ "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,
+ "qr": false,
+ "referer": "(direct)"
+ },
+ "link": {
+ "id": "cm0faqkyn0001txvfwjfeq7gl",
+ "domain": "dub.sh",
+ "key": "79ys3WA",
+ "externalId": null,
+ "url": "https://github.com/dubinc/dub",
+ "trackConversion": true,
+ "archived": false,
+ "expiresAt": null,
+ "expiredUrl": null,
+ "password": null,
+ "proxy": false,
+ "title": null,
+ "description": null,
+ "image": null,
+ "video": null,
+ "rewrite": false,
+ "doIndex": false,
+ "ios": null,
+ "android": null,
+ "geo": null,
+ "publicStats": false,
+ "comments": null,
+ "shortLink": "https://dub.sh/79ys3WA",
+ "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?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"
}
}