index
@prismatic-io/spectral › "index"
#
Index#
Functions#
FunctionsConst
action#
▸ action‹TInputs, TAllowsBranching, TReturn›(definition
: ActionDefinition‹TInputs, TAllowsBranching, TReturn›): ActionDefinition‹TInputs, TAllowsBranching, TReturn›
Defined in packages/spectral/src/index.ts:43
This function creates an action object that can be referenced by a custom component. It helps ensure that the shape of the action object conforms to what the Prismatic API expects. For information on writing custom component actions, see https://prismatic.io/docs/custom-components/writing-custom-components/#writing-actions.
Type parameters:
▪ TInputs: Inputs
▪ TAllowsBranching: boolean
▪ TReturn: ActionPerformReturn‹TAllowsBranching, unknown›
Parameters:
Name | Type | Description |
---|---|---|
definition | ActionDefinition‹TInputs, TAllowsBranching, TReturn› | An ActionDefinition type object that includes UI display information, a function to perform when the action is invoked, and a an object containing inputs for the perform function. |
Returns: ActionDefinition‹TInputs, TAllowsBranching, TReturn›
This function validates the shape of the definition
object provided, and returns the same action object.
Const
component#
▸ component‹T›(definition
: ComponentDefinition‹T›): ReturnType‹typeof convertComponent›
Defined in packages/spectral/src/index.ts:30
This function creates a component object that can be imported into the Prismatic API. For information on using this function to write custom components, see https://prismatic.io/docs/custom-components/writing-custom-components/#exporting-a-component.
Type parameters:
▪ T: boolean
Parameters:
Name | Type | Description |
---|---|---|
definition | ComponentDefinition‹T› | A ComponentDefinition type object, including display information, unique key, and a set of actions the component implements. |
Returns: ReturnType‹typeof convertComponent›
This function returns a component object that has the shape the Prismatic API expects.
Const
connection#
▸ connection‹T›(definition
: T): T
Defined in packages/spectral/src/index.ts:100
For information on writing custom component connections, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.
Type parameters:
▪ T: DefaultConnectionDefinition
Parameters:
Name | Type | Description |
---|---|---|
definition | T | A DefaultConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp. |
Returns: T
This functions validates the shape of the definition
object provided and returns the same connection object.
Const
dataSource#
▸ dataSource‹TInputs, TDataSourceType›(definition
: DataSourceDefinition‹TInputs, TDataSourceType›): DataSourceDefinition‹TInputs, TDataSourceType›
Defined in packages/spectral/src/index.ts:77
This function creates a data source object that can be referenced by a custom component. It helps ensure that the shape of the data source object conforms to what the Prismatic API expects. For information on writing custom component data sources, see https://prismatic.io/docs/custom-components/writing-custom-components/#writing-data-sources.
Type parameters:
▪ TInputs: Inputs
▪ TDataSourceType: DataSourceType
Parameters:
Name | Type | Description |
---|---|---|
definition | DataSourceDefinition‹TInputs, TDataSourceType› | A DataSourceDefinition type object that includes UI display information, a function to perform when the data source is invoked, and a an object containing inputs for the perform function. |
Returns: DataSourceDefinition‹TInputs, TDataSourceType›
This function validates the shape of the definition
object provided, and returns the same data source object.
Const
input#
▸ input‹T›(definition
: T): T
Defined in packages/spectral/src/index.ts:91
For information and examples on how to write inputs for custom component actions and triggers, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-inputs.
Type parameters:
▪ T: InputFieldDefinition
Parameters:
Name | Type | Description |
---|---|---|
definition | T | An InputFieldDefinition object that describes the type of an input for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp. |
Returns: T
This function validates the shape of the definition
object provided, and returns the same input object.
Const
oauth2Connection#
▸ oauth2Connection‹T›(definition
: T): T
Defined in packages/spectral/src/index.ts:110
For information on writing custom component connections, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.
Type parameters:
▪ T: OAuth2ConnectionDefinition
Parameters:
Name | Type | Description |
---|---|---|
definition | T | An OAuth2ConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp. |
Returns: T
This functions validates the shape of the definition
object provided and returns the same connection object.
Const
trigger#
▸ trigger‹TInputs, TAllowsBranching, TResult›(definition
: TriggerDefinition‹TInputs, TAllowsBranching, TResult›): TriggerDefinition‹TInputs, TAllowsBranching, TResult›
Defined in packages/spectral/src/index.ts:60
This function creates a trigger object that can be referenced by a custom component. It helps ensure that the shape of the trigger object conforms to what the Prismatic API expects. For information on writing custom component triggers, see https://prismatic.io/docs/custom-components/writing-custom-components/#writing-triggers.
Type parameters:
▪ TInputs: Inputs
▪ TAllowsBranching: boolean
▪ TResult: TriggerResult‹TAllowsBranching›
Parameters:
Name | Type | Description |
---|---|---|
definition | TriggerDefinition‹TInputs, TAllowsBranching, TResult› | A TriggerDefinition type object that includes UI display information, a function to perform when the trigger is invoked, and a an object containing inputs for the perform function. |
Returns: TriggerDefinition‹TInputs, TAllowsBranching, TResult›
This function validates the shape of the definition
object provided, and returns the same trigger object.