mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
Reorder fields in block
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user