Skip to content

Interface: SNAPConnect

This is a subset of the TPP_SNAP implementation. This will be provided via the PREVIEW_INITIALIZED hook.

SNAPConnect

Implemented by

Methods

execute

execute(identifier, params?, result?): Promise\<any>

Parameters

Name Type
identifier string
params? object
result? boolean

Returns

Promise\<any>


getElementStatus

getElementStatus(previewId): Promise\<SNAPStatus>

Parameters

Name Type
previewId string

Returns

Promise\<SNAPStatus>


getPreviewElement

getPreviewElement(): Promise\<string>

Returns

Promise\<string>


moveSection

moveSection(source, target, options?): boolean

Parameters

Name Type
source string
target string
options? SNAPMoveSectionOptions

Returns

boolean


processWorkflow

processWorkflow(previewId, transition): Promise\<SNAPStatus>

Parameters

Name Type
previewId string
transition string

Returns

Promise\<SNAPStatus>


registerButton

registerButton(button, index): void

Parameters

Name Type
button SNAPButton
index number

Returns

void


renderElement

renderElement(previewId?): Promise\<string | object>

Parameters

Name Type
previewId? null | string

Returns

Promise\<string | object>


showEditDialog

showEditDialog(previewId): void

Parameters

Name Type
previewId string

Returns

void


showMessage

showMessage(message, kind, title?): void

Parameters

Name Type
message string
kind string
title? string

Returns

void


showMetaDataDialog

showMetaDataDialog(previewId): void

Parameters

Name Type
previewId string

Returns

void


showQuestion

showQuestion(message, title?): Promise\<boolean>

Parameters

Name Type
message string
title? string

Returns

Promise\<boolean>


startWorkflow

startWorkflow(previewId, workflow): Promise\<unknown>

Parameters

Name Type
previewId string
workflow string

Returns

Promise\<unknown>


triggerChange

triggerChange(previewId, content): void

Parameters

Name Type
previewId string
content string | object

Returns

void


Last update: October 22, 2024