feat(webhook): add webhook application

This commit is contained in:
Ali BARIN
2022-12-08 00:34:26 +01:00
parent 67964192de
commit 3c62f182ab
13 changed files with 106 additions and 19 deletions
@@ -0,0 +1,20 @@
import isEmpty from 'lodash/isEmpty';
import defineTrigger from '../../../../helpers/define-trigger';
export default defineTrigger({
name: 'Catch raw webhook',
key: 'catchRawWebhook',
type: 'webhook',
description: 'Triggers when the webhook receives a request.',
async testRun($) {
if (!isEmpty($.lastExecutionStep?.dataOut)) {
$.pushTriggerItem({
raw: $.lastExecutionStep.dataOut,
meta: {
internalId: '',
}
});
}
},
});
@@ -0,0 +1,3 @@
import catchRawWebhook from './catch-raw-webhook';
export default [catchRawWebhook];