Skip to content

Commit 510fb48

Browse files
committed
improvement(dub): add manual docs description and lint formatting fixes
1 parent d5a8926 commit 510fb48

File tree

12 files changed

+61
-39
lines changed

12 files changed

+61
-39
lines changed

apps/docs/components/icons.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4806,17 +4806,12 @@ export function CursorIcon(props: SVGProps<SVGSVGElement>) {
48064806

48074807
export function DubIcon(props: SVGProps<SVGSVGElement>) {
48084808
return (
4809-
<svg
4810-
{...props}
4811-
viewBox="0 0 64 64"
4812-
fill="none"
4813-
xmlns="http://www.w3.org/2000/svg"
4814-
>
4809+
<svg {...props} viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg'>
48154810
<path
4816-
fillRule="evenodd"
4817-
clipRule="evenodd"
4818-
d="M32 64c17.673 0 32-14.327 32-32 0-11.844-6.435-22.186-16-27.719V48h-8v-2.14A15.9 15.9 0 0 1 32 48c-8.837 0-16-7.163-16-16s7.163-16 16-16c2.914 0 5.647.78 8 2.14V1.008A32 32 0 0 0 32 0C14.327 0 0 14.327 0 32s14.327 32 32 32"
4819-
fill="currentColor"
4811+
fillRule='evenodd'
4812+
clipRule='evenodd'
4813+
d='M32 64c17.673 0 32-14.327 32-32 0-11.844-6.435-22.186-16-27.719V48h-8v-2.14A15.9 15.9 0 0 1 32 48c-8.837 0-16-7.163-16-16s7.163-16 16-16c2.914 0 5.647.78 8 2.14V1.008A32 32 0 0 0 32 0C14.327 0 0 14.327 0 32s14.327 32 32 32'
4814+
fill='currentColor'
48204815
/>
48214816
</svg>
48224817
)

apps/docs/components/ui/icon-mapping.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ import {
4444
FirecrawlIcon,
4545
FirefliesIcon,
4646
GammaIcon,
47-
GitLabIcon,
4847
GithubIcon,
48+
GitLabIcon,
4949
GmailIcon,
5050
GongIcon,
5151
GoogleBigQueryIcon,
@@ -86,9 +86,9 @@ import {
8686
LinkupIcon,
8787
LoopsIcon,
8888
LumaIcon,
89-
MailServerIcon,
9089
MailchimpIcon,
9190
MailgunIcon,
91+
MailServerIcon,
9292
Mem0Icon,
9393
MicrosoftDataverseIcon,
9494
MicrosoftExcelIcon,
@@ -122,8 +122,6 @@ import {
122122
ResendIcon,
123123
RevenueCatIcon,
124124
S3Icon,
125-
SQSIcon,
126-
STTIcon,
127125
SalesforceIcon,
128126
SearchIcon,
129127
SendgridIcon,
@@ -135,17 +133,19 @@ import {
135133
SimilarwebIcon,
136134
SlackIcon,
137135
SmtpIcon,
136+
SQSIcon,
138137
SshIcon,
138+
STTIcon,
139139
StagehandIcon,
140140
StripeIcon,
141141
SupabaseIcon,
142-
TTSIcon,
143142
TavilyIcon,
144143
TelegramIcon,
145144
TextractIcon,
146145
TinybirdIcon,
147146
TranslateIcon,
148147
TrelloIcon,
148+
TTSIcon,
149149
TwilioIcon,
150150
TypeformIcon,
151151
UpstashIcon,
@@ -156,11 +156,11 @@ import {
156156
WhatsAppIcon,
157157
WikipediaIcon,
158158
WordpressIcon,
159+
xIcon,
159160
YouTubeIcon,
160161
ZendeskIcon,
161162
ZepIcon,
162163
ZoomIcon,
163-
xIcon,
164164
} from '@/components/icons'
165165

166166
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>

apps/docs/content/docs/en/tools/dub.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,27 @@ description: Link management with Dub
55

66
import { BlockInfoCard } from "@/components/ui/block-info-card"
77

8-
<BlockInfoCard
8+
<BlockInfoCard
99
type="dub"
1010
color="#181C1E"
1111
/>
1212

13+
{/* MANUAL-CONTENT-START:intro */}
14+
[Dub](https://dub.co/) is an open-source link management platform for modern marketing teams. It provides powerful short link creation, analytics, and tracking capabilities with enterprise-grade infrastructure.
15+
16+
With the Dub integration in Sim, you can:
17+
18+
- **Create short links**: Generate branded short links with custom domains, slugs, and UTM parameters
19+
- **Upsert links**: Create or update links idempotently by destination URL
20+
- **Retrieve link info**: Look up link details by ID, external ID, or domain + key combination
21+
- **Update links**: Modify destination URLs, metadata, UTM parameters, and link settings
22+
- **Delete links**: Remove short links by ID or external ID
23+
- **List links**: Search and filter links with pagination, sorting, and tag filtering
24+
- **Get analytics**: Retrieve click, lead, and sales analytics with grouping by time, geography, device, browser, referer, and more
25+
26+
In Sim, the Dub integration enables your agents to manage short links and track their performance programmatically. Use it to create trackable links as part of marketing workflows, monitor link engagement, and make data-driven decisions based on click analytics and conversion metrics.
27+
{/* MANUAL-CONTENT-END */}
28+
1329
## Usage Instructions
1430

1531
Create, manage, and track short links with Dub. Supports custom domains, UTM parameters, link analytics, and more.

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@
161161
"zep",
162162
"zoom"
163163
]
164-
}
164+
}

apps/sim/blocks/blocks/dub.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,15 @@ export const DubBlock: BlockConfig<DubResponse> = {
478478
utm_campaign: { type: 'string', description: 'UTM campaign parameter', optional: true },
479479
utm_term: { type: 'string', description: 'UTM term parameter', optional: true },
480480
utm_content: { type: 'string', description: 'UTM content parameter', optional: true },
481-
links: { type: 'json', description: 'Array of links (id, domain, key, url, shortLink, clicks, tags, createdAt)' },
481+
links: {
482+
type: 'json',
483+
description: 'Array of links (id, domain, key, url, shortLink, clicks, tags, createdAt)',
484+
},
482485
count: { type: 'number', description: 'Number of links returned (list operation)' },
483-
data: { type: 'json', description: 'Grouped analytics data (timeseries, countries, devices, etc.)', optional: true },
486+
data: {
487+
type: 'json',
488+
description: 'Grouped analytics data (timeseries, countries, devices, etc.)',
489+
optional: true,
490+
},
484491
},
485492
}

apps/sim/components/icons.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4806,17 +4806,12 @@ export function CursorIcon(props: SVGProps<SVGSVGElement>) {
48064806

48074807
export function DubIcon(props: SVGProps<SVGSVGElement>) {
48084808
return (
4809-
<svg
4810-
{...props}
4811-
viewBox="0 0 64 64"
4812-
fill="none"
4813-
xmlns="http://www.w3.org/2000/svg"
4814-
>
4809+
<svg {...props} viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg'>
48154810
<path
4816-
fillRule="evenodd"
4817-
clipRule="evenodd"
4818-
d="M32 64c17.673 0 32-14.327 32-32 0-11.844-6.435-22.186-16-27.719V48h-8v-2.14A15.9 15.9 0 0 1 32 48c-8.837 0-16-7.163-16-16s7.163-16 16-16c2.914 0 5.647.78 8 2.14V1.008A32 32 0 0 0 32 0C14.327 0 0 14.327 0 32s14.327 32 32 32"
4819-
fill="currentColor"
4811+
fillRule='evenodd'
4812+
clipRule='evenodd'
4813+
d='M32 64c17.673 0 32-14.327 32-32 0-11.844-6.435-22.186-16-27.719V48h-8v-2.14A15.9 15.9 0 0 1 32 48c-8.837 0-16-7.163-16-16s7.163-16 16-16c2.914 0 5.647.78 8 2.14V1.008A32 32 0 0 0 32 0C14.327 0 0 14.327 0 32s14.327 32 32 32'
4814+
fill='currentColor'
48204815
/>
48214816
</svg>
48224817
)

apps/sim/tools/dub/create_link.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import type { ToolConfig } from '@/tools/types'
44
export const createLinkTool: ToolConfig<DubCreateLinkParams, DubCreateLinkResponse> = {
55
id: 'dub_create_link',
66
name: 'Dub Create Link',
7-
description: 'Create a new short link with Dub. Supports custom domains, slugs, UTM parameters, and more.',
7+
description:
8+
'Create a new short link with Dub. Supports custom domains, slugs, UTM parameters, and more.',
89
version: '1.0.0',
910

1011
params: {

apps/sim/tools/dub/get_analytics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import type { ToolConfig } from '@/tools/types'
44
export const getAnalyticsTool: ToolConfig<DubGetAnalyticsParams, DubGetAnalyticsResponse> = {
55
id: 'dub_get_analytics',
66
name: 'Dub Get Analytics',
7-
description: 'Retrieve analytics for links including clicks, leads, and sales. Supports filtering by link, time range, and grouping by various dimensions.',
7+
description:
8+
'Retrieve analytics for links including clicks, leads, and sales. Supports filtering by link, time range, and grouping by various dimensions.',
89
version: '1.0.0',
910

1011
params: {
@@ -24,7 +25,8 @@ export const getAnalyticsTool: ToolConfig<DubGetAnalyticsParams, DubGetAnalytics
2425
type: 'string',
2526
required: false,
2627
visibility: 'user-or-llm',
27-
description: 'Group results by: count (default), timeseries, countries, cities, devices, browsers, os, referers, top_links, top_urls',
28+
description:
29+
'Group results by: count (default), timeseries, countries, cities, devices, browsers, os, referers, top_links, top_urls',
2830
},
2931
linkId: {
3032
type: 'string',

apps/sim/tools/dub/get_link.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import type { ToolConfig } from '@/tools/types'
44
export const getLinkTool: ToolConfig<DubGetLinkParams, DubGetLinkResponse> = {
55
id: 'dub_get_link',
66
name: 'Dub Get Link',
7-
description: 'Retrieve information about a short link by its link ID, external ID, or domain + key combination.',
7+
description:
8+
'Retrieve information about a short link by its link ID, external ID, or domain + key combination.',
89
version: '1.0.0',
910

1011
params: {

apps/sim/tools/dub/list_links.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import type { ToolConfig } from '@/tools/types'
44
export const listLinksTool: ToolConfig<DubListLinksParams, DubListLinksResponse> = {
55
id: 'dub_list_links',
66
name: 'Dub List Links',
7-
description: 'Retrieve a paginated list of short links for the authenticated workspace. Supports filtering by domain, search query, tags, and sorting.',
7+
description:
8+
'Retrieve a paginated list of short links for the authenticated workspace. Supports filtering by domain, search query, tags, and sorting.',
89
version: '1.0.0',
910

1011
params: {
@@ -70,7 +71,8 @@ export const listLinksTool: ToolConfig<DubListLinksParams, DubListLinksResponse>
7071
if (params.domain) url.searchParams.set('domain', params.domain)
7172
if (params.search) url.searchParams.set('search', params.search)
7273
if (params.tagIds) url.searchParams.set('tagIds', params.tagIds)
73-
if (params.showArchived !== undefined) url.searchParams.set('showArchived', String(params.showArchived))
74+
if (params.showArchived !== undefined)
75+
url.searchParams.set('showArchived', String(params.showArchived))
7476
if (params.sortBy) url.searchParams.set('sortBy', params.sortBy)
7577
if (params.sortOrder) url.searchParams.set('sortOrder', params.sortOrder)
7678
if (params.page) url.searchParams.set('page', String(params.page))
@@ -129,7 +131,8 @@ export const listLinksTool: ToolConfig<DubListLinksParams, DubListLinksResponse>
129131
outputs: {
130132
links: {
131133
type: 'json',
132-
description: 'Array of link objects (id, domain, key, url, shortLink, clicks, tags, createdAt)',
134+
description:
135+
'Array of link objects (id, domain, key, url, shortLink, clicks, tags, createdAt)',
133136
},
134137
count: {
135138
type: 'number',

0 commit comments

Comments
 (0)