[PR #6109] [MERGED] API: add missing TypeScript types #59984

Closed
opened 2026-05-07 01:47:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6109
Author: @MatissJanis
Created: 11/10/2025
Status: Merged
Merged: 11/22/2025
Merged by: @MatissJanis

Base: masterHead: matiss/add-missing-api-types


📝 Commits (8)

  • bf41150 API: add missing TypeScript types
  • 2b49c90 Merge branch 'master' into matiss/add-missing-api-types
  • 1926e63 Merge branch 'master' into matiss/add-missing-api-types
  • 92e0e4a Apply suggestions from code review
  • 862a071 Refactor API method signatures for improved type safety
  • e071aa8 Add APIFileEntity type to methods.ts for enhanced type safety
  • f5b6177 Merge branch 'master' into matiss/add-missing-api-types
  • ed62402 Update loadBudget function signature to use string type for budgetId parameter

📊 Changes

15 files changed (+252 additions, -118 deletions)

View changed files

📝 packages/api/methods.test.ts (+5 -4)
📝 packages/api/methods.ts (+119 -46)
📝 packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx (+4 -1)
📝 packages/desktop-client/src/components/schedules/SchedulesTable.tsx (+5 -3)
📝 packages/desktop-client/src/components/transactions/TransactionsTable.tsx (+5 -1)
📝 packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplateIndicator.ts (+3 -1)
📝 packages/loot-core/src/server/api-models.ts (+18 -16)
📝 packages/loot-core/src/server/api.ts (+2 -2)
📝 packages/loot-core/src/server/budget/app.ts (+1 -1)
📝 packages/loot-core/src/server/importers/ynab4.ts (+0 -1)
📝 packages/loot-core/src/types/api-handlers.ts (+78 -40)
📝 packages/loot-core/src/types/models/schedule.ts (+1 -1)
📝 packages/loot-core/src/types/server-handlers.ts (+3 -1)
📝 packages/loot-core/typings/window.ts (+2 -0)
upcoming-release-notes/6109.md (+6 -0)

📄 Description

Summary

This PR adds missing TypeScript types to the API handlers and related code to improve type safety and developer experience.

Changes

  • Added proper TypeScript types to API handler definitions in api-handlers.ts
  • Updated API methods to use typed parameters and return values
  • Fixed type issues in API models and related components
  • Updated UI components to work with properly typed API responses
  • Added release notes for this maintenance improvement

Files Changed

  • packages/loot-core/src/types/api-handlers.ts - Added missing types for API handler parameters and return values
  • packages/api/methods.ts - Updated to use properly typed API handlers
  • packages/loot-core/src/server/api-models.ts - Type improvements
  • Various UI components updated to work with typed API responses

Testing

  • Type checking passes
  • Existing tests should continue to work as this is primarily a type-only change

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6109 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 11/10/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/add-missing-api-types` --- ### 📝 Commits (8) - [`bf41150`](https://github.com/actualbudget/actual/commit/bf41150e8bea807bff1856e20979597c678ea030) API: add missing TypeScript types - [`2b49c90`](https://github.com/actualbudget/actual/commit/2b49c9053580cbf759124006887231304c6784ae) Merge branch 'master' into matiss/add-missing-api-types - [`1926e63`](https://github.com/actualbudget/actual/commit/1926e63f692af74b9e2e8e02715dbce221c90c92) Merge branch 'master' into matiss/add-missing-api-types - [`92e0e4a`](https://github.com/actualbudget/actual/commit/92e0e4add4d5c8e83e39b0df208018c30ee7742a) Apply suggestions from code review - [`862a071`](https://github.com/actualbudget/actual/commit/862a071265553985d6ed02749e493cea71294d17) Refactor API method signatures for improved type safety - [`e071aa8`](https://github.com/actualbudget/actual/commit/e071aa8a813c7e75e7c76c1689231c3dfe3f26b8) Add APIFileEntity type to methods.ts for enhanced type safety - [`f5b6177`](https://github.com/actualbudget/actual/commit/f5b6177f505cb14af4cb9f656f8903afad454a8b) Merge branch 'master' into matiss/add-missing-api-types - [`ed62402`](https://github.com/actualbudget/actual/commit/ed624029c665618e226491a8c5c1008f5e2212ad) Update loadBudget function signature to use string type for budgetId parameter ### 📊 Changes **15 files changed** (+252 additions, -118 deletions) <details> <summary>View changed files</summary> 📝 `packages/api/methods.test.ts` (+5 -4) 📝 `packages/api/methods.ts` (+119 -46) 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx` (+4 -1) 📝 `packages/desktop-client/src/components/schedules/SchedulesTable.tsx` (+5 -3) 📝 `packages/desktop-client/src/components/transactions/TransactionsTable.tsx` (+5 -1) 📝 `packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplateIndicator.ts` (+3 -1) 📝 `packages/loot-core/src/server/api-models.ts` (+18 -16) 📝 `packages/loot-core/src/server/api.ts` (+2 -2) 📝 `packages/loot-core/src/server/budget/app.ts` (+1 -1) 📝 `packages/loot-core/src/server/importers/ynab4.ts` (+0 -1) 📝 `packages/loot-core/src/types/api-handlers.ts` (+78 -40) 📝 `packages/loot-core/src/types/models/schedule.ts` (+1 -1) 📝 `packages/loot-core/src/types/server-handlers.ts` (+3 -1) 📝 `packages/loot-core/typings/window.ts` (+2 -0) ➕ `upcoming-release-notes/6109.md` (+6 -0) </details> ### 📄 Description ## Summary This PR adds missing TypeScript types to the API handlers and related code to improve type safety and developer experience. ## Changes - Added proper TypeScript types to API handler definitions in `api-handlers.ts` - Updated API methods to use typed parameters and return values - Fixed type issues in API models and related components - Updated UI components to work with properly typed API responses - Added release notes for this maintenance improvement ## Files Changed - `packages/loot-core/src/types/api-handlers.ts` - Added missing types for API handler parameters and return values - `packages/api/methods.ts` - Updated to use properly typed API handlers - `packages/loot-core/src/server/api-models.ts` - Type improvements - Various UI components updated to work with typed API responses ## Testing - Type checking passes - Existing tests should continue to work as this is primarily a type-only change --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-07 01:47:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#59984