From 93d693bda0aaa83e2dd243057a1a3194f6bfdec0 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 24 Dec 2024 14:20:30 -0500 Subject: [PATCH 01/10] make sure `isManaged` is always return also validates that managed credentials cannot be edited --- packages/cli/test/integration/shared/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/test/integration/shared/types.ts b/packages/cli/test/integration/shared/types.ts index 2a789e4f00d0e..c6261c57d143f 100644 --- a/packages/cli/test/integration/shared/types.ts +++ b/packages/cli/test/integration/shared/types.ts @@ -69,7 +69,7 @@ export type CredentialPayload = { name: string; type: string; data: ICredentialDataDecryptedObject; - isManaged?: boolean; + isManaged: boolean; }; export type SaveCredentialFunction = ( From 6500400aba2f9c11f732a0b1f9e3a3a1d92927c9 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 24 Dec 2024 14:25:01 -0500 Subject: [PATCH 02/10] make `isManaged` optional --- packages/cli/test/integration/shared/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/test/integration/shared/types.ts b/packages/cli/test/integration/shared/types.ts index c6261c57d143f..2a789e4f00d0e 100644 --- a/packages/cli/test/integration/shared/types.ts +++ b/packages/cli/test/integration/shared/types.ts @@ -69,7 +69,7 @@ export type CredentialPayload = { name: string; type: string; data: ICredentialDataDecryptedObject; - isManaged: boolean; + isManaged?: boolean; }; export type SaveCredentialFunction = ( From 09a57688ecc804fe49c3681462422b98c6aa8b69 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 24 Dec 2024 15:29:43 -0500 Subject: [PATCH 03/10] Add free AI credits CTA --- .../CredentialEdit/CredentialConfig.vue | 6 +- .../CredentialEdit/CredentialEdit.vue | 14 +- .../src/components/FreeAiCreditsCallout.vue | 132 ++++++++++++++++++ .../editor-ui/src/components/NodeSettings.vue | 2 + .../src/plugins/i18n/locales/en.json | 8 +- packages/editor-ui/src/plugins/icons/index.ts | 2 + 6 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 packages/editor-ui/src/components/FreeAiCreditsCallout.vue diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue index fa754304faed7..45c18028520e1 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialConfig.vue @@ -55,6 +55,7 @@ type Props = { isRetesting?: boolean; requiredPropertiesFilled?: boolean; showAuthTypeSelector?: boolean; + isManaged?: boolean; }; const props = withDefaults(defineProps(), { @@ -235,7 +236,10 @@ watch(showOAuthSuccessBanner, (newValue, oldValue) => {