Skip to content

release: v2.1.6#49

Merged
MrRefactoring merged 2 commits into
masterfrom
fix/getboardcards-schema-drift
Jul 5, 2026
Merged

release: v2.1.6#49
MrRefactoring merged 2 commits into
masterfrom
fix/getboardcards-schema-drift

Conversation

@MrRefactoring

@MrRefactoring MrRefactoring commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Releases v2.1.6 — a schema-drift bugfix for boards.getBoardCards() / lists.getListCards(), which threw a ZodError on real boards even though the request succeeded. Fixes #48.

Fixed

Card.dueReminder

Schema declared z.string(), but the API returns a number (minutes before the due date). Aligned with the already-correct CheckItem.dueReminder:

- dueReminder: z.string().nullish(),
+ dueReminder: z.number().nullish(),

labels[].color (ColorSchema)

The enum only accepted the 10 documented base colors. The API also returns the undocumented _light / _dark shade variants introduced in the May 2023 label redesign — 30 values total. Extended the enum to the full palette (still .nullable()).

Tests

  • Regression coverage in tests/unit/models/card.test.ts pinning both schemas (number/null/string for dueReminder; accepts sky_dark / green_light, rejects an unknown color).
  • Fixed the maximal-payload fixture in breadth.test.ts that encoded the old dueReminder string shape.
  • tsc --noEmit clean · full unit suite green (171 passed).

Release

  • package.json2.1.6
  • CHANGELOG.md → v2.1.6 section

No skipParsing needed after this — the response validates cleanly. Thanks to @sampgoes97-ux for the detailed report.

boards.getBoardCards / lists.getListCards threw a ZodError on real boards
because two response schemas had drifted from the Trello API:

- Card.dueReminder was typed as a string, but the API returns a number
  (minutes before the due date) — aligned with CheckItem.dueReminder.
- ColorSchema only accepted the 10 documented base colors, but the API
  also returns the `_light` / `_dark` shade variants introduced in the
  May 2023 label redesign (30 values total).

Adds regression coverage pinning both schemas and fixes the maximal-payload
breadth fixture that encoded the old dueReminder string shape.

Closes #48
@MrRefactoring MrRefactoring changed the title fix(models): sync Card.dueReminder and label Color with live API (#48) release: v2.1.6 Jul 5, 2026
@MrRefactoring
MrRefactoring merged commit 5bd9e20 into master Jul 5, 2026
11 checks passed
@MrRefactoring
MrRefactoring deleted the fix/getboardcards-schema-drift branch July 5, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zod schema is out of sync with Trello API response when calling boards.getBoardCards

1 participant