Block: Embed
The
Embed
block is used to allow communication with a host website.EmbedConfig
The Embed block enables the Packhunt solution web-app communicate with a hosting website.
Name | Type | Required | Description |
---|---|---|---|
kind |
"Embed" |
Yes | |
allowedOrigins |
List<string > |
Yes | The website endpoints that are allowed to embed a Packhunt solution. |
allowedMessages |
Dictionary<string , EmbedEvent> |
Yes | The allowed messages the Packhunt solution can receive from the website. |
availableEvents |
Dictionary<string , EmbedEvent> |
Yes | The available events from the solution that the website can listen to. |
subscribe |
List<EmbedSubscribe> | No | Subscribe this block to receive data and updates from other blocks. |
EmbedEvent
The schema for a message or event.
Name | Type | Required | Description |
---|---|---|---|
description |
string |
Yes | The message or event description. |
properties |
Dictionary<string , Property> |
Yes | The properties included in the message or event. |
Property
Supported property types.
StringProperty
A property in a message or event that’s of type String
. Message properties are validated, while event properties only give a warning if they don’t match.
Name | Type | Required | Description |
---|---|---|---|
type |
"String" |
Yes | Validates that the property value is of type String . |
enum |
List<string > |
No | Validates that the property value is one of the allowed values. |
required |
boolean |
No | Validates whether the property is required for the message or event to fire. |
description |
string |
No | A description of the property. |
nullable |
boolean |
No | Validates whether the property value may be null. |
default |
string |
No | The value that’s set if no value is provided. |
NumberProperty
A property in a message or event that’s of type Number
. Message properties are validated, while event properties only give a warning if they don’t match.
Name | Type | Required | Description |
---|---|---|---|
type |
"Number" |
Yes | Validates that the property value is of type Number . |
enum |
List<number > |
No | Validates that the property value is one of the allowed values. |
required |
boolean |
No | Validates whether the property is required for the message or event to fire. |
description |
string |
No | A description of the property. |
nullable |
boolean |
No | Validates whether the property value may be null. |
default |
number |
No | The value that’s set if no value is provided. |
BooleanProperty
A property in a message or event that’s of type Boolean
. Message properties are validated, while event properties only give a warning if they don’t match.
Name | Type | Required | Description |
---|---|---|---|
type |
"Boolean" |
Yes | A description of the property. |
required |
boolean |
No | Validates whether the property is required for the message or event to fire. |
description |
string |
No | A description of the property. |
nullable |
boolean |
No | Validates whether the property value may be null. |
default |
boolean |
No | The value that’s set if no value is provided. |
EmbedSubscribe
EmbedModelSubscribe
Subscribe the Embed block to the outputs of a Model.
Name | Type | Required | Description |
---|---|---|---|
kind |
"Model" |
Yes | |
frame |
string |
Yes | Specify the frame name in which the Model is located. |
source |
string |
Yes | Specify the name of the Model block. |
eventId |
string |
No | The name of the availableEvent . The properties inside this event must match the model output names. |
EmbedRouteSubscribe
Subscribe the Embed
block to user inputs defined in the Route
.
Name | Type | Required | Description |
---|---|---|---|
kind |
"Route" |
Yes | |
urlParameters |
List<string > |
Yes | A list of keys specifying the url parameters to include in the message. The url parameters must match the message properties. |
setMessage |
string |
Yes | The name of the allowedMessage . |