* Display customized billling-related text based on whether billing is done by Supabase or partner
* Add warning to PITR page about cancellation of scheduled subscription change
* Remove outdated code for project-based billing
* Add react-query mutations for columns APIs.
* Use the new delete column mutation.
* Remove the column store and replace all its methods with mutations from react-query.
* Fix type errors.
* Move some the meta store methods to be pure functions in sidepanel.utils.
* Move the createColumn and updateColumn out of the metaStore.
* Some refactors and fixes
* Shift query invalidation when deleting column to mutation file instead of component file
* reorder some code for my sanity
* remove some @ts-ignores
* remove more @ts-ignores
* Update apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts
* Fix ForeignKeyFormatter crashing client
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* add privileges page
* fix
* fix: could have both global and column-specific privileges + is global per privilege
* Trigger Build
* load permissions data for current table only
* fix style for light theme
* add a guide to Privileges
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update doc
* Update docs
* progress moving privileges to pg-meta
* split up column privileges and table privileges
* adds loading state to toggles
* Add feature flag, move from auth section to database section
* Cleanup
* Update meta store table lists, add header warnings, update docs
* Add alert if any columns have privilages
* Spelling
* fix api.d.ts
* fix link
* move to auth pages
* only show editable schemas
* limit roles
* auto select first table
* remove roles meta store
* inline toggling
* apply privileges all at once
* add preview and use new switch component
* fix spelling
* handle long column names
* warn users about losing changes when changing schemas/tables
* remove strange docs link
* fix feature preview after reload
* use shadcn select
* Update select.tsx
* Minor UX fixes
* Update toast
* Update feature preview image for cls
* update cls warnings
* update warnings
* fix toast message
* Add migration alert to preview page
* Add link to CLS from feature preview, and add empty state on CLS page if feature preview is not enabled
* Shift local storage keys hard code to lib/constants
---------
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Only fetch the tables from the required schema in the MetaStore.
* Don't include the columns in the getTables API call unless a flag is passed.
* Use the new flag in the ForeignKeySelector.
* Columns should be included for the schema visualizer.
* Address comments.
* Midway implementation notifications v2
* Some updates to Tab component
* Midway implementation notifications v2 again
* implement infinite scrolling and loading for notification sv2
* Add button actions
* Implement archive notifications
* Add filter dropdown for notifications
* Update date format
* Small style fix
* Update
* Update API codegen
* Add empt state
* Add empty state for archived notifications
* Fix type
* Final changes to notifications v2
* Small style fix
* Small fix
* Only mark notifications that come into view as read
* Update package lock
* Move listEncryptedColumns method to a function.
* Remove encryptColumn method since it's unused.
* Add CRUD RQ queries/mutations for vault secrets.
* Use the new queries/mutations.
* Add RQ for secret/decrypted values of secrets.
* Add RQ queries/mutations for pg-sodium keys.
* Use the new hook for decrypted value.
* Use the new hooks for pg sodium keys.
* Remove unneeded code from the vault store.
* Delete VaultStore and all usages of it.
* Small style fix
* Fix invalidation for create, update, delete secrets
* Small UI fixes to EditSecretModal
* Fix invalidation for pg-sodium-keys rq
* Add default error handler for pg sodium keys rq
* Undo
* Add default error handler for vault secrets RQ
* Remove observer on vault pages
* Fix database wrappers with vault
* Add loading state for vault keys
* fix pg sodium keys invalidation
* Opt for immutable const declaration in SecretsManagement
* remove keyId and keyName context from ColumnEditor, no longer supports TLE
* Address PR comments
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Set a min width for the left panel so that it doesn't get squished when the documentation panel is expanded.
* When the doc panel is closed via dragging, disable the plugin icon.
* Adjust shared snippet language in modal
* Add read-only badge if current user doesnt own snippet
* Check for snippet
* Reverse logic
* Update
* Move read only to indicator
* Cleanup
* Check owner permissions
---------
Co-authored-by: Ant Wilson <awalias@users.noreply.github.com>
Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
* Move useEncryptedColumns hook and use it in the TableGridEditor.
* Convert the viewsQuery to use data/fetchers. It also handles invalidation of schemas.
* Invalidate the view when deleting a column or a table.
* Use the new query function in VaultStore.
* Remove the viewStore.
* Fix two more edge cases. Add comments for it.
* chore: improve auth screens loading
* Update apps/studio/components/interfaces/Auth/Users/UsersList.tsx
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* handle error
* better pagination for users list
* disgusting boolean logic
* return user to previous page after deleting last user
* only show reloading indicator when it's refetching
* fix date formatting
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Fix new role form
* Rewrite form
* Commit a sin against ts
* Make the afterLabel a ReactNode.
* Fix minor type issues.
* Fix type
* Types
* Use lodash sortBy instead of the mutating array.sort.
* Fix the order of the roles with active connections.
* Sort the roles by lowercased names.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Sort by name
* Not name
* Fix
* Migrate the table query to use the new fetchers.
* Cleanup
* Cleanup
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Only show RR UI if project is enabled
* Only show RR UI if project has read replicas enabled, shift DatabaseSelector state to valtio, add Database Selector to API URl
* Update usage of Project interface from types to Project from project-details-query
* Fix ts errors
* Another one
* Another one...
* God one more
* Fingers crossed
* jesus
* Add deprecate mark on ProjectBase
* Resolve conflicts
* Rename ProjectState from valtio to DatabaseSelectorState
* Rename file
* fix imports
* tiny code changes
* Fixes
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* feat: track rls ai editor usage
when user accepts consent, we track when rls editor:
ai suggestion accepted
ai suggestion discarded
copy code from code block in ai assistant
apply changes from code block in ai assistant
when question is asked in ai assistant
when sql has and error and ai debugger was requested
* fix: add asking part and change to past tense
* chore: add fix with assistant tracking
* fix: deploy error and merge master
* fix: action label fixed at queryerror
* Alpha sort db functions, triggers and indexes tables
* Use lowercased names when sorting.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Init RQ for database roles
* Shift all use of roles from pg meta mobx store to RQ
* Deprecate and remove roles pg meta mobx store
* Fix import
* Fix
* Address comments
* remove function child
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* refactor: ai sql logic to common package
* feat: ai sql tests
* feat: test rls policy ai chat assistant
* refactor: jest env loading
* feat(ai): improve sql title and description quality
* fix: ai message role type
* Move the new files to a separate package.
* Remove a forgotten console.log.
* Migrate the tests to use snapshots and commit the snapshots.
* Separate the functions which require edge runtime to be exported via /edge subpath.
* Bust the turbo cache when one of the deps has been rebuilt.
* chore: fix package main/type references
* fix: package lock out of sync
* fix: ai sql debugging to fix typos
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Add database policies RQ and shift all usage of policies from pg meta mobx to RQ
* Deprecate and remove policies store from pg meta mobx store
* Fix policies not showing by table and schema
* Update create policy mutation body
* Fix the position of the error in the profile information form.
* Update the query and the mutation for the connection pooling to use data/fetchers methods.
* Refactor the connection pooling form to use react-hook-form.
* Handle null values also.
* Make the headers same case everywhere.
* Set the data after updating.