2025-02-19 03:47:19 -08:00
|
|
|
import type { INodeProperties, IWebhookDescription } from 'n8n-workflow';
|
2025-01-24 03:44:05 -08:00
|
|
|
|
2025-01-24 05:59:43 -08:00
|
|
|
export const sendAndWaitWebhooksDescription: IWebhookDescription[] = [
|
2025-01-24 03:44:05 -08:00
|
|
|
{
|
|
|
|
name: 'default',
|
|
|
|
httpMethod: 'GET',
|
|
|
|
responseMode: 'onReceived',
|
|
|
|
responseData: '',
|
|
|
|
path: '={{ $nodeId }}',
|
|
|
|
restartWebhook: true,
|
|
|
|
isFullPath: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'default',
|
|
|
|
httpMethod: 'POST',
|
|
|
|
responseMode: 'onReceived',
|
|
|
|
responseData: '',
|
|
|
|
path: '={{ $nodeId }}',
|
|
|
|
restartWebhook: true,
|
|
|
|
isFullPath: true,
|
|
|
|
},
|
|
|
|
];
|
2025-02-19 03:47:19 -08:00
|
|
|
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
];
|