Skip to content

Refactor API calls in hooks to use generated functions and improve type safety#6

Merged
moutonjeremy merged 2 commits intomainfrom
manage-type-with-orval
Mar 14, 2026
Merged

Refactor API calls in hooks to use generated functions and improve type safety#6
moutonjeremy merged 2 commits intomainfrom
manage-type-with-orval

Conversation

@moutonjeremy
Copy link
Member

  • Updated use-search hooks to replace direct API calls with generated functions for document and database searches.
  • Refactored use-space-order to utilize generated user update function for space order updates.
  • Modified use-space-permissions to use generated functions for listing and managing space permissions.
  • Changed use-spaces to use generated functions for fetching, creating, updating, and deleting spaces.
  • Updated use-users to replace API calls with generated user listing function.
  • Refactored use-versions to utilize generated functions for version management.
  • Changed use-webhooks to use generated functions for managing webhooks and their deliveries.
  • Updated LanguageContext to disable eslint rule for component exports.
  • Refactored DatabaseDocumentPage and DocumentPage to improve type safety and remove unnecessary type assertions.
  • Updated DrawingPage to use the generated model for space type.
  • Improved error handling in LoginPage and RegisterPage to use more specific error types.

…pe safety

- Updated `use-search` hooks to replace direct API calls with generated functions for document and database searches.
- Refactored `use-space-order` to utilize generated user update function for space order updates.
- Modified `use-space-permissions` to use generated functions for listing and managing space permissions.
- Changed `use-spaces` to use generated functions for fetching, creating, updating, and deleting spaces.
- Updated `use-users` to replace API calls with generated user listing function.
- Refactored `use-versions` to utilize generated functions for version management.
- Changed `use-webhooks` to use generated functions for managing webhooks and their deliveries.
- Updated `LanguageContext` to disable eslint rule for component exports.
- Refactored `DatabaseDocumentPage` and `DocumentPage` to improve type safety and remove unnecessary type assertions.
- Updated `DrawingPage` to use the generated model for space type.
- Improved error handling in `LoginPage` and `RegisterPage` to use more specific error types.
@moutonjeremy moutonjeremy merged commit bd899f5 into main Mar 14, 2026
1 check passed
@moutonjeremy moutonjeremy deleted the manage-type-with-orval branch March 14, 2026 23:05
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.

1 participant