Skip to main content

serverTypes/convertIntegration

@prismatic-io/spectral"serverTypes/convertIntegration"

Index

Functions

Functions

Const codeNativeIntegrationComponent

codeNativeIntegrationComponent(__namedParameters: object, referenceKey: string, configVars: Record‹string, ConfigVar‹any››): ServerComponent

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:403

Creates the structure necessary to import a Component as part of a Code Native integration.

Parameters:

__namedParameters: object

NameTypeDefault
descriptionundefined | string-
flowsFlow‹object, ComponentSelector‹any›, TriggerPayload›[][]
iconPathundefined | string-
namestring-

referenceKey: string

configVars: Record‹string, ConfigVar‹any››

Returns: ServerComponent


Const codeNativeIntegrationYaml

codeNativeIntegrationYaml(__namedParameters: object, referenceKey: string, configVars: Record‹string, ConfigVar‹any››): string

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:82

Parameters:

__namedParameters: object

NameType
categoryundefined | string
configPagesundefined | object
descriptionundefined | string
documentationundefined | string
endpointTypeundefined | "flow_specific" | "instance_specific" | "shared_instance"
flowsFlow‹object, ComponentSelector‹any›, TriggerPayload›[]
labelsundefined | string[]
namestring
triggerPreprocessFlowConfigundefined | object
versionundefined | string

referenceKey: string

configVars: Record‹string, ConfigVar‹any››

Returns: string


Const convertComponentReference

convertComponentReferenceTValue›(__namedParameters: object): object

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:164

Type parameters:

TValue

Parameters:

__namedParameters: object

NameType
componentRefstring | object
keystring
valuesundefined | object

Returns: object

  • inputs: Record‹string, ServerInput›

  • ref: ServerComponentReference


Const convertConfigPages

convertConfigPages(pages: ConfigPages‹any›): ServerConfigPage[] | undefined

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:63

Parameters:

NameType
pagesConfigPages‹any›

Returns: ServerConfigPage[] | undefined


Const convertConfigVar

convertConfigVar(key: string, configVar: ConfigVar‹any›, referenceKey: string): ServerRequiredConfigVariable

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:281

Converts a Config Var into the structure necessary for YAML generation.

Parameters:

NameType
keystring
configVarConfigVar‹any›
referenceKeystring

Returns: ServerRequiredConfigVariable


Const convertFlow

convertFlow(flow: FlowConfigPages‹any›, any›, referenceKey: string): Record‹string, unknown›

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:205

Converts a Flow into the structure necessary for YAML generation.

Parameters:

NameType
flowFlowConfigPages‹any›, any›
referenceKeystring

Returns: Record‹string, unknown›


Const convertIntegration

convertIntegration(definition: IntegrationDefinitionConfigPages‹any›, ComponentSelector‹any››): ServerComponent

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:38

Parameters:

NameType
definitionIntegrationDefinitionConfigPages‹any›, ComponentSelector‹any››

Returns: ServerComponent


Const fieldNameToReferenceInput

fieldNameToReferenceInput(stepName: string, fieldName: string | null | undefined): ServerInput | undefined

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:372

Maps the step name field to a fully qualified input.

Parameters:

NameType
stepNamestring
fieldNamestring | null | undefined

Returns: ServerInput | undefined


Const flowFunctionKey

flowFunctionKey(flowName: string, functionName: "onExecution" | "onTrigger"): string

Defined in packages/spectral/src/serverTypes/convertIntegration.ts:383

Actions and Triggers will be scoped to their flow by combining the flow name and the function name. This is to ensure that the keys are unique on the resulting object, which will be turned into a Component.

Parameters:

NameType
flowNamestring
functionName"onExecution" | "onTrigger"

Returns: string