feat(n8n Form Node): Limit wait time parameters (#13160)

This commit is contained in:
Michael Kret
2025-02-19 13:47:19 +02:00
committed by GitHub
parent 301f5a50d9
commit 14b6f8b972
15 changed files with 261 additions and 149 deletions

View File

@@ -1,4 +1,4 @@
import type { IWebhookDescription } from 'n8n-workflow';
import type { INodeProperties, IWebhookDescription } from 'n8n-workflow';
export const sendAndWaitWebhooksDescription: IWebhookDescription[] = [
{
@@ -20,3 +20,80 @@ export const sendAndWaitWebhooksDescription: IWebhookDescription[] = [
isFullPath: true,
},
];
export const limitWaitTimeProperties: INodeProperties[] = [
{
displayName: 'Limit Type',
name: 'limitType',
type: 'options',
default: 'afterTimeInterval',
description:
'Sets the condition for the execution to resume. Can be a specified date or after some time.',
options: [
{
name: 'After Time Interval',
description: 'Waits for a certain amount of time',
value: 'afterTimeInterval',
},
{
name: 'At Specified Time',
description: 'Waits until the set date and time to continue',
value: 'atSpecifiedTime',
},
],
},
{
displayName: 'Amount',
name: 'resumeAmount',
type: 'number',
displayOptions: {
show: {
limitType: ['afterTimeInterval'],
},
},
typeOptions: {
minValue: 0,
numberPrecision: 2,
},
default: 1,
description: 'The time to wait',
},
{
displayName: 'Unit',
name: 'resumeUnit',
type: 'options',
displayOptions: {
show: {
limitType: ['afterTimeInterval'],
},
},
options: [
{
name: 'Minutes',
value: 'minutes',
},
{
name: 'Hours',
value: 'hours',
},
{
name: 'Days',
value: 'days',
},
],
default: 'hours',
description: 'Unit of the interval value',
},
{
displayName: 'Max Date and Time',
name: 'maxDateAndTime',
type: 'dateTime',
displayOptions: {
show: {
limitType: ['atSpecifiedTime'],
},
},
default: '',
description: 'Continue execution after the specified date and time',
},
];