From c2e5d9ba4d5445f0c8dd1ecabf4f4c19ad32636d Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 14:22:03 +0800 Subject: [PATCH 01/20] fix(nocodb): remove as any in Hook.update param --- packages/nocodb/src/lib/services/hook.svc.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/services/hook.svc.ts b/packages/nocodb/src/lib/services/hook.svc.ts index 4c166f7d99..2964349bd1 100644 --- a/packages/nocodb/src/lib/services/hook.svc.ts +++ b/packages/nocodb/src/lib/services/hook.svc.ts @@ -56,8 +56,7 @@ export async function hookUpdate(param: { hookId: string; hook: HookReqType }) { validateHookPayload(param.hook.notification); - // todo: correction in swagger - return await Hook.update(param.hookId, param.hook as any); + return await Hook.update(param.hookId, param.hook); } export async function hookTest(param: { From d562e7fa6bd976e83ba6d62a6f97813102cce400 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 14:23:22 +0800 Subject: [PATCH 02/20] feat(nc-gui): add enable webhook --- packages/nc-gui/components/webhook/Editor.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/nc-gui/components/webhook/Editor.vue b/packages/nc-gui/components/webhook/Editor.vue index 8c4035324e..fc567991d5 100644 --- a/packages/nc-gui/components/webhook/Editor.vue +++ b/packages/nc-gui/components/webhook/Editor.vue @@ -55,6 +55,7 @@ const hook = reactive>({ }, }, condition: false, + active: true, }) const urlTabKey = ref('body') @@ -458,6 +459,21 @@ onMounted(async () => { + + + + + + Enable Webhook + + + + + From 5e58a9392c0d48f9b24e4ea792f72626585a22a9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 14:25:56 +0800 Subject: [PATCH 03/20] feat(nc-gui): add enableWebhook & testWebhook --- packages/nc-gui/lang/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 461cd6f519..4e863fc0b9 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -424,6 +424,8 @@ "openTab": "Open new tab", "iFrame": "Copy embeddable HTML code", "addWebhook": "Add New Webhook", + "enableWebhook": "Enable Webhook", + "testWebhook": "Test Webhook", "newToken": "Add New Token", "exportZip": "Export zip", "importZip": "Import zip", From d13863cc60edf1225110eadcc6d370a45f7fd03b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 14:26:08 +0800 Subject: [PATCH 04/20] feat(nc-gui): apply i18n in webhook editor --- packages/nc-gui/components/webhook/Editor.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/webhook/Editor.vue b/packages/nc-gui/components/webhook/Editor.vue index fc567991d5..c5c4b6ba33 100644 --- a/packages/nc-gui/components/webhook/Editor.vue +++ b/packages/nc-gui/components/webhook/Editor.vue @@ -441,8 +441,7 @@ onMounted(async () => {
- - Test Webhook + {{ $t('activity.testWebhook') }}
@@ -468,7 +467,7 @@ onMounted(async () => { class="nc-check-box-enable-webhook" @update:checked="hook.active = $event" > - Enable Webhook + {{ $t('activity.enableWebhook') }}
From 78f6c4e9c109a184fd892e3760ec99ac17e8f5d1 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 17:17:42 +0800 Subject: [PATCH 05/20] feat(nc-gui): add copyWebhook & deleteWebhook to en.json --- packages/nc-gui/lang/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 4e863fc0b9..89d6cc5c1f 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -426,6 +426,8 @@ "addWebhook": "Add New Webhook", "enableWebhook": "Enable Webhook", "testWebhook": "Test Webhook", + "copyWebhook": "Copy Webhook", + "deleteWebhook": "Delete Webhook", "newToken": "Add New Token", "exportZip": "Export zip", "importZip": "Import zip", From d1773af552e7d511074ab1afae42265ff0163768 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Mar 2023 18:54:56 +0800 Subject: [PATCH 06/20] fix(nocodb): incorrect hook create request type --- packages/nc-gui/components/webhook/Editor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/webhook/Editor.vue b/packages/nc-gui/components/webhook/Editor.vue index a62508b849..d8826edf8e 100644 --- a/packages/nc-gui/components/webhook/Editor.vue +++ b/packages/nc-gui/components/webhook/Editor.vue @@ -1,6 +1,6 @@