+
(
(
{
- if (func.return_type === 'json' || func.return_type === 'jsonb') {
+ if (supportedReturnTypes.includes(func.return_type)) {
const { value } = convertArgumentTypes(func.argument_types)
if (value.length !== 1) return false
return value[0].type === 'json' || value[0].type === 'jsonb'
@@ -403,7 +409,11 @@ export const CreateHookSheet = ({
No function with a single JSON/B argument
- and JSON/B return type found in this schema.
+ and JSON/B
+ {definition.enabledKey === 'HOOK_SEND_EMAIL_ENABLED'
+ ? ' or void'
+ : ''}{' '}
+ return type found in this schema.
}
/>
@@ -413,8 +423,8 @@ export const CreateHookSheet = ({
/>
-
- The following statements will be executed on the function:
+
+ The following statements will be executed on the selected function:
) : (
-
Choose a function...
+
Select a function
)}
@@ -124,7 +124,7 @@ const FunctionSelector = ({
No functions found
7 ? 'h-[210px]' : ''}>
- {!(functions || []).length && (
+ {!functions.length && (
)}
- {functions?.map((func) => (
+ {functions.map((func) => (