Skip to main content

index

@prismatic-io/spectral"index"

Index

Functions

Functions

Const action

actionTInputs, TConfigVar, TAllowsBranching, TReturn›(definition: ActionDefinition‹TInputs, TConfigVar, TAllowsBranching, TReturn›): ActionDefinition‹TInputs, TConfigVar, TAllowsBranching, TReturn›

Defined in packages/spectral/src/index.ts:130

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

TConfigVar: ConfigVarResultCollection

TAllowsBranching: boolean

TReturn: ActionPerformReturn‹TAllowsBranching, unknown›

Parameters:

NameTypeDescription
definitionActionDefinition‹TInputs, TConfigVar, 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, TConfigVar, TAllowsBranching, TReturn›

This function validates the shape of the definition object provided, and returns the same action object.


Const component

componentTPublic, TKey›(definition: ComponentDefinition‹TPublic, TKey›): ReturnType‹typeof convertComponent›

Defined in packages/spectral/src/index.ts:117

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:

TPublic: boolean

TKey: string

Parameters:

NameTypeDescription
definitionComponentDefinition‹TPublic, TKey›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 configPage

configPageT›(definition: T): T

Defined in packages/spectral/src/index.ts:77

For information on writing Code Native Integrations, see https://prismatic.io/docs/code-native-integrations/#adding-config-pages.

Type parameters:

T: ConfigPage

Parameters:

NameTypeDescription
definitionTA Config Page type object.

Returns: T

This function returns a config page object that has the shape the Prismatic API expects.


Const configVar

configVarT›(definition: T): T

Defined in packages/spectral/src/index.ts:86

For information on writing Code Native Integrations, see https://prismatic.io/docs/code-native-integrations/#adding-config-vars.

Type parameters:

T: StandardConfigVar

Parameters:

NameTypeDescription
definitionTA Config Var type object.

Returns: T

This function returns a standard config var object that has the shape the Prismatic API expects.


Const connection

connectionT›(definition: T): T

Defined in packages/spectral/src/index.ts:192

For information on writing custom component connections, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.

Type parameters:

T: DefaultConnectionDefinition

Parameters:

NameTypeDescription
definitionTA 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 connectionConfigVar

connectionConfigVarT›(definition: T): T

Defined in packages/spectral/src/index.ts:105

For information on writing Code Native Integrations, see https://prismatic.io/docs/code-native-integrations/#adding-config-vars.

Type parameters:

T: ConnectionConfigVar

Parameters:

NameTypeDescription
definitionTA Connection Config Var type object.

Returns: T

This function returns a connection config var object that has the shape the Prismatic API expects.


Const dataSource

dataSourceTInputs, TConfigVars, TDataSourceType›(definition: DataSourceDefinition‹TInputs, TConfigVars, TDataSourceType›): DataSourceDefinition‹TInputs, TConfigVars, TDataSourceType›

Defined in packages/spectral/src/index.ts:168

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

TConfigVars: ConfigVarResultCollection

TDataSourceType: DataSourceType

Parameters:

NameTypeDescription
definitionDataSourceDefinition‹TInputs, TConfigVars, 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, TConfigVars, TDataSourceType›

This function validates the shape of the definition object provided, and returns the same data source object.


Const dataSourceConfigVar

dataSourceConfigVarT›(definition: T): T

Defined in packages/spectral/src/index.ts:95

For information on writing Code Native Integrations, see https://prismatic.io/docs/code-native-integrations/#adding-config-vars.

Type parameters:

T: DataSourceConfigVar

Parameters:

NameTypeDescription
definitionTA Data Source Config Var type object.

Returns: T

This function returns a data source config var object that has the shape the Prismatic API expects.


Const flow

flowTConfigPages, TTriggerPayload, T›(definition: T): T

Defined in packages/spectral/src/index.ts:60

For information on writing Code Native Integrations, see https://prismatic.io/docs/code-native-integrations/#adding-flows.

Type parameters:

TConfigPages: ConfigPages

TTriggerPayload: TriggerPayload

T: Flow‹TConfigPages, TTriggerPayload›

Parameters:

NameTypeDescription
definitionTA Flow type object.

Returns: T

This function returns a flow object that has the shape the Prismatic API expects.


Const input

inputT›(definition: T): T

Defined in packages/spectral/src/index.ts:183

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:

NameTypeDescription
definitionTAn 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 integration

integrationTConfigPages›(definition: IntegrationDefinition‹TConfigPages›): ReturnType‹typeof convertIntegration›

Defined in packages/spectral/src/index.ts:41

This function creates a Integration object that can be imported into the Prismatic API. For information on using this function to write code native integrations, see https://prismatic.io/docs/code-native-integrations/.

Type parameters:

TConfigPages: ConfigPages

Parameters:

NameTypeDescription
definitionIntegrationDefinition‹TConfigPages›An IntegrationDefinition type object.

Returns: ReturnType‹typeof convertIntegration›

This function returns an integration object that has the shape the Prismatic API expects.


Const oauth2Connection

oauth2ConnectionT›(definition: T): T

Defined in packages/spectral/src/index.ts:212

For information on writing custom component connections, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.

Type parameters:

T: OAuth2ConnectionDefinition

Parameters:

NameTypeDescription
definitionTAn 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 onPremiseConnection

onPremiseConnectionT›(definition: T): T

Defined in packages/spectral/src/index.ts:202

For information on writing custom component connections using on-premise resources, see https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.

Type parameters:

T: OnPremiseConnectionDefinition

Parameters:

NameTypeDescription
definitionTAn OnPremiseConnectionDefinition 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 function validates the shape of the definition object provided and returns the same connection object.


Const trigger

triggerTInputs, TConfigVar, TAllowsBranching, TResult›(definition: TriggerDefinition‹TInputs, TConfigVar, TAllowsBranching, TResult›): TriggerDefinition‹TInputs, TConfigVar, TAllowsBranching, TResult›

Defined in packages/spectral/src/index.ts:149

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

TConfigVar: ConfigVarResultCollection

TAllowsBranching: boolean

TResult: TriggerResult‹TAllowsBranching, TriggerPayload

Parameters:

NameTypeDescription
definitionTriggerDefinition‹TInputs, TConfigVar, 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, TConfigVar, TAllowsBranching, TResult›

This function validates the shape of the definition object provided, and returns the same trigger object.