To use the automation capabilities, access the automation object on the SDK. Through that, you can invoke all automation methods mentioned, like this:
await sdk.automation.publish({
designSystemId, versionId
}, DocumentationEnvironment.live)
Read methods
Get all pipelines
Fetches all pipelines that were setup in a particular workspace.
async getPipelines(workspaceId: string): Promise<Array<Pipeline>>
Get all exporter builds
Fetches all builds of pipelines for a given workspace.
async getExportBuilds(
workspaceId: string,
versionId: string
): Promise<Array<ExportBuild>>
Get all exporters belonging to workspace
Fetches exporters belonging (were installed at) to a specific workspace.
async getExporters(workspaceId: string): Promise<Array<Exporter>>
Get exporter properties
Fetches configuration of a specific exporter package in a specific workspace.
async getExporterConfiguration(
workspaceId: string,
exporterId: string,
designSystemId: string
): Promise<Array<ExporterConfigurationProperty>>
Get exporter variants
Fetches all custom block variants of a specific documentation exporter.
async getExporterBlockVariants(
workspaceId: string,
exporterId: string
): Promise<Array<ExporterCustomBlockVariant>>
Publish documentation
Publishes documentation by queuing a build on Supernova's server. This build will be processed by an asynchronous CI/CD pipeline. You can request the status of the build with the associated isBeingPublished method.
async publish(
to: RemoteWorkspaceVersionIdentifier,
environment: DocumentationEnvironment
): Promise<{
status: "Queued" | "InProgress" | "Failure"
jobId: string | null
exporterId: string | null
}>
Check if documentation is being published
Use this method to check if documentation is currently being published for a specific workspace version and environment. The method returns the status of the publication process, including whether it is "InProgress" or "Idle."
async isPublishing(
to: RemoteWorkspaceVersionIdentifier,
environment: DocumentationEnvironment
): Promise<{
status: "InProgress" | "Idle"
jobId: string | null
exporterId: string | null
}>
Get all import jobs in progress
Gets all import jobs that are currently in progress for a specified version of the design system.
async getImportJobs(
from: RemoteVersionIdentifier
): Promise<Array<ImportJob>>
Get import job details
Gets details of a specific import job for a specified version of the design system.
async getImportJob(
from: RemoteVersionIdentifier,
jobId: string
): Promise<ImportJob>
Create/update methods
Schedule import job for Figma sources
Use this method to schedule an import job for Figma sources for a specific version of the design system. You can provide an array of source IDs, and an import job will be created for each source.
async scheduleImportJobForFigmaSources(
from: RemoteVersionIdentifier,
sourceIds: Array<string>,
dryRun = false
): Promise<ImportJob>
Delete methods
Delete pipeline
Deletes a specific pipeline.
async deletePipeline(workspaceId: string, pipelineId: string): Promise<void>