Skip to content

Commit aa0ff21

Browse files
authored
fix(hex,stripe): validate Hex and Stripe against their API docs (#10005)
* fix(hex): keep stale list filters out of other operations, add documented run trigger and pagination fields - get_project_runs no longer receives the List Projects status filter, and list users/groups/collections/data connections drop a stored List Projects sort field they reject (valid ones still pass) - get_queried_tables gains after/before cursors via dedicated subBlocks, plus after/before outputs - list_groups gains the documented userId filter via a dedicated subBlock - run status and project runs expose runTrigger; elapsedTime is milliseconds - path ids go through safeUrlPathSegment - correct documented limit ranges and the create_group createdAt output * fix(stripe): stop unset Yes/No fields from changing Stripe objects, honor subscription item ids, guard path ids, add pagination - Yes/No dropdowns (cancel_at_period_end, auto_advance, capture, active, prorate, invoice_now, paid_out_of_band) gain a leading Default option that is never sent. The UI seeded the first option ("Yes") as soon as advanced options were shown, so merely opening them on Update Subscription scheduled a cancellation and on Pay Invoice marked the invoice paid out of band. Stored 'true'/'false'/null map exactly as before, and every key is now assigned so a raw '' cannot leak past the mapper. - update_subscription sends items[i][id] (and deleted when true): Stripe adds a new item when id is omitted, so changing a price created a duplicate billed item. - All path ids go through safeUrlPathSegment, so an id cannot traverse to another Stripe endpoint with the caller's key. - create_price no longer sends unit_amount=0 for an empty field; create_subscription no longer sends trial_period_days=0 for an empty field. - starting_after/ending_before on every list tool and page/next_page on every search tool, wired through new list_starting_after/list_ending_before/search_page subBlocks. - Stripe trigger declares the documented account and context event fields. * chore(docs): regenerate Hex and Stripe tool metadata and docs * fix(hex,stripe): keep agent-supplied cursors and filters when the block maps dedicated fields * fix(hex,stripe): type run projectVersion as a string, send zero item quantities, mark nullable event fields * fix(hex): only fall back to raw run status and user id on agent calls
1 parent 6cb5bfc commit aa0ff21

76 files changed

Lines changed: 947 additions & 133 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/content/docs/integrations/hex.mdx‎

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Create a new group in the Hex workspace, optionally with initial members.
8787
| --------- | ---- | ----------- |
8888
| `id` | string | Newly created group UUID |
8989
| `name` | string | Group name |
90-
| `createdAt` | string | Creation timestamp |
90+
| `createdAt` | string | Creation timestamp \(not returned by the create endpoint, so usually null\) |
9191

9292
</ReferenceDetails>
9393

@@ -245,7 +245,7 @@ Get metadata and details for a specific Hex project by its ID.
245245

246246
### Hex Get Project Runs
247247

248-
Retrieve API-triggered runs for a Hex project with optional filtering by status and pagination.
248+
Retrieve runs for a Hex project (API-triggered, scheduled, and app refresh runs) with optional filtering by status and trigger, and offset pagination.
249249

250250
<ReferenceDetails>
251251

@@ -268,11 +268,12 @@ Retrieve API-triggered runs for a Hex project with optional filtering by status
268268
| ↳ `runId` | string | Run UUID |
269269
| ↳ `runUrl` | string | URL to view the run |
270270
| ↳ `status` | string | Run status \(PENDING, RUNNING, COMPLETED, ERRORED, KILLED, UNABLE_TO_ALLOCATE_KERNEL\) |
271+
| ↳ `runTrigger` | string | How the run was triggered \(API, SCHEDULED, APP_REFRESH\) |
271272
| ↳ `startTime` | string | Run start time |
272273
| ↳ `endTime` | string | Run end time |
273-
| ↳ `elapsedTime` | number | Elapsed time in seconds |
274+
| ↳ `elapsedTime` | number | Elapsed run time in milliseconds |
274275
| ↳ `traceId` | string | Trace ID |
275-
| ↳ `projectVersion` | number | Project version number |
276+
| ↳ `projectVersion` | string | Project version that was run \("1", "2", ...; "draft" for notebook runs\) |
276277
| `total` | number | Total number of runs returned |
277278
| `traceId` | string | Top-level trace ID |
278279
| `nextPage` | string | Cursor for the next page of runs |
@@ -291,7 +292,9 @@ Return the warehouse tables queried by a Hex project, including data connection
291292
| Parameter | Type | Required | Description |
292293
| --------- | ---- | -------- | ----------- |
293294
| `projectId` | string | Yes | The UUID of the Hex project |
294-
| `limit` | number | No | Maximum number of tables to return \(1-100\) |
295+
| `limit` | number | No | Maximum number of tables to return \(1-100, default: 25\) |
296+
| `after` | string | No | Cursor to fetch the page of results after this value |
297+
| `before` | string | No | Cursor to fetch the page of results before this value |
295298

296299
#### Output
297300

@@ -302,6 +305,8 @@ Return the warehouse tables queried by a Hex project, including data connection
302305
| ↳ `dataConnectionName` | string | Data connection name |
303306
| ↳ `tableName` | string | Table name |
304307
| `total` | number | Total number of tables returned |
308+
| `after` | string | Cursor for the next page of results |
309+
| `before` | string | Cursor for the previous page of results |
305310

306311
</ReferenceDetails>
307312

@@ -326,11 +331,12 @@ Check the status of a Hex project run by its run ID.
326331
| `runId` | string | Run UUID |
327332
| `runUrl` | string | URL to view the run |
328333
| `status` | string | Run status \(PENDING, RUNNING, COMPLETED, ERRORED, KILLED, UNABLE_TO_ALLOCATE_KERNEL\) |
334+
| `runTrigger` | string | How the run was triggered \(API, SCHEDULED, APP_REFRESH\) |
329335
| `startTime` | string | ISO 8601 run start time |
330336
| `endTime` | string | ISO 8601 run end time |
331-
| `elapsedTime` | number | Elapsed time in seconds |
337+
| `elapsedTime` | number | Elapsed run time in milliseconds |
332338
| `traceId` | string | Trace ID for debugging |
333-
| `projectVersion` | number | Project version number |
339+
| `projectVersion` | string | Project version that was run \("1", "2", ...; "draft" for notebook runs\) |
334340

335341
</ReferenceDetails>
336342

@@ -344,7 +350,7 @@ List all collections in the Hex workspace.
344350

345351
| Parameter | Type | Required | Description |
346352
| --------- | ---- | -------- | ----------- |
347-
| `limit` | number | No | Maximum number of collections to return \(1-500, default: 25\) |
353+
| `limit` | number | No | Maximum number of collections to return \(1-100, default: 25\) |
348354
| `sortBy` | string | No | Sort by field: NAME |
349355
| `after` | string | No | Cursor to fetch the page of results after this value |
350356
| `before` | string | No | Cursor to fetch the page of results before this value |
@@ -376,7 +382,7 @@ List all data connections in the Hex workspace (e.g., Snowflake, PostgreSQL, Big
376382

377383
| Parameter | Type | Required | Description |
378384
| --------- | ---- | -------- | ----------- |
379-
| `limit` | number | No | Maximum number of connections to return \(1-500, default: 25\) |
385+
| `limit` | number | No | Maximum number of connections to return \(1-100, default: 25\) |
380386
| `sortBy` | string | No | Sort by field: CREATED_AT or NAME |
381387
| `sortDirection` | string | No | Sort direction: ASC or DESC |
382388
| `after` | string | No | Cursor to fetch the page of results after this value |
@@ -402,7 +408,7 @@ List all data connections in the Hex workspace (e.g., Snowflake, PostgreSQL, Big
402408

403409
### Hex List Groups
404410

405-
List all groups in the Hex workspace with optional sorting.
411+
List all groups in the Hex workspace with optional sorting, or only the groups a user belongs to.
406412

407413
<ReferenceDetails>
408414

@@ -413,6 +419,7 @@ List all groups in the Hex workspace with optional sorting.
413419
| `limit` | number | No | Maximum number of groups to return \(1-500, default: 25\) |
414420
| `sortBy` | string | No | Sort by field: CREATED_AT or NAME |
415421
| `sortDirection` | string | No | Sort direction: ASC or DESC |
422+
| `userId` | string | No | Return only groups this user UUID belongs to |
416423
| `after` | string | No | Cursor to fetch the page of results after this value |
417424
| `before` | string | No | Cursor to fetch the page of results before this value |
418425

@@ -440,7 +447,7 @@ List all projects in your Hex workspace with optional filtering by status.
440447

441448
| Parameter | Type | Required | Description |
442449
| --------- | ---- | -------- | ----------- |
443-
| `limit` | number | No | Maximum number of projects to return \(1-100\) |
450+
| `limit` | number | No | Maximum number of projects to return \(1-100, default: 25\) |
444451
| `includeArchived` | boolean | No | Include archived projects in results |
445452
| `statusFilter` | string | No | Filter by status: PUBLISHED, DRAFT, or ALL |
446453
| `includeComponents` | boolean | No | Include components in results |
@@ -473,6 +480,10 @@ List all projects in your Hex workspace with optional filtering by status.
473480
| ↳ `lastPublishedAt` | string | Last published timestamp |
474481
| ↳ `createdAt` | string | Creation timestamp |
475482
| ↳ `archivedAt` | string | Archived timestamp |
483+
| ↳ `trashedAt` | string | Trashed timestamp |
484+
| ↳ `categories` | array | Project categories |
485+
| ↳ `name` | string | Category name |
486+
| ↳ `description` | string | Category description |
476487
| `total` | number | Total number of projects returned |
477488
| `after` | string | Cursor for the next page of results |
478489
| `before` | string | Cursor for the previous page of results |
@@ -489,7 +500,7 @@ List all users in the Hex workspace with optional filtering and sorting.
489500

490501
| Parameter | Type | Required | Description |
491502
| --------- | ---- | -------- | ----------- |
492-
| `limit` | number | No | Maximum number of users to return \(1-100, default: 25\) |
503+
| `limit` | number | No | Maximum number of users to return \(1-500, default: 25\) |
493504
| `sortBy` | string | No | Sort by field: NAME or EMAIL |
494505
| `sortDirection` | string | No | Sort direction: ASC or DESC |
495506
| `groupId` | string | No | Filter users by group UUID |

‎apps/docs/content/docs/integrations/stripe.mdx‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ List all Payment Intents
473473
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
474474
| `customer` | string | No | Filter by customer ID |
475475
| `created` | json | No | Filter by creation date \(e.g., \{"gt": 1633024800\}\) |
476+
| `starting_after` | string | No | Next-page cursor: last Payment Intent ID from the previous page. Do not combine with ending_before. |
477+
| `ending_before` | string | No | Previous-page cursor: first Payment Intent ID from the current page. Do not combine with starting_after. |
476478

477479
#### Output
478480

@@ -543,6 +545,7 @@ Search for Payment Intents using query syntax
543545
| --------- | ---- | -------- | ----------- |
544546
| `query` | string | Yes | Search query \(e.g., "status:'succeeded' AND currency:'usd'"\) |
545547
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
548+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
546549

547550
#### Output
548551

@@ -598,6 +601,7 @@ Search for Payment Intents using query syntax
598601
| `metadata` | json | Search metadata including count and has_more |
599602
| ↳ `count` | number | Number of items returned |
600603
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
604+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
601605

602606
</ReferenceDetails>
603607

@@ -830,6 +834,8 @@ List all customers
830834
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
831835
| `email` | string | No | Filter by email address |
832836
| `created` | json | No | Filter by creation date |
837+
| `starting_after` | string | No | Next-page cursor: last customer ID from the previous page. Do not combine with ending_before. |
838+
| `ending_before` | string | No | Previous-page cursor: first customer ID from the current page. Do not combine with starting_after. |
833839

834840
#### Output
835841

@@ -891,6 +897,7 @@ Search for customers using query syntax
891897
| --------- | ---- | -------- | ----------- |
892898
| `query` | string | Yes | Search query \(e.g., "email:'customer@example.com'"\) |
893899
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
900+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
894901

895902
#### Output
896903

@@ -937,6 +944,7 @@ Search for customers using query syntax
937944
| `metadata` | json | Search metadata |
938945
| ↳ `count` | number | Number of items returned |
939946
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
947+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
940948

941949
</ReferenceDetails>
942950

@@ -1116,7 +1124,7 @@ Update an existing subscription
11161124
| Parameter | Type | Required | Description |
11171125
| --------- | ---- | -------- | ----------- |
11181126
| `id` | string | Yes | Subscription ID \(e.g., sub_1234567890\) |
1119-
| `items` | json | No | Updated array of items with price IDs |
1127+
| `items` | json | No | Subscription items to change, e.g. \[\{"id": "si_123", "price": "price_456"\}\]. Include the existing item "id" to update or delete \(with "deleted": true\) that item; an entry without "id" adds a new item alongside the current ones. |
11201128
| `cancel_at_period_end` | boolean | No | Cancel subscription at period end |
11211129
| `metadata` | json | No | Updated metadata |
11221130

@@ -2538,6 +2546,8 @@ List all invoices
25382546
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
25392547
| `customer` | string | No | Filter by customer ID |
25402548
| `status` | string | No | Filter by invoice status |
2549+
| `starting_after` | string | No | Next-page cursor: last invoice ID from the previous page. Do not combine with ending_before. |
2550+
| `ending_before` | string | No | Previous-page cursor: first invoice ID from the current page. Do not combine with starting_after. |
25412551

25422552
#### Output
25432553

@@ -2562,6 +2572,7 @@ Search for invoices using query syntax
25622572
| --------- | ---- | -------- | ----------- |
25632573
| `query` | string | Yes | Search query \(e.g., "customer:'cus_1234567890'"\) |
25642574
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
2575+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
25652576

25662577
#### Output
25672578

@@ -2571,6 +2582,7 @@ Search for invoices using query syntax
25712582
| `metadata` | json | Search metadata |
25722583
| ↳ `count` | number | Number of items returned |
25732584
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
2585+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
25742586

25752587
</ReferenceDetails>
25762588

@@ -2700,6 +2712,8 @@ List all charges
27002712
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
27012713
| `customer` | string | No | Filter by customer ID |
27022714
| `created` | json | No | Filter by creation date \(e.g., \{"gt": 1633024800\}\) |
2715+
| `starting_after` | string | No | Next-page cursor: last charge ID from the previous page. Do not combine with ending_before. |
2716+
| `ending_before` | string | No | Previous-page cursor: first charge ID from the current page. Do not combine with starting_after. |
27032717

27042718
#### Output
27052719

@@ -2724,6 +2738,7 @@ Search for charges using query syntax
27242738
| --------- | ---- | -------- | ----------- |
27252739
| `query` | string | Yes | Search query \(e.g., "status:'succeeded' AND currency:'usd'"\) |
27262740
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
2741+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
27272742

27282743
#### Output
27292744

@@ -2733,6 +2748,7 @@ Search for charges using query syntax
27332748
| `metadata` | json | Search metadata including count and has_more |
27342749
| ↳ `count` | number | Number of items returned |
27352750
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
2751+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
27362752

27372753
</ReferenceDetails>
27382754

@@ -2850,6 +2866,8 @@ List all products
28502866
| --------- | ---- | -------- | ----------- |
28512867
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
28522868
| `active` | boolean | No | Filter by active status |
2869+
| `starting_after` | string | No | Next-page cursor: last product ID from the previous page. Do not combine with ending_before. |
2870+
| `ending_before` | string | No | Previous-page cursor: first product ID from the current page. Do not combine with starting_after. |
28532871

28542872
#### Output
28552873

@@ -2874,6 +2892,7 @@ Search for products using query syntax
28742892
| --------- | ---- | -------- | ----------- |
28752893
| `query` | string | Yes | Search query \(e.g., "name:'shirt'"\) |
28762894
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
2895+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
28772896

28782897
#### Output
28792898

@@ -2883,6 +2902,7 @@ Search for products using query syntax
28832902
| `metadata` | json | Search metadata |
28842903
| ↳ `count` | number | Number of items returned |
28852904
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
2905+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
28862906

28872907
</ReferenceDetails>
28882908

@@ -2981,6 +3001,8 @@ List all prices
29813001
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
29823002
| `product` | string | No | Filter by product ID |
29833003
| `active` | boolean | No | Filter by active status |
3004+
| `starting_after` | string | No | Next-page cursor: last price ID from the previous page. Do not combine with ending_before. |
3005+
| `ending_before` | string | No | Previous-page cursor: first price ID from the current page. Do not combine with starting_after. |
29843006

29853007
#### Output
29863008

@@ -3005,6 +3027,7 @@ Search for prices using query syntax
30053027
| --------- | ---- | -------- | ----------- |
30063028
| `query` | string | Yes | Search query \(e.g., "active:'true' AND currency:'usd'"\) |
30073029
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
3030+
| `page` | string | No | Pagination token from metadata.next_page of the previous search; omit for the first page |
30083031

30093032
#### Output
30103033

@@ -3014,6 +3037,7 @@ Search for prices using query syntax
30143037
| `metadata` | json | Search metadata |
30153038
| ↳ `count` | number | Number of items returned |
30163039
| ↳ `has_more` | boolean | Whether more items exist beyond this page |
3040+
| ↳ `next_page` | string | Token for the next page of search results, or null when there are no more results |
30173041

30183042
</ReferenceDetails>
30193043

@@ -3054,6 +3078,8 @@ List all Events
30543078
| `limit` | number | No | Number of results to return \(default 10, max 100\) |
30553079
| `type` | string | No | Filter by event type \(e.g., payment_intent.created\) |
30563080
| `created` | json | No | Filter by creation date \(e.g., \{"gt": 1633024800\}\) |
3081+
| `starting_after` | string | No | Next-page cursor: last event ID from the previous page. Do not combine with ending_before. |
3082+
| `ending_before` | string | No | Previous-page cursor: first event ID from the current page. Do not combine with starting_after. |
30573083

30583084
#### Output
30593085

@@ -3092,7 +3118,9 @@ Triggers when Stripe events occur (payments, subscriptions, invoices, etc.)
30923118
| `id` | string | Unique identifier for the event |
30933119
| `type` | string | Event type \(e.g., payment_intent.succeeded, customer.created, invoice.paid\) |
30943120
| `object` | string | Always "event" |
3121+
| `account` | string | Connected account that originated the event \(Connect events only; absent or null otherwise\) |
30953122
| `api_version` | string | Stripe API version used to render the event |
3123+
| `context` | string | Authentication context needed to fetch the event or related object \(null when not applicable\) |
30963124
| `created` | number | Unix timestamp when the event was created |
30973125
| `data` | json | Event data containing the affected Stripe object. Structure varies by event type - access via data.object for the resource \(PaymentIntent, Customer, Invoice, etc.\) |
30983126
| `livemode` | boolean | Whether this event occurred in live mode \(true\) or test mode \(false\) |

0 commit comments

Comments
 (0)