Skip to main content

DataSourceDefinition

@prismatic-io/spectral"types/DataSourceDefinition"DataSourceDefinition

DataSourceDefinition is the type of the object that is passed in to dataSource function to define a component Data Source.

Type parameters

TInputs: Inputs

TConfigVars: ConfigVarResultCollection

TDataSourceType: DataSourceType

Hierarchy

  • DataSourceDefinition

Index

Properties

Properties

dataSourceType

dataSourceType: TDataSourceType

Defined in packages/spectral/src/types/DataSourceDefinition.ts:23

The type of data that this Data Source represents.


Optional detailDataSource

detailDataSource? : undefined | string

Defined in packages/spectral/src/types/DataSourceDefinition.ts:29

Specifies the name of a Data Source in this Component which can provide additional details about the content for this Data Source, such as example values when selecting particular API object fields.


display

display: ActionDisplayDefinition

Defined in packages/spectral/src/types/DataSourceDefinition.ts:19

Defines how the Data Source is displayed in the Prismatic interface.


Optional examplePayload

examplePayload? : Awaited‹ReturnType‹this["perform"]››

Defined in packages/spectral/src/types/DataSourceDefinition.ts:27

An example of the payload outputted by this Data Source.


inputs

inputs: TInputs

Defined in packages/spectral/src/types/DataSourceDefinition.ts:25

InputFields to present in the Prismatic interface for configuration of this Data Source.


perform

perform: DataSourcePerformFunction‹TInputs, TConfigVars, TDataSourceType›

Defined in packages/spectral/src/types/DataSourceDefinition.ts:21

Function to perform when this Data Source is invoked; fetches data from the data source.