feat: Add delay until action for delay app

This commit is contained in:
Faruk AYDIN
2022-12-16 03:15:30 +03:00
committed by Ali BARIN
parent 5d9ed13003
commit cb58ab5fb7
6 changed files with 81 additions and 26 deletions

View File

@@ -0,0 +1,28 @@
import defineAction from '../../../../helpers/define-action';
export default defineAction({
name: 'Delay Until',
key: 'delayUntil',
description:
'Delays the execution of the next action until a specified date.',
arguments: [
{
label: 'Delay until (Date)',
key: 'delayUntil',
type: 'string' as const,
required: true,
description: 'Delay until the date. E.g. 2022-12-18',
variables: true,
},
],
async run($) {
const { delayUntil } = $.step.parameters;
const dataItem = {
delayUntil,
};
$.setActionItem({ raw: dataItem });
},
});

View File

@@ -1,3 +1,4 @@
import delayFor from './delay-for';
import delayUntil from './delay-until';
export default [delayFor];
export default [delayFor, delayUntil];