## Problem
platform, v1 and v2 have been already completely migrated and introduced
some changes.
Some types have been renamed, some outputs and inputs updated.
## Solution
- Update the API types
- Fix the TS errors
## Update
Taking this over to unblock #50134, which needs the new scoped token
permission ids from the regenerated types.
- Merged `master`.
- Regenerated `api-v2.d.ts` from the production spec. The previous files
came from a local API that exposed a webhook events endpoint production
doesn't have yet. Production has since added standardized 400 error
responses on the v2 organization endpoints. `api-v1.d.ts` and
`platform.d.ts` already matched production.
- Fixed `verify-production-types`. It formatted the regenerated files in
a temp directory outside the repository, so Prettier fell back to its
defaults and the comparison could never match the committed files. It
now passes the repository config explicitly. `pnpm api:verify-types`
passes on this branch.
- Verified locally: `pnpm typecheck`, `pnpm api:verify-types`, Studio
unit tests.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Preserved descriptions when saving, sharing, moving, or unsharing
notebooks, reports, SQL snippets, and saved queries.
* Improved handling of empty or null values across notebook
descriptions, billing usage, pooler settings, and infrastructure fields.
* Improved read-replica connection handling, including read-only
connection strings.
* Updated storage configuration and capability handling to match current
settings.
* **API and Compatibility**
* Updated organization, project, storage, OAuth, billing, and
infrastructure data handling to match current API responses.
* OAuth app creation and updates now require scopes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Display tax information in the upcoming invoice breakdown.
- Show a "Tax" line item with amount and rate tooltip when tax is
successfully calculated
- Show a warning row when tax estimation fails, prompting users to
verify their billing address
- Update Current Costs and Projected Costs tooltips to indicate whether
tax is included or could not be estimated
## Test plan
- [ ] Verify tax row appears with correct amount
when `tax_status` is `calculated`
- [ ] Verify tax rate percentage shows in the tooltip (e.g., "Estimated
tax at 10%...")
- [ ] Verify warning row appears when `tax_status` is `failed`
- [ ] Verify no tax row appears when `tax_status` is `not_applicable`
- [ ] Verify "Applicable tax included." appears in Current/Projected
Costs tooltips when tax is calculated
- [ ] Verify "Tax could not be estimated and is not included." appears
in tooltips when tax fails
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Upcoming invoices now include tax details and a tax status.
* Billing breakdown shows projected tax and conditionally displays
projected totals excluding tax when applicable.
* If tax estimation fails, a “Tax — Could not be estimated” row appears
and totals reflect the failure.
* Added "Stripe Projects" as a billing partner option and clarified that
projected amounts may be explicitly null.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
### Summary
This PR adds the ability to download payment receipts for paid Orb
invoices from the billing invoices page.
This depends on the backend PR that adds the receipt download endpoint.
### UI screenshot
The receipt button only appears for invoices with `status === 'paid'`.
<img width="738" height="276" alt="Screenshot 2026-01-22 at 8 53 06 PM"
src="https://github.com/user-attachments/assets/e4fa3f5f-0222-4787-9c7d-96ae99346808"
/>
### Testing
#### Manual testing
1. Navigate to Organization Settings → Billing → Invoices
2. Find a paid invoice in the list
3. Click the receipt icon button
4. Verify receipt PDF opens in new tab
5. Try with an unpaid invoice - button should not appear
6. Try invoice that has no receipt (paid with credit balance) → error
toast with "Receipt not available"
### Alternative design choices
#### Alternative option 1
<img width="712" height="266" alt="Screenshot 2026-01-22 at 8 46 24 PM"
src="https://github.com/user-attachments/assets/2eb7333c-cb19-4e6d-b495-72c43fb26475"
/>
#### Alternative option 2
<img width="723" height="264" alt="Screenshot 2026-01-22 at 8 56 30 PM"
src="https://github.com/user-attachments/assets/34b917b6-fc8c-4398-b372-ff467920fe69"
/>
#### Alternative option 3
<img width="702" height="265" alt="Screenshot 2026-01-22 at 8 47 58 PM"
src="https://github.com/user-attachments/assets/b3e15b1c-a804-4df9-981e-1ec578d7e4fe"
/>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **New Features**
* Added invoice receipt viewing and download functionality. Paid
invoices with outstanding amounts now include a Receipt action, enabling
users to access detailed payment documentation through the billing
interface. Error handling ensures a seamless experience when retrieving
receipts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* 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.
* Migrate all uses of invalidateQueries to use object syntax.
* Migrate the remainder of useInfiniteQuery.
* Migrate all setQueriesData.
* Migrate all fetchQuery uses.
* Migrate some leftover functions from RQ.
* Fix issues found by Charis.
- Read Replica and Branching Compute is now explicitly listed (previously Read Replica compute was not distinguishable)
- All usage items have a link to their respective docs
- Branching Compute is aggregated into a single line item to avoid listing dozens of branches (they are listed in the tooltip still)
- Displays basic discounts with a strike-through price
- For Replica+Compute, it specifically lists the projects as sub line items, whereas other line items are not broken down, it's shown on the tooltip
- Compute credits are a sub line item under compute, rather than having it separate
- Pricing is displayed on the tooltip
- Breakdown focuses on costs, rather than mixing cost, usage and line item pricing descriptions
- Avoid confusing users in the breakdown with hourly usage (for add-ons)
- Fixed number formatting to properly work with negative number and 0 (use 2 decimals)
- Upcoming Invoice Section is hidden for Free Plan users
* 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>
* 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.