The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Links
Kiran K8aa568e363ea
diff --git a/apps/docs/mint.json b/apps/docs/mint.jsonindex f9ca10ddf1..2a0cbe521a 100644--- a/apps/docs/mint.json+++ b/apps/docs/mint.json@@ -127,6 +127,18 @@{"group": "TypeScript","pages": [+ {+ "group": "Links",+ "pages": [+ "sdks/typescript/links/create",+ "sdks/typescript/links/get",+ "sdks/typescript/links/update",+ "sdks/typescript/links/delete",+ "sdks/typescript/links/list",+ "sdks/typescript/links/count",+ "sdks/typescript/links/createMany"+ ]+ },{"group": "Tags","pages": ["sdks/typescript/tags/create", "sdks/typescript/tags/list"]diff --git a/apps/docs/sdks/typescript/links/count.mdx b/apps/docs/sdks/typescript/links/count.mdxnew file mode 100644index 0000000000..58599687d4--- /dev/null+++ b/apps/docs/sdks/typescript/links/count.mdx@@ -0,0 +1,5 @@+---+title: "Count"+"og:title": "Retrieve the number of links - TypeScript SDK"+description: "Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links."+---diff --git a/apps/docs/sdks/typescript/links/create.mdx b/apps/docs/sdks/typescript/links/create.mdxindex c297742d41..fe67896806 100644--- a/apps/docs/sdks/typescript/links/create.mdx+++ b/apps/docs/sdks/typescript/links/create.mdx@@ -1,5 +1,58 @@---title: "Create"-"og:title": "Open-source libraries & SDKs for Dub.co API"-description: "Open-source client libraries for the Dub.co API"----\ No newline at end of file+"og:title": "Create a new link - TypeScript SDK"+description: "Create a new link for the authenticated workspace."+---++<RequestExample>++```ts+await dub.links.create({+ url: "https://www.google.com",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: 'clv3o9p9q000au1h0mc7r6l63',+ domain: 'dub.sh',+ key: 'e7qzMuI',+ url: 'https://www.google.com',+ archived: false,+ expiresAt: null,+ expiredUrl: null,+ password: null,+ proxy: false,+ title: null,+ description: null,+ image: null,+ rewrite: false,+ ios: null,+ android: null,+ geo: null,+ publicStats: false,+ tagId: null,+ tags: [],+ comments: null,+ shortLink: 'https://dub.sh/e7qzMuI',+ qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',+ utmSource: null,+ utmMedium: null,+ utmCampaign: null,+ utmTerm: null,+ utmContent: null,+ userId: 'cludszk1h0000wmd2e0ea2b0p',+ workspaceId: 'ws_clugls3tn000lwfotbpy30304',+ clicks: 0,+ lastClicked: null,+ createdAt: '2024-04-17T10:31:00.398Z',+ updatedAt: '2024-04-17T10:31:00.398Z',+ projectId: 'clugls3tn000lwfotbpy30304'+}+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/createMany b/apps/docs/sdks/typescript/links/createManynew file mode 100644index 0000000000..4f0d09d0ad--- /dev/null+++ b/apps/docs/sdks/typescript/links/createMany@@ -0,0 +1,5 @@+---+title: "CreateMany"+"og:title": "Bulk create links - TypeScript SDK"+description: "Bulk create up to 100 links for the authenticated workspace."+---diff --git a/apps/docs/sdks/typescript/links/delete.mdx b/apps/docs/sdks/typescript/links/delete.mdxnew file mode 100644index 0000000000..4b12d70c17--- /dev/null+++ b/apps/docs/sdks/typescript/links/delete.mdx@@ -0,0 +1,5 @@+---+title: "Delete"+"og:title": "Delete a link - TypeScript SDK"+description: "Delete a link for the authenticated workspace."+---diff --git a/apps/docs/sdks/typescript/links/get.mdx b/apps/docs/sdks/typescript/links/get.mdxnew file mode 100644index 0000000000..993eb29e6c--- /dev/null+++ b/apps/docs/sdks/typescript/links/get.mdx@@ -0,0 +1,59 @@+---+title: "Get"+"og:title": "Retrieve a link - TypeScript SDK"+description: "Retrieve the info for a link from their domain and key."+---++<RequestExample>++```ts+await dub.links.get({+ domain: "dub.sh",+ key: "e7qzMuI",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: 'clv3o9p9q000au1h0mc7r6l63',+ domain: 'dub.sh',+ key: 'e7qzMuI',+ url: 'https://www.google.com',+ archived: false,+ expiresAt: null,+ expiredUrl: null,+ password: null,+ proxy: false,+ title: null,+ description: null,+ image: null,+ rewrite: false,+ ios: null,+ android: null,+ geo: null,+ publicStats: false,+ tagId: null,+ tags: [],+ comments: null,+ shortLink: 'https://dub.sh/e7qzMuI',+ qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',+ utmSource: null,+ utmMedium: null,+ utmCampaign: null,+ utmTerm: null,+ utmContent: null,+ userId: 'cludszk1h0000wmd2e0ea2b0p',+ workspaceId: 'ws_clugls3tn000lwfotbpy30304',+ clicks: 0,+ lastClicked: null,+ createdAt: '2024-04-17T10:31:00.398Z',+ updatedAt: '2024-04-17T10:31:00.398Z',+ projectId: 'clugls3tn000lwfotbpy30304'+}+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/list.mdx b/apps/docs/sdks/typescript/links/list.mdxnew file mode 100644index 0000000000..00d2356acb--- /dev/null+++ b/apps/docs/sdks/typescript/links/list.mdx@@ -0,0 +1,5 @@+---+title: "List"+"og:title": "Retrieve a list of links - TypeScript SDK"+description: "Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links."+---diff --git a/apps/docs/sdks/typescript/links/update.mdx b/apps/docs/sdks/typescript/links/update.mdxnew file mode 100644index 0000000000..33fc3bd907--- /dev/null+++ b/apps/docs/sdks/typescript/links/update.mdx@@ -0,0 +1,59 @@+---+title: "Update"+"og:title": Edit a link - TypeScript SDK"+description: "Edit a link for the authenticated workspace."+---++<RequestExample>++```ts+await dub.links.get({+ domain: "dub.sh",+ key: "e7qzMuI",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: 'clv3o9p9q000au1h0mc7r6l63',+ domain: 'dub.sh',+ key: 'e7qzMuI',+ url: 'https://www.google.com',+ archived: false,+ expiresAt: null,+ expiredUrl: null,+ password: null,+ proxy: false,+ title: null,+ description: null,+ image: null,+ rewrite: false,+ ios: null,+ android: null,+ geo: null,+ publicStats: false,+ tagId: null,+ tags: [],+ comments: null,+ shortLink: 'https://dub.sh/e7qzMuI',+ qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',+ utmSource: null,+ utmMedium: null,+ utmCampaign: null,+ utmTerm: null,+ utmContent: null,+ userId: 'cludszk1h0000wmd2e0ea2b0p',+ workspaceId: 'ws_clugls3tn000lwfotbpy30304',+ clicks: 0,+ lastClicked: null,+ createdAt: '2024-04-17T10:31:00.398Z',+ updatedAt: '2024-04-17T10:31:00.398Z',+ projectId: 'clugls3tn000lwfotbpy30304'+}+```++</ResponseExample>