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:120

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

Type declaration:#

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

Parameters:

NameType
contextActionContext
paramsActionInputParameters

InputField#

Ƭ InputField: DefaultInputField | CodeInputField

Defined in types/server-types.ts:125


InputFieldType#

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

Defined in types/server-types.ts:157

InputField type enumeration.


PerformReturn#

Ƭ PerformReturn: ServerPerformDataStructureReturn | ServerPerformBranchingDataStructureReturn | ServerPerformDataReturn | ServerPerformBranchingDataReturn | void

Defined in types/server-types.ts:112

Required return type of all action perform functions