Skip to content

Commit 644292e

Browse files
committed
improvement(blocks): move optional fields to advanced mode for 10 integrations
1 parent ca8d7ca commit 644292e

File tree

10 files changed

+163
-0
lines changed

10 files changed

+163
-0
lines changed

apps/sim/blocks/blocks/kalshi.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ export const KalshiBlock: BlockConfig = {
9696
{ label: 'Settled', id: 'settled' },
9797
],
9898
condition: { field: 'operation', value: ['get_markets', 'get_events'] },
99+
mode: 'advanced',
99100
},
100101
{
101102
id: 'seriesTicker',
102103
title: 'Series Ticker',
103104
type: 'short-input',
104105
placeholder: 'Filter by series ticker',
105106
condition: { field: 'operation', value: ['get_markets', 'get_events'] },
107+
mode: 'advanced',
106108
},
107109
{
108110
id: 'eventTicker',
@@ -134,6 +136,7 @@ export const KalshiBlock: BlockConfig = {
134136
type: 'short-input',
135137
placeholder: 'Filter by market ticker (optional)',
136138
condition: { field: 'operation', value: ['get_orders', 'get_positions'] },
139+
mode: 'advanced',
137140
},
138141
// Nested markets option
139142
{
@@ -145,6 +148,7 @@ export const KalshiBlock: BlockConfig = {
145148
{ label: 'Yes', id: 'true' },
146149
],
147150
condition: { field: 'operation', value: ['get_events', 'get_event'] },
151+
mode: 'advanced',
148152
},
149153
// Get Positions fields
150154
{
@@ -157,6 +161,7 @@ export const KalshiBlock: BlockConfig = {
157161
{ label: 'Settled', id: 'settled' },
158162
],
159163
condition: { field: 'operation', value: ['get_positions'] },
164+
mode: 'advanced',
160165
},
161166
// Get Orders fields
162167
{
@@ -170,6 +175,7 @@ export const KalshiBlock: BlockConfig = {
170175
{ label: 'Executed', id: 'executed' },
171176
],
172177
condition: { field: 'operation', value: ['get_orders'] },
178+
mode: 'advanced',
173179
},
174180
// Get Fills timestamp filters
175181
{
@@ -178,6 +184,7 @@ export const KalshiBlock: BlockConfig = {
178184
type: 'short-input',
179185
placeholder: 'Minimum timestamp (Unix milliseconds)',
180186
condition: { field: 'operation', value: ['get_fills'] },
187+
mode: 'advanced',
181188
wandConfig: {
182189
enabled: true,
183190
prompt: `Generate a Unix timestamp in milliseconds based on the user's description.
@@ -198,6 +205,7 @@ Return ONLY the numeric timestamp (milliseconds since Unix epoch) - no explanati
198205
type: 'short-input',
199206
placeholder: 'Maximum timestamp (Unix milliseconds)',
200207
condition: { field: 'operation', value: ['get_fills'] },
208+
mode: 'advanced',
201209
wandConfig: {
202210
enabled: true,
203211
prompt: `Generate a Unix timestamp in milliseconds based on the user's description.
@@ -290,13 +298,15 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
290298
type: 'short-input',
291299
placeholder: 'Filter by market ticker (optional)',
292300
condition: { field: 'operation', value: ['get_fills'] },
301+
mode: 'advanced',
293302
},
294303
{
295304
id: 'orderId',
296305
title: 'Order ID',
297306
type: 'short-input',
298307
placeholder: 'Filter by order ID (optional)',
299308
condition: { field: 'operation', value: ['get_fills'] },
309+
mode: 'advanced',
300310
},
301311
// Get Series by Ticker fields
302312
{
@@ -398,6 +408,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
398408
type: 'short-input',
399409
placeholder: 'Custom order identifier (optional)',
400410
condition: { field: 'operation', value: ['create_order'] },
411+
mode: 'advanced',
401412
},
402413
{
403414
id: 'clientOrderIdAmend',
@@ -425,13 +436,15 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
425436
{ label: 'Immediate or Cancel', id: 'immediate_or_cancel' },
426437
],
427438
condition: { field: 'operation', value: ['create_order'] },
439+
mode: 'advanced',
428440
},
429441
{
430442
id: 'expirationTs',
431443
title: 'Expiration',
432444
type: 'short-input',
433445
placeholder: 'Unix timestamp for order expiration',
434446
condition: { field: 'operation', value: ['create_order'] },
447+
mode: 'advanced',
435448
wandConfig: {
436449
enabled: true,
437450
prompt: `Generate a Unix timestamp in seconds based on the user's description for when the order should expire.
@@ -455,6 +468,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
455468
{ label: 'Yes', id: 'true' },
456469
],
457470
condition: { field: 'operation', value: ['create_order'] },
471+
mode: 'advanced',
458472
},
459473
{
460474
id: 'reduceOnly',
@@ -465,6 +479,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
465479
{ label: 'Yes', id: 'true' },
466480
],
467481
condition: { field: 'operation', value: ['create_order'] },
482+
mode: 'advanced',
468483
},
469484
// Pagination fields
470485
{
@@ -483,6 +498,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
483498
'get_fills',
484499
],
485500
},
501+
mode: 'advanced',
486502
},
487503
{
488504
id: 'cursor',
@@ -500,6 +516,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
500516
'get_fills',
501517
],
502518
},
519+
mode: 'advanced',
503520
},
504521
],
505522
tools: {

apps/sim/blocks/blocks/mongodb.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const MongoDBBlock: BlockConfig<MongoDBResponse | MongoDBIntrospectRespon
6969
title: 'Auth Source',
7070
type: 'short-input',
7171
placeholder: 'admin',
72+
mode: 'advanced',
7273
},
7374
{
7475
id: 'ssl',
@@ -80,6 +81,7 @@ export const MongoDBBlock: BlockConfig<MongoDBResponse | MongoDBIntrospectRespon
8081
{ label: 'Preferred', id: 'preferred' },
8182
],
8283
value: () => 'preferred',
84+
mode: 'advanced',
8385
},
8486
{
8587
id: 'collection',
@@ -451,13 +453,15 @@ Return ONLY the JSON array pipeline - no explanations, no markdown, no extra tex
451453
type: 'short-input',
452454
placeholder: '100',
453455
condition: { field: 'operation', value: 'query' },
456+
mode: 'advanced',
454457
},
455458
{
456459
id: 'sort',
457460
title: 'Sort (JSON)',
458461
type: 'code',
459462
placeholder: '{"createdAt": -1}',
460463
condition: { field: 'operation', value: 'query' },
464+
mode: 'advanced',
461465
wandConfig: {
462466
enabled: true,
463467
maintainHistory: true,
@@ -680,6 +684,7 @@ Generate the MongoDB update operation that safely and accurately fulfills the us
680684
],
681685
value: () => 'false',
682686
condition: { field: 'operation', value: 'update' },
687+
mode: 'advanced',
683688
},
684689
{
685690
id: 'multi',
@@ -691,6 +696,7 @@ Generate the MongoDB update operation that safely and accurately fulfills the us
691696
],
692697
value: () => 'false',
693698
condition: { field: 'operation', value: 'update' },
699+
mode: 'advanced',
694700
},
695701
{
696702
id: 'filter',
@@ -796,6 +802,7 @@ Return ONLY the MongoDB query filter as valid JSON - no explanations, no markdow
796802
],
797803
value: () => 'false',
798804
condition: { field: 'operation', value: 'delete' },
805+
mode: 'advanced',
799806
},
800807
],
801808
tools: {

0 commit comments

Comments
 (0)