serverTypes/convertIntegration
@prismatic-io/spectral › "serverTypes/convertIntegration"
Index
Functions
- codeNativeIntegrationComponent
- codeNativeIntegrationYaml
- convertComponentReference
- convertConfigPages
- convertConfigVar
- convertFlow
- convertIntegration
- fieldNameToReferenceInput
- flowFunctionKey
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
Name | Type | Default |
---|---|---|
description | undefined | string | - |
flows | Flow‹object, ComponentSelector‹any›, TriggerPayload›[] | [] |
iconPath | undefined | string | - |
name | string | - |
▪ 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
Name | Type |
---|---|
category | undefined | string |
configPages | undefined | object |
description | undefined | string |
documentation | undefined | string |
endpointType | undefined | "flow_specific" | "instance_specific" | "shared_instance" |
flows | Flow‹object, ComponentSelector‹any›, TriggerPayload›[] |
labels | undefined | string[] |
name | string |
triggerPreprocessFlowConfig | undefined | object |
version | undefined | string |
▪ referenceKey: string
▪ configVars: Record‹string, ConfigVar‹any››
Returns: string
Const
convertComponentReference
▸ convertComponentReference‹TValue›(__namedParameters
: object): object
Defined in packages/spectral/src/serverTypes/convertIntegration.ts:164
Type parameters:
▪ TValue
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
componentRef | string | object |
key | string |
values | undefined | 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:
Name | Type |
---|---|
pages | ConfigPages‹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:
Name | Type |
---|---|
key | string |
configVar | ConfigVar‹any› |
referenceKey | string |
Returns: ServerRequiredConfigVariable
Const
convertFlow
▸ convertFlow(flow
: Flow‹ConfigPages‹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:
Name | Type |
---|---|
flow | Flow‹ConfigPages‹any›, any› |
referenceKey | string |
Returns: Record‹string, unknown›
Const
convertIntegration
▸ convertIntegration(definition
: IntegrationDefinition‹ConfigPages‹any›, ComponentSelector‹any››): ServerComponent
Defined in packages/spectral/src/serverTypes/convertIntegration.ts:38
Parameters:
Name | Type |
---|---|
definition | IntegrationDefinition‹ConfigPages‹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:
Name | Type |
---|---|
stepName | string |
fieldName | string | 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:
Name | Type |
---|---|
flowName | string |
functionName | "onExecution" | "onTrigger" |
Returns: string