ynab / ynab-sdk-js

YNAB API Client for JavaScript
https://api.ynab.com
Apache License 2.0
217 stars 20 forks source link

`null` values in `TransactionDetails` incorrectly showing as invalid #162

Closed dotNomad closed 11 months ago

dotNomad commented 11 months ago

Noticed a typing inconsistency while working on testing a YNAB script:

When retrieving transactions from the endpoint GET /budgets/{budget_id}/transactions the transactions received can have:

flag_color: null,
debt_transaction_type: null,

These show as invalid with the TypeScript types given.

TransactionDetailFlagColorEnum has Null: "null" which is not equivalent to null. The same goes for TransactionDetailDebtTransactionTypeEnum.

bradymholt commented 11 months ago

Thanks! This is fixed in https://github.com/ynab/ynab-sdk-js/pull/163.

dotNomad commented 11 months ago

Awesome! Thank you for the fix. 🎉