@@ -63,6 +63,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
6363 placeholder : 'https://localhost:9200' ,
6464 required : true ,
6565 condition : { field : 'deploymentType' , value : 'self_hosted' } ,
66+ dependsOn : [ 'deploymentType' ] ,
6667 } ,
6768
6869 // Cloud ID
@@ -73,6 +74,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
7374 placeholder : 'deployment-name:base64-encoded-data' ,
7475 required : true ,
7576 condition : { field : 'deploymentType' , value : 'cloud' } ,
77+ dependsOn : [ 'deploymentType' ] ,
7678 } ,
7779
7880 // Authentication method
@@ -96,6 +98,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
9698 password : true ,
9799 required : true ,
98100 condition : { field : 'authMethod' , value : 'api_key' } ,
101+ dependsOn : [ 'authMethod' ] ,
99102 } ,
100103
101104 // Username
@@ -106,6 +109,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
106109 placeholder : 'Enter username' ,
107110 required : true ,
108111 condition : { field : 'authMethod' , value : 'basic_auth' } ,
112+ dependsOn : [ 'authMethod' ] ,
109113 } ,
110114
111115 // Password
@@ -117,6 +121,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
117121 password : true ,
118122 required : true ,
119123 condition : { field : 'authMethod' , value : 'basic_auth' } ,
124+ dependsOn : [ 'authMethod' ] ,
120125 } ,
121126
122127 // Index name - for most operations
@@ -158,6 +163,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
158163 'elasticsearch_delete_document' ,
159164 ] ,
160165 } ,
166+ dependsOn : [ 'operation' ] ,
161167 } ,
162168
163169 // Optional Document ID - for index document
@@ -167,6 +173,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
167173 type : 'short-input' ,
168174 placeholder : 'Leave empty for auto-generated ID' ,
169175 condition : { field : 'operation' , value : 'elasticsearch_index_document' } ,
176+ dependsOn : [ 'operation' ] ,
170177 } ,
171178
172179 // Document body - for index
@@ -177,6 +184,7 @@ export const ElasticsearchBlock: BlockConfig<ElasticsearchResponse> = {
177184 placeholder : '{ "field": "value", "another_field": 123 }' ,
178185 required : true ,
179186 condition : { field : 'operation' , value : 'elasticsearch_index_document' } ,
187+ dependsOn : [ 'operation' ] ,
180188 wandConfig : {
181189 enabled : true ,
182190 prompt : `Generate an Elasticsearch document JSON object based on the user's description.
@@ -197,6 +205,7 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`,
197205 placeholder : '{ "field_to_update": "new_value" }' ,
198206 required : true ,
199207 condition : { field : 'operation' , value : 'elasticsearch_update_document' } ,
208+ dependsOn : [ 'operation' ] ,
200209 wandConfig : {
201210 enabled : true ,
202211 prompt : `Generate an Elasticsearch partial document JSON for updating based on the user's description.
@@ -215,6 +224,7 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`,
215224 type : 'code' ,
216225 placeholder : '{ "match": { "field": "search term" } }' ,
217226 condition : { field : 'operation' , value : 'elasticsearch_search' } ,
227+ dependsOn : [ 'operation' ] ,
218228 wandConfig : {
219229 enabled : true ,
220230 prompt : `Generate an Elasticsearch query DSL JSON based on the user's description.
@@ -237,6 +247,7 @@ Return ONLY valid JSON - no explanations, no markdown code blocks.`,
237247 type : 'code' ,
238248 placeholder : '{ "match": { "field": "value" } }' ,
239249 condition : { field : 'operation' , value : 'elasticsearch_count' } ,
250+ dependsOn : [ 'operation' ] ,
240251 wandConfig : {
241252 enabled : true ,
242253 prompt : `Generate an Elasticsearch query DSL JSON for counting documents based on the user's description.
0 commit comments