@@ -32,9 +32,12 @@ import { VariableForTestInputs } from './VariableForTestInputs'
|
||||
import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings'
|
||||
import {
|
||||
HttpMethod,
|
||||
defaultTimeout,
|
||||
defaultWebhookAttributes,
|
||||
defaultWebhookBlockOptions,
|
||||
maxTimeout,
|
||||
} from '@typebot.io/schemas/features/blocks/integrations/webhook/constants'
|
||||
import { NumberInput } from '@/components/inputs'
|
||||
|
||||
type Props = {
|
||||
blockId: string
|
||||
@@ -81,6 +84,9 @@ export const WebhookAdvancedConfigForm = ({
|
||||
const updateIsCustomBody = (isCustomBody: boolean) =>
|
||||
onOptionsChange({ ...options, isCustomBody })
|
||||
|
||||
const updateTimeout = (timeout: number | undefined) =>
|
||||
onOptionsChange({ ...options, timeout })
|
||||
|
||||
const executeTestRequest = async () => {
|
||||
if (!typebot) return
|
||||
setIsTestResponseLoading(true)
|
||||
@@ -196,6 +202,22 @@ export const WebhookAdvancedConfigForm = ({
|
||||
)}
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
<AccordionItem>
|
||||
<AccordionButton justifyContent="space-between">
|
||||
Advanced parameters
|
||||
<AccordionIcon />
|
||||
</AccordionButton>
|
||||
<AccordionPanel pt="4">
|
||||
<NumberInput
|
||||
label="Timeout (s)"
|
||||
defaultValue={options?.timeout ?? defaultTimeout}
|
||||
min={1}
|
||||
max={maxTimeout}
|
||||
onValueChange={updateTimeout}
|
||||
withVariableButton={false}
|
||||
/>
|
||||
</AccordionPanel>
|
||||
</AccordionItem>
|
||||
<AccordionItem>
|
||||
<AccordionButton justifyContent="space-between">
|
||||
Variable values for test
|
||||
|
||||
Reference in New Issue
Block a user