Open Design

Class DesignListItemFacade

Identification Accessors

id
get id(): string

The ID of the referenced server-side design.

returns string
versionId
get versionId(): number

The ID of the referenced server-side design version.

returns number

Data Accessors

name
get name(): null | string

The name of the design. This is the basename of the file by default or a custom name provided during design import.

returns null | string
status
get status(): "uploading" | "processing" | "done" | "failed"

The status of the server-side design processing.

returns "uploading" | "processing" | "done" | "failed"

Server Side Design File Usage Methods

fetchDesign
fetchDesign(options: { cancelToken?: null | CancelToken }): Promise<DesignFacade>

Fetches a previously imported design at the version (the Id of which is accessible via versionId) from the API.

The API has to be configured when using this method. Local caching is established in case the local cache is configured.

Example:

const design = await designListItem.fetchDesign()

// Continue working with the processed design
const artboards = design.getArtboards()

Parameters:

options:

Options.

OptionalcancelToken?: null | CancelToken

A cancellation token which aborts the asynchronous operation. When the token is cancelled, the promise is rejected and side effects are not reverted (e.g. the local cache is not cleared once created). A cancellation token can be created via createCancelToken.

returns Promise<DesignFacade>

A design object which can be used for retrieving data from the design using the API.