The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
chore: Update workspace and tag API references
Kiran Kd67e844f1ad7
diff --git a/apps/docs/mint.json b/apps/docs/mint.jsonindex 7b5170bc11..52e40291aa 100644--- a/apps/docs/mint.json+++ b/apps/docs/mint.json@@ -134,7 +134,10 @@},{"group": "Workspaces",- "pages": ["api-reference/endpoint/retrieve-a-workspace"]+ "pages": [+ "api-reference/endpoint/retrieve-a-workspace",+ "api-reference/endpoint/update-a-workspace"+ ]},{"group": "Domains",@@ -149,7 +152,8 @@"group": "Tags","pages": ["api-reference/endpoint/create-a-new-tag",- "api-reference/endpoint/retrieve-a-list-of-tags"+ "api-reference/endpoint/retrieve-a-list-of-tags",+ "api-reference/endpoint/update-a-tag"]},{@@ -195,9 +199,8 @@"group": "Workspaces","icon": "folder","pages": [- "sdks/typescript/workspaces/create","sdks/typescript/workspaces/get",- "sdks/typescript/workspaces/list"+ "sdks/typescript/workspaces/update"]},{@@ -213,7 +216,11 @@{"group": "Tags","icon": "tag",- "pages": ["sdks/typescript/tags/create", "sdks/typescript/tags/list"]+ "pages": [+ "sdks/typescript/tags/create",+ "sdks/typescript/tags/list",+ "sdks/typescript/tags/update"+ ]},{"group": "Metatags",diff --git a/apps/docs/sdks/typescript/tags/update.mdx b/apps/docs/sdks/typescript/tags/update.mdxnew file mode 100644index 0000000000..33e2923682--- /dev/null+++ b/apps/docs/sdks/typescript/tags/update.mdx@@ -0,0 +1,45 @@+---+title: "dub.tags.update"+sidebarTitle: "Update"+"og:title": "dub.tags.update - Update a tag - TypeScript SDK"+description: "Update a tag for the authenticated user."+---++import TagResponse from "/snippets/tag-response.mdx";++## Arguments++<ParamField body="name" type="string">+ The name of the tag to update.+</ParamField>++<ParamField body="color" type="string">+ The color of the tag.+</ParamField>++## Response++<TagResponse />++<RequestExample>++```ts+await dub.tags.update("cluibmjj5000975qol4hnx0t7", {+ name: "Jobs",+ color: "red",+});+```++</RequestExample>++<ResponseExample>++```ts+{+ id: "clv3j1h7o00032u1ngo8luv84",+ name: "news",+ color: "blue"+}+````++</ResponseExample>diff --git a/apps/docs/sdks/typescript/workspaces/update.mdx b/apps/docs/sdks/typescript/workspaces/update.mdxnew file mode 100644index 0000000000..f8ee3956e7--- /dev/null+++ b/apps/docs/sdks/typescript/workspaces/update.mdx@@ -0,0 +1,68 @@+---+title: "dub.workspaces.update"+sidebarTitle: "Update"+"og:title": "dub.workspaces.update - Update a workspace - TypeScript SDK"+description: "Update a workspace for the authenticated user."+---++import WorkspaceResponse from "/snippets/workspace-response.mdx";++## Arguments++<ParamField body="idOrSlug" type="string" required>+ The unique ID or slug of the workspace.+</ParamField>++<ParamField body="name" type="string">+ The name of the workspace.+</ParamField>++<ParamField body="slug" type="string">+ The slug of the workspace.+</ParamField>++## Response++<WorkspaceResponse />++<RequestExample>++```ts+// Update a workspace by its slug+await dub.workspaces.update("acme", {+ name: "Acme Inc",+});++// Update a workspace by its ID+await dub.workspaces.update("ws_clv3mw4qb00008tvuw86c53db", {+ name: "Acme Inc",+});+```++</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/web/lib/openapi/links/update-link.ts b/apps/web/lib/openapi/links/update-link.tsindex c9740dc570..50cd91374c 100644--- a/apps/web/lib/openapi/links/update-link.ts+++ b/apps/web/lib/openapi/links/update-link.ts@@ -1,6 +1,6 @@import { openApiErrorResponses } from "@/lib/openapi/responses";import z from "@/lib/zod";-import { LinkSchema, createLinkBodySchema } from "@/lib/zod/schemas/links";+import { LinkSchema, updateLinkBodySchema } from "@/lib/zod/schemas/links";import { ZodOpenApiOperationObject } from "zod-openapi";import { workspaceParamsSchema } from "../request";@@ -14,16 +14,17 @@ export const updateLink: ZodOpenApiOperationObject = {requestParams: {query: workspaceParamsSchema,path: z.object({- linkId: z.string().openapi({- description:+ linkId: z+ .string()+ .describe("The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.",- }),+ ),}),},requestBody: {content: {"application/json": {- schema: createLinkBodySchema,+ schema: updateLinkBodySchema,},},},diff --git a/apps/web/lib/openapi/tags/update-tag.ts b/apps/web/lib/openapi/tags/update-tag.tsindex 0106a83c38..294c08bcb6 100644--- a/apps/web/lib/openapi/tags/update-tag.ts+++ b/apps/web/lib/openapi/tags/update-tag.ts@@ -7,12 +7,13 @@ import { workspaceParamsSchema } from "../request";export const updateTag: ZodOpenApiOperationObject = {operationId: "updateTag","x-speakeasy-name-override": "update",+ "x-speakeasy-max-method-params": 2,summary: "Update a tag",description: "Update a tag in the workspace.",requestParams: {query: workspaceParamsSchema,path: z.object({- id: z.string().describe("The ID of the tag"),+ id: z.string().describe("The ID of the tag to update."),}),},requestBody: {diff --git a/apps/web/lib/openapi/workspaces/update-workspace.ts b/apps/web/lib/openapi/workspaces/update-workspace.tsindex 7173251160..955b0e684a 100644--- a/apps/web/lib/openapi/workspaces/update-workspace.ts+++ b/apps/web/lib/openapi/workspaces/update-workspace.ts@@ -9,11 +9,14 @@ import { ZodOpenApiOperationObject } from "zod-openapi";export const updateWorkspace: ZodOpenApiOperationObject = {operationId: "updateWorkspace","x-speakeasy-name-override": "update",+ "x-speakeasy-max-method-params": 2,summary: "Update a workspace",description: "Update a workspace by ID or slug.",requestParams: {path: z.object({- idOrSlug: z.string().describe("The ID or slug of the workspace."),+ idOrSlug: z+ .string()+ .describe("The ID or slug of the workspace to update."),}),},requestBody: {