cc-everywhere

Class: ModuleWorkflow

Extends

Implements

Constructors

Constructor

new ModuleWorkflow(actionManager, context): ModuleWorkflow;

Parameters

Parameter
Type
actionManager
ActionManager
context
SDKContext

Returns

ModuleWorkflow

Inherited from

BaseWorkflow.constructor

Methods

editImage()

editImage(
   docConfig, 
   appConfig?, 
   exportConfig?, 
   containerConfig?
): Promise<EditImageContext>;

Perform editing tasks on any image.

Parameters

Parameter
Type
Description
docConfig
EditImageDocConfig
pass an asset to preload on to the Editor
appConfig?
EditImageAppConfig
-
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

Promise<EditImageContext>

Promise that resolves with EditImageContext when the workflow is loaded

Implementation of

ModuleWorkflow.editImage

createImageFromText()

createImageFromText(
   appConfig?, 
   exportConfig?, 
   containerConfig?
): void;

Generate images by just passing a text prompt.

Parameters

Parameter
Type
Description
appConfig?
TextToImageAppConfig
Pass a text prompt to generate images.
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

void

Implementation of

ModuleWorkflow.createImageFromText

startFromContent()

startFromContent(
   appConfig?, 
   exportConfig?, 
   containerConfig?
): void;

Open the Start From Content module.

Parameters

Parameter
Type
Description
appConfig?
StartFromContentAppConfig
properties to configure the Start From Content module
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

void

Implementation of

ModuleWorkflow.startFromContent

createDesign()

createDesign(
   appConfig?, 
   exportConfig?, 
   containerConfig?
): Promise<DesignContext>;

Create a new design. Open template gallery as the default entry experience.

Parameters

Parameter
Type
Description
appConfig?
FDECreateDesignAppConfig
properties to configure the template browser and FDE session
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

Promise<DesignContext>

Promise resolving with DesignContext when loaded; rejects on failure or cancellation.

Implementation of

ModuleWorkflow.createDesign

createGuidedDesign()

createGuidedDesign(
   appConfig?, 
   exportConfig?, 
   containerConfig?
): void;

Launches a guided design creation flow in the Focused Design Editor (FDE).

Parameters

Parameter
Type
Description
appConfig?
CreateGuidedDesignAppConfig
properties to configure the guided design creation experience
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

void

Implementation of

ModuleWorkflow.createGuidedDesign

editDesign()

editDesign(
   docConfig?, 
   appConfig?, 
   exportConfig?, 
   containerConfig?
): Promise<DesignContext>;

Edit and customize a template or document in the Focused Design Editor (FDE).

Parameters

Parameter
Type
Description
docConfig?
FDEEditDesignDocConfig
pass templateId, docId, a standalone asset, or documentUrl paired with asset
appConfig?
FDEEditDesignAppConfig
properties to configure the Focused Design Editor. See ThirdParty.Module.FDEEditDesignAppConfig.
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

Promise<DesignContext>

Promise resolving with DesignContext when loaded; rejects on failure or cancellation.

Implementation of

ModuleWorkflow.editDesign

viewDesign()

viewDesign(
   docConfig?, 
   appConfig?, 
   exportConfig?, 
   containerConfig?
): Promise<IDesignViewerContext>;

Launches the design viewer for a personalized design.

Parameters

Parameter
Type
Description
docConfig?
DesignViewerDocConfig
pass an asset to preload on to the viewer.
appConfig?
DesignViewerAppConfig
properties to configure the Design Viewer module
exportConfig?
ExportOptions
properties to configure the export options
containerConfig?
ContainerConfig
properties to configure the SDK container

Returns

Promise<IDesignViewerContext>

Promise that resolves with the DesignViewerContext when the workflow is loaded. Call IDesignViewerContext.updateDesignAssets on it to update the asset(s) rendered in the open viewer.

Implementation of

ModuleWorkflow.viewDesign

migrateAssets()

migrateAssets(documentIds): Promise<MigrateAssetsResult>;

Migrate a transitioning user's guest documents to their newly signed-in account.

Requires the SDK to be initialized with a PartnerAssertionAuthOption whose config is a TransitionAssertionConfig (both guest and user assertions present). Runs headlessly (no UI) in the Focused Design Editor.

Parameters

Parameter
Type
Description
documentIds
string[]
non-empty array of non-empty guest document ids to migrate. Delivered to the FDE app via the SDK message channel (never in the URL).

Returns

Promise<MigrateAssetsResult>

Promise resolving with a Module.MigrateAssetsResult mapping each input document id to its migrated output id; rejects on migration error or after a 180-second timeout.

Implementation of

ModuleWorkflow.migrateAssets