Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improvement(blocks): move optional fields to advanced mode for 10 int…
…egrations
  • Loading branch information
waleedlatif1 committed Feb 27, 2026
commit 644292e598c3773e213b4bfdffcba01bf755c554
17 changes: 17 additions & 0 deletions apps/sim/blocks/blocks/kalshi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ export const KalshiBlock: BlockConfig = {
{ label: 'Settled', id: 'settled' },
],
condition: { field: 'operation', value: ['get_markets', 'get_events'] },
mode: 'advanced',
},
{
id: 'seriesTicker',
title: 'Series Ticker',
type: 'short-input',
placeholder: 'Filter by series ticker',
condition: { field: 'operation', value: ['get_markets', 'get_events'] },
mode: 'advanced',
},
{
id: 'eventTicker',
Expand Down Expand Up @@ -134,6 +136,7 @@ export const KalshiBlock: BlockConfig = {
type: 'short-input',
placeholder: 'Filter by market ticker (optional)',
condition: { field: 'operation', value: ['get_orders', 'get_positions'] },
mode: 'advanced',
},
// Nested markets option
{
Expand All @@ -145,6 +148,7 @@ export const KalshiBlock: BlockConfig = {
{ label: 'Yes', id: 'true' },
],
condition: { field: 'operation', value: ['get_events', 'get_event'] },
mode: 'advanced',
},
// Get Positions fields
{
Expand All @@ -157,6 +161,7 @@ export const KalshiBlock: BlockConfig = {
{ label: 'Settled', id: 'settled' },
],
condition: { field: 'operation', value: ['get_positions'] },
mode: 'advanced',
},
// Get Orders fields
{
Expand All @@ -170,6 +175,7 @@ export const KalshiBlock: BlockConfig = {
{ label: 'Executed', id: 'executed' },
],
condition: { field: 'operation', value: ['get_orders'] },
mode: 'advanced',
},
// Get Fills timestamp filters
{
Expand All @@ -178,6 +184,7 @@ export const KalshiBlock: BlockConfig = {
type: 'short-input',
placeholder: 'Minimum timestamp (Unix milliseconds)',
condition: { field: 'operation', value: ['get_fills'] },
mode: 'advanced',
wandConfig: {
enabled: true,
prompt: `Generate a Unix timestamp in milliseconds based on the user's description.
Expand All @@ -198,6 +205,7 @@ Return ONLY the numeric timestamp (milliseconds since Unix epoch) - no explanati
type: 'short-input',
placeholder: 'Maximum timestamp (Unix milliseconds)',
condition: { field: 'operation', value: ['get_fills'] },
mode: 'advanced',
wandConfig: {
enabled: true,
prompt: `Generate a Unix timestamp in milliseconds based on the user's description.
Expand Down Expand Up @@ -290,13 +298,15 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
type: 'short-input',
placeholder: 'Filter by market ticker (optional)',
condition: { field: 'operation', value: ['get_fills'] },
mode: 'advanced',
},
{
id: 'orderId',
title: 'Order ID',
type: 'short-input',
placeholder: 'Filter by order ID (optional)',
condition: { field: 'operation', value: ['get_fills'] },
mode: 'advanced',
},
// Get Series by Ticker fields
{
Expand Down Expand Up @@ -398,6 +408,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
type: 'short-input',
placeholder: 'Custom order identifier (optional)',
condition: { field: 'operation', value: ['create_order'] },
mode: 'advanced',
},
{
id: 'clientOrderIdAmend',
Expand Down Expand Up @@ -425,13 +436,15 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
{ label: 'Immediate or Cancel', id: 'immediate_or_cancel' },
],
condition: { field: 'operation', value: ['create_order'] },
mode: 'advanced',
},
{
id: 'expirationTs',
title: 'Expiration',
type: 'short-input',
placeholder: 'Unix timestamp for order expiration',
condition: { field: 'operation', value: ['create_order'] },
mode: 'advanced',
wandConfig: {
enabled: true,
prompt: `Generate a Unix timestamp in seconds based on the user's description for when the order should expire.
Expand All @@ -455,6 +468,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
{ label: 'Yes', id: 'true' },
],
condition: { field: 'operation', value: ['create_order'] },
mode: 'advanced',
},
{
id: 'reduceOnly',
Expand All @@ -465,6 +479,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
{ label: 'Yes', id: 'true' },
],
condition: { field: 'operation', value: ['create_order'] },
mode: 'advanced',
},
// Pagination fields
{
Expand All @@ -483,6 +498,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
'get_fills',
],
},
mode: 'advanced',
},
{
id: 'cursor',
Expand All @@ -500,6 +516,7 @@ Return ONLY the numeric timestamp (seconds since Unix epoch) - no explanations,
'get_fills',
],
},
mode: 'advanced',
},
],
tools: {
Expand Down
7 changes: 7 additions & 0 deletions apps/sim/blocks/blocks/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const MongoDBBlock: BlockConfig<MongoDBResponse | MongoDBIntrospectRespon
title: 'Auth Source',
type: 'short-input',
placeholder: 'admin',
mode: 'advanced',
},
{
id: 'ssl',
Expand All @@ -80,6 +81,7 @@ export const MongoDBBlock: BlockConfig<MongoDBResponse | MongoDBIntrospectRespon
{ label: 'Preferred', id: 'preferred' },
],
value: () => 'preferred',
mode: 'advanced',
},
{
id: 'collection',
Expand Down Expand Up @@ -451,13 +453,15 @@ Return ONLY the JSON array pipeline - no explanations, no markdown, no extra tex
type: 'short-input',
placeholder: '100',
condition: { field: 'operation', value: 'query' },
mode: 'advanced',
},
{
id: 'sort',
title: 'Sort (JSON)',
type: 'code',
placeholder: '{"createdAt": -1}',
condition: { field: 'operation', value: 'query' },
mode: 'advanced',
wandConfig: {
enabled: true,
maintainHistory: true,
Expand Down Expand Up @@ -680,6 +684,7 @@ Generate the MongoDB update operation that safely and accurately fulfills the us
],
value: () => 'false',
condition: { field: 'operation', value: 'update' },
mode: 'advanced',
},
{
id: 'multi',
Expand All @@ -691,6 +696,7 @@ Generate the MongoDB update operation that safely and accurately fulfills the us
],
value: () => 'false',
condition: { field: 'operation', value: 'update' },
mode: 'advanced',
},
{
id: 'filter',
Expand Down Expand Up @@ -796,6 +802,7 @@ Return ONLY the MongoDB query filter as valid JSON - no explanations, no markdow
],
value: () => 'false',
condition: { field: 'operation', value: 'delete' },
mode: 'advanced',
},
],
tools: {
Expand Down
Loading
Loading