* fix: move table create update delete to query route
* chore: implement query to fetch a single table
* fix: retrieve table after update
* chore: assign type to update table payload
* chore: use updated table columns for edit
* chore: make executeSql castable with generic (#35685)
* Chore/refactor derivate more types from queries (#35687)
* chore: make executeSql castable with generic
* chore: derivate types from performed queries
- It allows to decouple more the frontend logic and the pg-meta/sql-query logic allowing to reduce the number of cast
and get closer types between what we do fetch and what we expect in our components
* fix: remove existing check
* chore: handle null comment and check
* fix: format check name as identifier
---------
Co-authored-by: avallete <andrew.valleteau@supabase.io>
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
* Fix the CronJob type because its name is optional.
* The Job previous runs page should be identified by job id, not job name because it can be undefined. Fix the tabs to show the job name by using additional query param.
* Add a tooltip explaining that cron jobs without names can't be edited.
* The parser for cron jobs should handle URLS with query params or hashes.
* Remove the .only description from the tests.
* Show Unknown for cron jobs which have "" as name.
* Fix a crash when a cron job has "1 second" (singular) as schedule.
* Calculate the next run properly when the schedule is "1 second".
* Show a simplified confirm modal when deleting a cron job without a name.
* Split index advisor hook into installed and enabled instead of just available
* TS error
* Some nits
* Revert
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
# Before
On project switcher pages (those with underscore URLs), the project list
is forever stuck in the loading state because it wants to filter by
selected organization, but there is no selected organization.
# After
Not stuck in loading state. Shows all projects sorted by organization.
* add advisor and stats to home
* public tables
* table count
* small fixes
* loading state
* Clean up + Add links to each advisor
* Last few fixes
* Tinnnnnnyy fix
* Nits to make the layout shift less
* Update LoadingState to minimize layout shift
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat: use the new tenant-source api to atomically create the tenant and source in pg_replicate
* feat: use the new sink-pipeline api to atomically create the sink and pipeline in pg_replicate
* fix: remove some unused imports
* feat: use the new sink-pipeline api to atomically update the sink and pipeline in pg_replicate
* feat: deleting the sink cascades to delete the pipeline
* chore: update api types
* fix: revert accidental update to types
* remove unused code
* add a comment explaining why deleting only sink is enough
* feat: add mfa enforcement toggle
Allows toggling MFA enforcement on an organization level.
Depends on API change #22088
* fix: toggle and disable action for non-owner
* chore: disable for free plans
* chore: disable toggle for org MFA if current user doesn't have MFA enabled
* set initial state
* move org mfa to security page
* use zod resolver
* fix initial values
* useQueryClient in the organization-mfa-mutation
* chore: warn about losing access to mfa orgs
* Some refactors, fixes and improvements
* chore: feature flag mfa enforce page
* Tiny fix
* Leave comment
---------
Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Add custom error handler for fetch error 'Failed to fetch'
* Refactor EdgeFunctionTesterSheet to use react query instead of manually calling fetch
* Use new fetchHandler for where we're calling fetch
* Revert
* init
* hovercard
* adds button to install index advisor
* hover card now now insert indexes
* update
* moved hook
* align alert dialog to design syste,
* Update index-advisor.utils.ts
* shows all index statements now
* Update query-performance.tsx
* Some refactors
* Clean up
* Fix
* One last nit refactor
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Use PostgresVersionSelector in ProjectPausedState
* Remove
* Update PostgresVersionSelector to handle unpause versions too
* Clean up
* Use new flag showPostgresVersionSelector instead of disableProjectVersionSelection
* Shift every logic in storage mobx store to storage valtio store
* Deprecate localStores folder
* REMOVE MOBX ENTIRELYYYYYYY 😄
* Update
* Clean up
* Small improvement for rename folder
* add loading and error states
* fix cmd k menu links
* Add hook for getting user's ip address
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>