The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
workspaces
Kiran K1146d3dc54dc
diff --git a/apps/docs/mint.json b/apps/docs/mint.jsonindex 4b7fe8aca1..f9ca10ddf1 100644--- a/apps/docs/mint.json+++ b/apps/docs/mint.json@@ -130,6 +130,14 @@{"group": "Tags","pages": ["sdks/typescript/tags/create", "sdks/typescript/tags/list"]+ },+ {+ "group": "Workspaces",+ "pages": [+ "sdks/typescript/workspaces/create",+ "sdks/typescript/workspaces/get",+ "sdks/typescript/workspaces/list"+ ]}]}diff --git a/apps/docs/sdks/typescript/workspaces/create.mdx b/apps/docs/sdks/typescript/workspaces/create.mdxnew file mode 100644index 0000000000..ad93c4c44d--- /dev/null+++ b/apps/docs/sdks/typescript/workspaces/create.mdx@@ -0,0 +1,143 @@+---+title: "Create"+"og:title": "Create a workspace - TypeScript SDK"+description: "Create a new workspace for the authenticated user."+---++## Arguments++<ParamField body="name" type="string" required>+ The name of the workspace.+</ParamField>++<ParamField body="slug" type="string" required>+ The unique slug of the workspace. It must be unique across all workspaces.+</ParamField>++<ParamField body="domain" type="string">+ The domain of the workspace.+</ParamField>++## Response++<ResponseField name="id" type="string" required>+ The unique ID of the workspace.+</ResponseField>++<ResponseField name="name" type="string" required>+ The name of the workspace.+</ResponseField>++<ResponseField name="slug" type="string" required>+ The slug of the workspace.+</ResponseField>++<ResponseField name="logo" type="string | null" required>+ The logo of the workspace.+</ResponseField>++<ResponseField name="usage" type="number" required>+ The usage of the workspace.+</ResponseField>++<ResponseField name="usageLimit" type="number" required>+ The usage limit of the workspace.+</ResponseField>++<ResponseField name="linksUsage" type="number" required>+ The links usage of the workspace.+</ResponseField>++<ResponseField name="linksLimit" type="number" required>+ The links limit of the workspace.+</ResponseField>++<ResponseField name="domainsLimit" type="number" required>+ The domains limit of the workspace.+</ResponseField>++<ResponseField name="tagsLimit" type="number" required>+ The tags limit of the workspace.+</ResponseField>++<ResponseField name="usersLimit" type="number" required>+ The users limit of the workspace.+</ResponseField>++<ResponseField name="plan" type="string" required>+ The plan of the workspace.+</ResponseField>++<ResponseField name="stripeId" type="string | null" required>+ The Stripe ID of the workspace.+</ResponseField>++<ResponseField name="billingCycleStart" type="number" required>+ The date and time when the billing cycle starts for the workspace.+</ResponseField>++<ResponseField name="createdAt" type="string" required>+ The date and time when the workspace was created.+</ResponseField>++<ResponseField name="users" type="object[]" required>+The role of the authenticated user in the workspace.++ <Expandable title="properties">+ <ResponseField name="users.role" type="string" required>+ The role of the authenticated user in the workspace.+ </ResponseField>+ </Expandable>+</ResponseField>++<ResponseField name="domains" type="object[]" required>+The domains of the workspace.++ <Expandable title="properties">+ <ResponseField name="domains.slug" type="string">+ The domain of the workspace.+ </ResponseField>++ <ResponseField name="domains.primary" type="string">+ Indicates if the domain is the primary domain.+ </ResponseField>++ </Expandable>+</ResponseField>++<RequestExample>++```ts+await dub.workspaces.create({+ name: "Acme",+ slug: "acme",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: 'clv3mw4qb00008tvuw86c53db',+ name: 'Acme',+ slug: 'acme',+ logo: null,+ usage: 0,+ usageLimit: 1000,+ linksUsage: 0,+ linksLimit: 25,+ domainsLimit: 3,+ tagsLimit: 5,+ usersLimit: 1,+ plan: 'free',+ stripeId: null,+ billingCycleStart: 17,+ createdAt: '2024-04-17T09:52:27.635Z',+ users: [ { role: 'owner' } ],+ domains: []+}+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/workspaces/get.mdx b/apps/docs/sdks/typescript/workspaces/get.mdxnew file mode 100644index 0000000000..96964866b6--- /dev/null+++ b/apps/docs/sdks/typescript/workspaces/get.mdx@@ -0,0 +1,140 @@+---+title: "Get"+"og:title": "Retrieve a workspace - TypeScript SDK"+description: "Retrieve a workspace for the authenticated user."+---++## Arguments++<ParamField body="idOrSlug" type="string" required>+ The unique ID or slug of the workspace.+</ParamField>++## Response++<ResponseField name="id" type="string" required>+ The unique ID of the workspace.+</ResponseField>++<ResponseField name="name" type="string" required>+ The name of the workspace.+</ResponseField>++<ResponseField name="slug" type="string" required>+ The slug of the workspace.+</ResponseField>++<ResponseField name="logo" type="string | null" required>+ The logo of the workspace.+</ResponseField>++<ResponseField name="usage" type="number" required>+ The usage of the workspace.+</ResponseField>++<ResponseField name="usageLimit" type="number" required>+ The usage limit of the workspace.+</ResponseField>++<ResponseField name="linksUsage" type="number" required>+ The links usage of the workspace.+</ResponseField>++<ResponseField name="linksLimit" type="number" required>+ The links limit of the workspace.+</ResponseField>++<ResponseField name="domainsLimit" type="number" required>+ The domains limit of the workspace.+</ResponseField>++<ResponseField name="tagsLimit" type="number" required>+ The tags limit of the workspace.+</ResponseField>++<ResponseField name="usersLimit" type="number" required>+ The users limit of the workspace.+</ResponseField>++<ResponseField name="plan" type="string" required>+ The plan of the workspace.+</ResponseField>++<ResponseField name="stripeId" type="string | null" required>+ The Stripe ID of the workspace.+</ResponseField>++<ResponseField name="billingCycleStart" type="number" required>+ The date and time when the billing cycle starts for the workspace.+</ResponseField>++<ResponseField name="createdAt" type="string" required>+ The date and time when the workspace was created.+</ResponseField>++<ResponseField name="users" type="object[]" required>+The role of the authenticated user in the workspace.++ <Expandable title="properties">+ <ResponseField name="users.role" type="string" required>+ The role of the authenticated user in the workspace.+ </ResponseField>+ </Expandable>+</ResponseField>++<ResponseField name="domains" type="object[]" required>+The domains of the workspace.++ <Expandable title="properties">+ <ResponseField name="domains.slug" type="string">+ The domain of the workspace.+ </ResponseField>++ <ResponseField name="domains.primary" type="string">+ Indicates if the domain is the primary domain.+ </ResponseField>++ </Expandable>+</ResponseField>++<RequestExample>++```ts+// Retrieve a workspace by ID+await dub.workspaces.get({+ idOrSlug: "clv3mw4qb00008tvuw86c53db,+});++// Retrieve a workspace by slug+await dub.workspaces.get({+ idOrSlug: "acme",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: 'clv3mw4qb00008tvuw86c53db',+ name: 'Acme',+ slug: 'acme',+ logo: null,+ usage: 0,+ usageLimit: 1000,+ linksUsage: 0,+ linksLimit: 25,+ domainsLimit: 3,+ tagsLimit: 5,+ usersLimit: 1,+ plan: 'free',+ stripeId: null,+ billingCycleStart: 17,+ createdAt: '2024-04-17T09:52:27.635Z',+ users: [ { role: 'owner' } ],+ domains: []+}+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/workspaces/list.mdx b/apps/docs/sdks/typescript/workspaces/list.mdxnew file mode 100644index 0000000000..0efa25b747--- /dev/null+++ b/apps/docs/sdks/typescript/workspaces/list.mdx@@ -0,0 +1,128 @@+---+title: "List"+"og:title": "Retrieve a list of workspaces - TypeScript SDK"+description: "Retrieve a list of workspaces for the authenticated user."+---++## Response++<ResponseField name="id" type="string" required>+ The unique ID of the workspace.+</ResponseField>++<ResponseField name="name" type="string" required>+ The name of the workspace.+</ResponseField>++<ResponseField name="slug" type="string" required>+ The slug of the workspace.+</ResponseField>++<ResponseField name="logo" type="string | null" required>+ The logo of the workspace.+</ResponseField>++<ResponseField name="usage" type="number" required>+ The usage of the workspace.+</ResponseField>++<ResponseField name="usageLimit" type="number" required>+ The usage limit of the workspace.+</ResponseField>++<ResponseField name="linksUsage" type="number" required>+ The links usage of the workspace.+</ResponseField>++<ResponseField name="linksLimit" type="number" required>+ The links limit of the workspace.+</ResponseField>++<ResponseField name="domainsLimit" type="number" required>+ The domains limit of the workspace.+</ResponseField>++<ResponseField name="tagsLimit" type="number" required>+ The tags limit of the workspace.+</ResponseField>++<ResponseField name="usersLimit" type="number" required>+ The users limit of the workspace.+</ResponseField>++<ResponseField name="plan" type="string" required>+ The plan of the workspace.+</ResponseField>++<ResponseField name="stripeId" type="string | null" required>+ The Stripe ID of the workspace.+</ResponseField>++<ResponseField name="billingCycleStart" type="number" required>+ The date and time when the billing cycle starts for the workspace.+</ResponseField>++<ResponseField name="createdAt" type="string" required>+ The date and time when the workspace was created.+</ResponseField>++<ResponseField name="users" type="object[]" required>+The role of the authenticated user in the workspace.++ <Expandable title="properties">+ <ResponseField name="users.role" type="string" required>+ The role of the authenticated user in the workspace.+ </ResponseField>+ </Expandable>+</ResponseField>++<ResponseField name="domains" type="object[]" required>+The domains of the workspace.++ <Expandable title="properties">+ <ResponseField name="domains.slug" type="string">+ The domain of the workspace.+ </ResponseField>++ <ResponseField name="domains.primary" type="string">+ Indicates if the domain is the primary domain.+ </ResponseField>++ </Expandable>+</ResponseField>++<RequestExample>++```ts+await dub.workspaces.list({});+```++</RequestExample>++<ResponseExample>++```ts+[+ {+ id: "clv3mw4qb00008tvuw86c53db",+ name: "Acme",+ slug: "acme",+ logo: null,+ usage: 0,+ usageLimit: 1000,+ linksUsage: 0,+ linksLimit: 25,+ domainsLimit: 3,+ tagsLimit: 5,+ usersLimit: 1,+ plan: "free",+ stripeId: null,+ billingCycleStart: 17,+ createdAt: "2024-04-17T09:52:27.635Z",+ users: [{ role: "owner" }],+ domains: [],+ },+];+```++</ResponseExample>