Repository navigation
Commit 67772f5
committed
fix(client): type getRuntimeStatus rows as the FlowRuntimeState contract
`client.automation.getRuntimeStatus()` declared its rows as a hand-typed
`{ name, enabled, bound }`, narrower than what `GET /automation/_status`
serves: the engine's `getFlowRuntimeStates()` rows, unchanged, typed by the
declared contract `FlowRuntimeState` in `@objectstack/spec/contracts`. The
optional `status`, `triggerType`, `object`, `reason` and `unboundCause` were
therefore invisible to SDK callers.
The return type is now `{ flows: FlowRuntimeState[]; total: number }`, with
`FlowRuntimeState` added to the existing type-only contracts import. A
type-level pin in return-type-precision.test.ts holds the answer equal to the
contract and reads the five optional fields through the client's row type.
Patch changeset for @objectstack/client. Card 23859.
Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0744f94 commit 67772f5
3 files changed
Lines changed: 60 additions & 1 deletion
File tree
- .changeset
- packages/client/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
5664 | 5665 | | |
5665 | 5666 | | |
5666 | 5667 | | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| 5672 | + | |
5667 | 5673 | | |
5668 | | - | |
| 5674 | + | |
5669 | 5675 | | |
5670 | 5676 | | |
5671 | 5677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
1418 | 1420 | | |
1419 | 1421 | | |
1420 | 1422 | | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1421 | 1462 | | |
1422 | 1463 | | |
1423 | 1464 | | |
| |||
1439 | 1480 | | |
1440 | 1481 | | |
1441 | 1482 | | |
| 1483 | + | |
1442 | 1484 | | |
1443 | 1485 | | |
1444 | 1486 | | |
| |||
0 commit comments