* Add custom types for queries, mutations and infinite queries.
* Migrate all queries to use the new type.
* Migrate all infinite queries to useCustomInfiniteQueryOptions.
* Migrate all mutations to use useCustomMutationOptions.
* Add type to all imports in `types` folder.
When opening the usage page with a projectRef param (filter by project), it lead to some odd behaviour where the project is not preselected and then after picking a project, it would end up showing the initially filtered project from the URL.
PR removes the odd all-projects logic and uses nuqs for URL state mgmt
- Increase cache time of usage to 60m
- Ensure org is fully loaded before rendering invoice breakdown (this currently leads to starting to load this endpoint and then cancelling it when directly landing on the org billing page)
* Update several files to use data fetcher methods
* Remove unused files from lib/common/fetch
* Revert "Remove unused files from lib/common/fetch"
This reverts commit b314b05f06.
* Fix GraphQL
* Fix types
* Add IS_PLATFORM check in useOrgUsageQuery
* Fix type issues
* First round of wrapping RQ errors with handleError
* Remove the throw before the handleError usage.
* Make the handling of an API error more versatile. Add logging in Sentry if the error is of unknown type.
* Remove throwing of the handleError function.
* Add return type to the handleError function to be never so that we're sure it always throws.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
- Added a quick indicator about over-usage on non-usage-based plans (free or pro with spend cap) at the top of the subscription page
- Removed the usage summary from upcoming invoice (replacement on the usage page)
- Added a new usage summary on the organization usage page
- Per-project breakdown for usage
- Displays costs for over-usage on usage-based plans
- Improved scrolling behaviour for anchors on usage page
- Metrics with higher usage/costs will be sorted to the top
- Insights into compute usage in summary
- Removed duplicate typing and rely on API types for usage DTO
- Usage can now be retrieved for a custom period and not just the current billing cycle
- Usage can be filtered by project
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.