Reorder fields in block

This commit is contained in:
Siddharth Ganesan
2025-07-07 16:24:18 -07:00
parent a6e144ad93
commit 154d8a674a

View File

@@ -33,6 +33,17 @@ export const AWSLambdaBlock: BlockConfig<AWSLambdaResponse> = {
bgColor: '#FF9900',
icon: S3Icon,
subBlocks: [
{
id: 'operation',
title: 'Operation',
type: 'dropdown',
layout: 'full',
options: [
{ label: 'Fetch', id: 'fetch' },
{ label: 'Create/Update', id: 'create/update' },
{ label: 'Get Prompts', id: 'getPrompts' },
],
},
{
id: 'accessKeyId',
title: 'AWS Access Key ID',
@@ -57,6 +68,18 @@ export const AWSLambdaBlock: BlockConfig<AWSLambdaResponse> = {
value: ['fetch', 'create/update'],
},
},
{
id: 'role',
title: 'Role ARN',
type: 'short-input',
layout: 'full',
placeholder: 'Enter the IAM Role ARN for Lambda execution',
password: false,
condition: {
field: 'operation',
value: ['fetch', 'create/update'],
},
},
{
id: 'region',
title: 'AWS Region',
@@ -90,29 +113,6 @@ export const AWSLambdaBlock: BlockConfig<AWSLambdaResponse> = {
value: ['fetch', 'create/update'],
},
},
{
id: 'role',
title: 'Role ARN',
type: 'short-input',
layout: 'full',
placeholder: 'Enter the IAM Role ARN for Lambda execution',
password: false,
condition: {
field: 'operation',
value: ['fetch', 'create/update'],
},
},
{
id: 'operation',
title: 'Operation',
type: 'dropdown',
layout: 'full',
options: [
{ label: 'Fetch', id: 'fetch' },
{ label: 'Create/Update', id: 'create/update' },
{ label: 'Get Prompts', id: 'getPrompts' },
],
},
{
id: 'functionName',
title: 'Function Name',
@@ -146,20 +146,6 @@ export const AWSLambdaBlock: BlockConfig<AWSLambdaResponse> = {
value: ['create/update'],
},
},
{
id: 'code',
title: 'Function Code',
type: 'code',
layout: 'full',
language: 'json',
placeholder:
'{\n "index.js": "exports.handler = async (event) => {...};"\n}',
condition: {
field: 'operation',
value: ['create/update'],
},
},
{
id: 'timeout',
title: 'Timeout (seconds)',
@@ -182,6 +168,18 @@ export const AWSLambdaBlock: BlockConfig<AWSLambdaResponse> = {
value: ['create/update'],
},
},
{
id: 'code',
title: 'Function Code',
type: 'code',
layout: 'full',
language: 'json',
placeholder: '{\n "index.js": "exports.handler = async (event) => {...};"\n}',
condition: {
field: 'operation',
value: ['create/update'],
},
},
{
id: 'environmentVariables',
title: 'Environment Variables',