2
0

refactor(♻️ Add defaults everywhere (+ settings page)):

This commit is contained in:
Baptiste Arnaud
2022-01-25 18:19:37 +01:00
parent 21448bcc8a
commit c5aaa323d1
115 changed files with 1436 additions and 720 deletions

View File

@ -14,6 +14,8 @@ import {
TextInputStep,
TextBubbleStep,
WebhookStep,
StepType,
StepWithOptionsType,
} from 'models'
export const sendRequest = async <ResponseData>({
@ -78,3 +80,14 @@ export const isIntegrationStep = (step: Step): step is IntegrationStep =>
export const isWebhookStep = (step: Step): step is WebhookStep =>
step.type === IntegrationStepType.WEBHOOK
export const isBubbleStepType = (type: StepType): type is BubbleStepType =>
(Object.values(BubbleStepType) as string[]).includes(type)
export const stepTypeHasOption = (
type: StepType
): type is StepWithOptionsType =>
(Object.values(InputStepType) as string[])
.concat(Object.values(LogicStepType))
.concat(Object.values(IntegrationStepType))
.includes(type)