Design Systems

Read, create, update or delete design systems you have access to.

Usage

To manipulate design systems, access the designSystems object on the SDK. Through that, you can invoke all workspace methods mentioned, like this:


                                                        
                                                        
                                                            const designSystems = await sdk.designSystems.createDesignSystem(
                                                           workspaceId, 
                                                           "Prism", 
                                                           "Unbelievable design system we created!"
                                                        )
                                                        
                                                            

Read methods

Fetch all design systems for a workspace

Fetches all design systems belonging to a specific workspace.


                                                        
                                                        
                                                            async designSystems(workspaceId: string): Promise<Array<DesignSystem>>
                                                        
                                                            

Fetch a specific design system

Fetches a specific design system using its ID.


                                                        
                                                        
                                                            async designSystem(designSystemId: string): Promise<DesignSystem | null>
                                                        
                                                            

Fetch custom domain information for a design system

Retrieves custom domain information for a specific design system.


                                                        
                                                        
                                                            async designSystemCustomDomain(designSystemId: string): Promise<CustomDomain>
                                                        
                                                            

Create/update methods

Create a new design system

Creates a new design system in a specified workspace and retrieves the newly created design system object.


                                                        
                                                        
                                                            async createDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystem>
                                                        
                                                            

Update design system metadata

Updates metadata for a specific design system.


                                                        
                                                        
                                                            async updateDesignSystemMetadata(designSystemId: string, name: string, description?: string): Promise<void>
                                                        
                                                            

Update design system multibrand status

Enables or disables multibrand functionality for a specific design system.


                                                        
                                                        
                                                            async updateDesignSystemIsMultibrand(designSystem: DesignSystem, isMultibrand: boolean): Promise<void>
                                                        
                                                            

Update design system switcher

Enables or disables binding of multiple documentations in the current workspace together.


                                                        
                                                        
                                                            async updateDesignSystemSwitcher(designSystem: DesignSystem, designSystemSwitcher: DesignSystemSwitcher): Promise<void>
                                                        
                                                            

Update design system doc exporter

Sets a new documentation exporter package.


                                                        
                                                        
                                                            async updateDesignSystemDocExporterId(designSystem: DesignSystem, docExporterId: string): Promise<void>
                                                        
                                                            

Update design system documentation slug

Changes the documentation slug for a specific design system.


                                                        
                                                        
                                                            async updateDesignSystemDocumentationSlug(designSystem: DesignSystem, docUserSlug: string): Promise<void>
                                                        
                                                            

Update design system custom domain

Updates the custom domain of a specific design system.


                                                        
                                                        
                                                            async updateDesignSystemCustomDomain(designSystemId: string, newDomain: string): Promise<CustomDomain>
                                                        
                                                            

Delete methods

Delete a design system

Deletes a specific design system. This action is irreversible and can only be performed by workspace admins.


                                                        
                                                        
                                                            async deleteDesignSystem(designSystemId: string): Promise<void>
                                                        
                                                            

Delete design system custom domain

Deletes the custom domain for a specific design system.


                                                        
                                                        
                                                            async deleteDesignSystemCustomDomain(designSystemId: string): Promise<void>