Skip to main content

types/server-types

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

Types defined in this module describe the shape of objects that are sent to Prismatic's API when a component is published. Types defined should not generally be imported directly, but they're the types of objects that are created by component() and action() helper functions.

Index#

Interfaces#

Type aliases#

Type aliases#

ActionPerformFunction#

Ƭ ActionPerformFunction: function

Defined in types/server-types.ts:149

Definition of the function to perform when an Action is invoked.

Type declaration:#

▸ (context: ActionContext, params: ActionInputParameters): Promise‹ActionPerformReturn

Parameters:

NameType
contextActionContext
paramsActionInputParameters

ActionPerformReturn#

Ƭ ActionPerformReturn: ServerPerformDataStructureReturn | ServerPerformBranchingDataStructureReturn | ServerPerformDataReturn | ServerPerformBranchingDataReturn | undefined

Defined in types/server-types.ts:141

Required return type of all action perform functions


Component#

Ƭ Component: ComponentBase‹T›

Defined in types/server-types.ts:37


InputField#

Ƭ InputField: DefaultInputField | CodeInputField

Defined in types/server-types.ts:168


InputFieldType#

Ƭ InputFieldType: "string" | "text" | "password" | "boolean" | "code" | "data" | "conditional"

Defined in types/server-types.ts:200

InputField type enumeration.


TriggerPayload#

Ƭ TriggerPayload: _TriggerPayload

Defined in types/server-types.ts:166


TriggerPerformFunction#

Ƭ TriggerPerformFunction: function

Defined in types/server-types.ts:160

Definition of the function to perform when a Trigger is invoked.

Type declaration:#

▸ (context: ActionContext, payload: TriggerPayload, params: ActionInputParameters): Promise‹TriggerResult

Parameters:

NameType
contextActionContext
payloadTriggerPayload
paramsActionInputParameters

TriggerResult#

Ƭ TriggerResult: TriggerBranchingResult | TriggerBaseResult | undefined

Defined in types/server-types.ts:154