From 0c063017051eb8aad5c8feec470a8a8eb27d2d9d Mon Sep 17 00:00:00 2001 From: waleed Date: Wed, 1 Jul 2026 23:54:53 -0700 Subject: [PATCH] improvement(brex): fill validate-integration gaps against live API docs - add wandConfig AI-autofill to expense/spend-limit filter subBlocks - surface is_ppro_enabled on get/list transfer tools - surface start_date/end_date/authorization_settings on list_spend_limits to match get_spend_limit --- apps/sim/blocks/blocks/brex.ts | 24 ++++++++++++++++++++++++ apps/sim/tools/brex/get_transfer.ts | 6 ++++++ apps/sim/tools/brex/list_spend_limits.ts | 8 ++++++++ apps/sim/tools/brex/list_transfers.ts | 5 +++++ apps/sim/tools/brex/types.ts | 5 +++++ 5 files changed, 48 insertions(+) diff --git a/apps/sim/blocks/blocks/brex.ts b/apps/sim/blocks/blocks/brex.ts index b8efbc74d70..ce7cd932563 100644 --- a/apps/sim/blocks/blocks/brex.ts +++ b/apps/sim/blocks/blocks/brex.ts @@ -215,6 +215,12 @@ export const BrexBlock: BlockConfig = { placeholder: 'Comma-separated user IDs to filter by', mode: 'advanced', condition: { field: 'operation', value: ['list_expenses', 'list_card_transactions'] }, + wandConfig: { + enabled: true, + prompt: + 'Generate a comma-separated list of Brex user IDs to filter by based on the description.\n\nReturn ONLY the comma-separated user IDs - no explanations, no extra text.', + placeholder: 'Describe which users to include...', + }, }, { id: 'statuses', @@ -223,6 +229,12 @@ export const BrexBlock: BlockConfig = { placeholder: 'e.g., APPROVED, SETTLED (comma-separated)', mode: 'advanced', condition: { field: 'operation', value: 'list_expenses' }, + wandConfig: { + enabled: true, + prompt: + 'Generate a comma-separated list of Brex expense statuses to filter by.\n\nValid statuses: DRAFT, SUBMITTED, APPROVED, OUT_OF_POLICY, VOID, CANCELED, SPLIT, SETTLED\n\nExamples:\n- "only settled expenses" -> SETTLED\n- "approved or settled" -> APPROVED,SETTLED\n- "expenses awaiting review" -> DRAFT,SUBMITTED\n\nReturn ONLY the comma-separated status values - no explanations, no extra text.', + placeholder: 'Describe which expense statuses to include...', + }, }, { id: 'paymentStatuses', @@ -231,6 +243,12 @@ export const BrexBlock: BlockConfig = { placeholder: 'e.g., CLEARED, REFUNDED (comma-separated)', mode: 'advanced', condition: { field: 'operation', value: 'list_expenses' }, + wandConfig: { + enabled: true, + prompt: + 'Generate a comma-separated list of Brex expense payment statuses to filter by.\n\nValid statuses: NOT_STARTED, PROCESSING, CANCELED, DECLINED, CLEARED, REFUNDING, REFUNDED, CASH_ADVANCE, CREDITED, AWAITING_PAYMENT, SCHEDULED\n\nExamples:\n- "only cleared payments" -> CLEARED\n- "refunded or refunding" -> REFUNDED,REFUNDING\n\nReturn ONLY the comma-separated status values - no explanations, no extra text.', + placeholder: 'Describe which payment statuses to include...', + }, }, { id: 'purchasedAtStart', @@ -284,6 +302,12 @@ export const BrexBlock: BlockConfig = { placeholder: 'Comma-separated user IDs to filter spend limits by member', mode: 'advanced', condition: { field: 'operation', value: 'list_spend_limits' }, + wandConfig: { + enabled: true, + prompt: + 'Generate a comma-separated list of Brex user IDs to filter spend limits by member based on the description.\n\nReturn ONLY the comma-separated user IDs - no explanations, no extra text.', + placeholder: 'Describe which spend limit members to include...', + }, }, { id: 'cursor', diff --git a/apps/sim/tools/brex/get_transfer.ts b/apps/sim/tools/brex/get_transfer.ts index dcbd9f0233c..3312f9088d2 100644 --- a/apps/sim/tools/brex/get_transfer.ts +++ b/apps/sim/tools/brex/get_transfer.ts @@ -50,6 +50,7 @@ export const brexGetTransferTool: ToolConfig | null } export interface BrexVendor { @@ -171,6 +174,7 @@ export interface BrexTransfer { created_at: string | null display_name: string | null external_memo: string | null + is_ppro_enabled: boolean | null } export interface BrexCard { @@ -551,6 +555,7 @@ export interface BrexGetTransferResponse extends ToolResponse { createdAt: string | null displayName: string | null externalMemo: string | null + isPproEnabled: boolean | null } }