Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 7 additions & 7 deletions apps/docs/content/docs/integrations/amplitude.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Get a user profile including properties, cohort memberships, and computed proper
| `deviceId` | string | Device ID |
| `ampProps` | json | Amplitude user properties \(library, first_used, last_used, custom properties\) |
| `cohortIds` | array | List of cohort IDs the user belongs to |
| `computations` | json | Computed user properties |
| `computations` | json | Computed user properties when Amplitude returns them under a computations key; computed values are otherwise returned within ampProps |

</ReferenceDetails>

Expand Down Expand Up @@ -352,17 +352,17 @@ Analyze conversion rates and drop-off between a sequence of events.
| `interval` | string | No | Time interval: -300000 \(real-time\), -3600000 \(hourly\), 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
| `conversionWindowSeconds` | string | No | Conversion window in seconds \(default: 2592000, i.e. 30 days\) |
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
| `limit` | string | No | Maximum number of group-by values \(default: 100, max: 1000\) |
| `limit` | string | No | Maximum number of group-by values \(default and max: 1000\) |
| `segment` | string | No | JSON segment definition\(s\) applied to the query |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `funnels` | array | Funnel results, one entry per segment |
| ↳ `stepByStep` | json | Conversion count at each step |
| ↳ `cumulative` | json | Cumulative conversion percentage at each step |
| ↳ `cumulativeRaw` | json | Cumulative conversion count at each step |
| ↳ `stepByStep` | json | Fraction of users from the previous step who completed each step |
| ↳ `cumulative` | json | Fraction of total users who completed each step |
| ↳ `cumulativeRaw` | json | Number of users who completed each step |
| ↳ `medianTransTimes` | json | Median transition time between steps \(ms\) |
| ↳ `avgTransTimes` | json | Average transition time between steps \(ms\) |
| ↳ `events` | json | Event names for each funnel step |
Expand All @@ -384,8 +384,8 @@ Measure how many users return to perform an action after a starting action.
| `returnEvent` | string | Yes | JSON returning event object, e.g. \{"event_type":"_all"\} or \{"event_type":"_active"\} |
| `start` | string | Yes | Start date in YYYYMMDD format |
| `end` | string | Yes | End date in YYYYMMDD format |
| `retentionMode` | string | No | Retention type: "bracket", "rolling", or "n-day" \(default: n-day\) |
| `retentionBrackets` | string | No | Required when Retention Mode is "bracket". Day ranges, e.g. \[\[0,4\]\] |
| `retentionMode` | string | No | Retention type: "n-day" \(sent as nday\), "rolling", "bracket", or "nday_or_before" \(default: n-day\) |
| `retentionBrackets` | string | No | Required when Retention Mode is "bracket". Day ranges with an exclusive end day, e.g. \[\[0,5\]\] for Day 0 to Day 4 |
| `interval` | string | No | Time interval: 1 \(daily\), 7 \(weekly\), or 30 \(monthly\) |
| `groupBy` | string | No | Property to group by \(limit: one; prefix custom properties with "gp:"\) |
| `segment` | string | No | JSON segment definition\(s\) applied to the query |
Expand Down
16 changes: 8 additions & 8 deletions apps/docs/content/docs/integrations/box.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ Create a new Box Sign request to send documents for e-signature
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Sign request ID |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
| `name` | string | Sign request name |
| `shortId` | string | Human-readable short ID |
| `signers` | array | List of signers |
Expand All @@ -387,7 +387,7 @@ Create a new Box Sign request to send documents for e-signature
| `sourceFiles` | array | Source files for signing |
| ↳ `id` | string | File ID |
| ↳ `type` | string | File type |
| ↳ `name` | string | File name |
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
| `emailSubject` | string | Custom email subject line |
| `emailMessage` | string | Custom email message body |
| `daysValid` | number | Number of days the request is valid |
Expand Down Expand Up @@ -415,7 +415,7 @@ Get the details and status of a Box Sign request
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Sign request ID |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
| `name` | string | Sign request name |
| `shortId` | string | Human-readable short ID |
| `signers` | array | List of signers |
Expand All @@ -428,7 +428,7 @@ Get the details and status of a Box Sign request
| `sourceFiles` | array | Source files for signing |
| ↳ `id` | string | File ID |
| ↳ `type` | string | File type |
| ↳ `name` | string | File name |
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
| `emailSubject` | string | Custom email subject line |
| `emailMessage` | string | Custom email message body |
| `daysValid` | number | Number of days the request is valid |
Expand Down Expand Up @@ -458,7 +458,7 @@ List all Box Sign requests
| --------- | ---- | ----------- |
| `signRequests` | array | List of sign requests |
| ↳ `id` | string | Sign request ID |
| ↳ `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
| ↳ `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
| ↳ `name` | string | Sign request name |
| ↳ `shortId` | string | Human-readable short ID |
| ↳ `signers` | array | List of signers |
Expand All @@ -471,7 +471,7 @@ List all Box Sign requests
| ↳ `sourceFiles` | array | Source files for signing |
| ↳ `id` | string | File ID |
| ↳ `type` | string | File type |
| ↳ `name` | string | File name |
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
| ↳ `emailSubject` | string | Custom email subject line |
| ↳ `emailMessage` | string | Custom email message body |
| ↳ `daysValid` | number | Number of days the request is valid |
Expand Down Expand Up @@ -501,7 +501,7 @@ Cancel a pending Box Sign request
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Sign request ID |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, expired, error_converting, error_sending, finalizing, error_finalizing\) |
| `status` | string | Request status \(converting, created, sent, viewed, signed, cancelled, declined, error, error_converting, error_sending, expired, finalizing, error_finalizing\) |
| `name` | string | Sign request name |
| `shortId` | string | Human-readable short ID |
| `signers` | array | List of signers |
Expand All @@ -514,7 +514,7 @@ Cancel a pending Box Sign request
| `sourceFiles` | array | Source files for signing |
| ↳ `id` | string | File ID |
| ↳ `type` | string | File type |
| ↳ `name` | string | File name |
| ↳ `name` | string | File name \(Box Sign returns source files without a name, so this is usually empty\) |
| `emailSubject` | string | Custom email subject line |
| `emailMessage` | string | Custom email message body |
| `daysValid` | number | Number of days the request is valid |
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/integrations/mailchimp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Update an existing audience (list) in Mailchimp
| `audienceName` | string | No | The name of the audience/list \(e.g., "Newsletter Subscribers"\) |
| `permissionReminder` | string | No | Permission reminder text shown to subscribers \(e.g., "You signed up for updates on our website"\) |
| `campaignDefaults` | string | No | JSON object of default campaign settings \(e.g., \{"from_name": "Acme", "from_email": "news@acme.com"\}\) |
| `emailTypeOption` | string | No | Support multiple email formats: "true" or "false" |
| `emailTypeOption` | string | No | Support multiple email formats: "true" or "false". Omit to leave it unchanged |

#### Output

Expand Down Expand Up @@ -1627,7 +1627,7 @@ Create a new landing page in Mailchimp

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `landingPageType` | string | Yes | The type of landing page: "signup" |
| `landingPageType` | string | Yes | The type of landing page: "signup" or "product" \("click-through" is kept for saved workflows but is not in the current API\) |
| `landingPageTitle` | string | No | The title of the landing page \(e.g., "Join Our Newsletter"\) |

#### Output
Expand Down
18 changes: 9 additions & 9 deletions apps/docs/content/docs/integrations/sap_s4hana.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ List suppliers from SAP S/4HANA Cloud (API_BUSINESS_PARTNER, A_Supplier) with op
| ↳ `InternationalLocationNumber1` | string | International location number, part 1 |
| ↳ `InternationalLocationNumber2` | string | International location number, part 2 |
| ↳ `InternationalLocationNumber3` | string | International location number, part 3 |
| ↳ `IsNaturalPerson` | boolean | Indicates whether the supplier is a natural person |
| ↳ `IsNaturalPerson` | string | Indicates whether the supplier is a natural person |
| ↳ `PaymentIsBlockedForSupplier` | boolean | Payment block flag |
| ↳ `PostingIsBlocked` | boolean | Posting block flag |
| ↳ `PurchasingIsBlocked` | boolean | Purchasing block flag |
Expand Down Expand Up @@ -504,7 +504,7 @@ Retrieve a single supplier by Supplier key from SAP S/4HANA Cloud (API_BUSINESS_
| ↳ `InternationalLocationNumber1` | string | International location number, part 1 |
| ↳ `InternationalLocationNumber2` | string | International location number, part 2 |
| ↳ `InternationalLocationNumber3` | string | International location number, part 3 |
| ↳ `IsNaturalPerson` | boolean | Indicates whether the supplier is a natural person |
| ↳ `IsNaturalPerson` | string | Indicates whether the supplier is a natural person |
| ↳ `PaymentIsBlockedForSupplier` | boolean | Payment block flag |
| ↳ `PostingIsBlocked` | boolean | Posting block flag |
| ↳ `PurchasingIsBlocked` | boolean | Purchasing block flag |
Expand Down Expand Up @@ -811,7 +811,7 @@ List outbound deliveries from SAP S/4HANA Cloud (API_OUTBOUND_DELIVERY_SRV;v=000
| `tokenUrl` | string | No | OAuth token URL \(Cloud Private / On-Premise + OAuth\) |
| `username` | string | No | Username for HTTP Basic auth |
| `password` | string | No | Password for HTTP Basic auth |
| `filter` | string | No | OData $filter expression \(e.g., "OverallDeliveryStatus eq 'C'"\) |
| `filter` | string | No | OData $filter expression \(e.g., "OverallGoodsMovementStatus eq 'C'"\) |
| `top` | number | No | Maximum results to return \($top\) |
| `skip` | number | No | Number of results to skip \($skip\) |
| `orderBy` | string | No | OData $orderby expression |
Expand Down Expand Up @@ -1366,7 +1366,7 @@ List material document headers (goods movements) from SAP S/4HANA Cloud (API_MAT
| ↳ `CreationDate` | string | Creation date \(OData /Date\(...\)/ string\) |
| ↳ `CreationTime` | string | Creation time \(OData PT...S string\) |
| ↳ `VersionForPrintingSlip` | string | Version for printing the goods movement slip |
| ↳ `ManualPrintIsTriggered` | boolean | Indicates whether manual print was triggered for this document |
| ↳ `ManualPrintIsTriggered` | string | Indicates whether manual print was triggered for this document |
| ↳ `CtrlPostgForExtWhseMgmtSyst` | string | Control posting for external warehouse management system |
| ↳ `to_MaterialDocumentItem` | json | Material document items \(only present when $expand=to_MaterialDocumentItem is supplied\) |

Expand Down Expand Up @@ -1415,7 +1415,7 @@ Retrieve a single material document header by composite key (MaterialDocument +
| ↳ `CreationDate` | string | Creation date \(OData /Date\(...\)/ string\) |
| ↳ `CreationTime` | string | Creation time \(OData PT...S string\) |
| ↳ `VersionForPrintingSlip` | string | Version for printing the goods movement slip |
| ↳ `ManualPrintIsTriggered` | boolean | Indicates whether manual print was triggered for this document |
| ↳ `ManualPrintIsTriggered` | string | Indicates whether manual print was triggered for this document |
| ↳ `CtrlPostgForExtWhseMgmtSyst` | string | Control posting for external warehouse management system |
| ↳ `to_MaterialDocumentItem` | json | Material document items \(only present when $expand=to_MaterialDocumentItem is supplied\) |

Expand Down Expand Up @@ -1457,7 +1457,7 @@ List purchase requisitions from SAP S/4HANA Cloud (API_PURCHASEREQ_PROCESS_SRV,
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
| ↳ `PurchaseRequisitionType` | string | Purchase requisition document type \(e.g., NB\) |
| ↳ `PurReqnDescription` | string | Purchase requisition description |
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |

</ReferenceDetails>

Expand Down Expand Up @@ -1494,7 +1494,7 @@ Retrieve a single purchase requisition by PurchaseRequisition key from SAP S/4HA
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
| ↳ `PurchaseRequisitionType` | string | PR document type \(e.g., NB\) |
| ↳ `PurReqnDescription` | string | Purchase requisition description |
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
| ↳ `to_PurchaseReqnItem` | json | Expanded PR items \(when $expand=to_PurchaseReqnItem\) |

</ReferenceDetails>
Expand Down Expand Up @@ -1532,7 +1532,7 @@ Create a purchase requisition in SAP S/4HANA Cloud (API_PURCHASEREQ_PROCESS_SRV,
| ↳ `PurchaseRequisition` | string | Auto-assigned purchase requisition number |
| ↳ `PurchaseRequisitionType` | string | PR document type \(e.g., NB\) |
| ↳ `PurReqnDescription` | string | Purchase requisition description |
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |
| ↳ `to_PurchaseReqnItem` | json | Created PR items returned in deep insert |

</ReferenceDetails>
Expand Down Expand Up @@ -1570,7 +1570,7 @@ Update fields on an A_PurchaseRequisitionHeader entity in SAP S/4HANA Cloud (API
| ↳ `PurchaseRequisition` | string | Purchase requisition number |
| ↳ `PurchaseRequisitionType` | string | PR document type |
| ↳ `PurReqnDescription` | string | Purchase requisition description |
| ↳ `SourceDetermination` | string | Source-of-supply determination flag |
| ↳ `SourceDetermination` | boolean | Source-of-supply determination flag |

</ReferenceDetails>

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/integrations/supabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ Move a file within a Supabase storage bucket
| `message` | string | Operation status message |
| `results` | object | Move operation result |
| ↳ `message` | string | Operation status message |
| ↳ `Id` | string | Identifier of the destination object |
| ↳ `Key` | string | Full object key of the destination |
| ↳ `Id` | string | Not returned by the move endpoint, which responds with only a message |
| ↳ `Key` | string | Not returned by the move endpoint, which responds with only a message |

</ReferenceDetails>

Expand Down
10 changes: 6 additions & 4 deletions apps/sim/blocks/blocks/airtable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ describe('Airtable pagination offsets', () => {
})

it('keeps the model offset on a List Records tool call', () => {
const mapped = mapParams(
{ ...baseParams, operation: 'list', offset: 'itrModel' },
{ operation: 'list' }
)
const mapped = mapParams({ ...baseParams, offset: 'itrModel' }, { operation: 'list' })
expect(mapped.offset).toBe('itrModel')
})

it('maps an offset the user set on the tool when the operation arrives only on the context', () => {
const mapped = mapParams({ ...baseParams, recordsOffset: 'itrUser' }, { operation: 'list' })
expect(mapped.offset).toBe('itrUser')
})
})
16 changes: 8 additions & 8 deletions apps/sim/blocks/blocks/airtable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
basesOffset,
...rest
} = params
/** Agent tool calls carry the stored operation only on `context`, not in `params`. */
const operation = params.operation ?? context?.operation
let parsedRecords: unknown
let parsedFields: unknown
let parsedFieldsToMergeOn: unknown
Expand All @@ -440,24 +442,22 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
try {
if (
records &&
(params.operation === 'create' ||
params.operation === 'updateMultiple' ||
params.operation === 'upsert')
(operation === 'create' || operation === 'updateMultiple' || operation === 'upsert')
) {
parsedRecords = parseJsonInput(records)
}
if (fields && params.operation === 'update') {
if (fields && operation === 'update') {
parsedFields = parseJsonInput(fields)
}
if (fieldsToMergeOn && params.operation === 'upsert') {
if (fieldsToMergeOn && operation === 'upsert') {
parsedFieldsToMergeOn = parseJsonInput(fieldsToMergeOn)
}
if (recordIds && params.operation === 'delete') {
if (recordIds && operation === 'delete') {
parsedRecordIds = parseJsonInput(recordIds)
}
} catch (error) {
throw new Error(
`Invalid JSON input for ${params.operation} operation: ${getErrorMessage(error)}`
`Invalid JSON input for ${operation} operation: ${getErrorMessage(error)}`
)
}

Expand All @@ -469,7 +469,7 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
const typecastParams =
typecast != null ? { typecast: typecast === true || typecast === 'true' } : {}

switch (params.operation) {
switch (operation) {
case 'list':
return {
...baseParams,
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/blocks/blocks/amplitude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ export const AmplitudeBlock: BlockConfig = {
{ label: 'N-Day', id: 'n-day' },
{ label: 'Rolling', id: 'rolling' },
{ label: 'Bracket', id: 'bracket' },
{ label: 'N-Day or Before', id: 'nday_or_before' },
],
value: () => 'n-day',
condition: { field: 'operation', value: 'retention' },
Expand All @@ -949,7 +950,7 @@ export const AmplitudeBlock: BlockConfig = {
id: 'retentionBrackets',
title: 'Retention Brackets',
type: 'short-input',
placeholder: '[[0,4]] — required when Retention Mode is Bracket',
placeholder: '[[0,5]] (end day exclusive) — required when Retention Mode is Bracket',
condition: {
field: 'operation',
value: 'retention',
Expand Down
Loading
Loading