The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
run prettier
Inian6cafead1cb05
diff --git a/apps/reference/_api/usage.mdx b/apps/reference/_api/usage.mdxindex dffc811a487..fab3d240558 100644--- a/apps/reference/_api/usage.mdx+++ b/apps/reference/_api/usage.mdx@@ -5,45 +5,28 @@ title: Usage<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->----### Lists all organizations```/v1/organizations```--### Creates an organization```/v1/organizations```----### Gets all projects that belong to the authenticated user```/v1/projects```--### Creates a project```/v1/projects```--diff --git a/apps/reference/_cli/config.mdx b/apps/reference/_cli/config.mdxindex 0e62403dec6..90a336ea3bd 100644--- a/apps/reference/_cli/config.mdx+++ b/apps/reference/_cli/config.mdx@@ -10,41 +10,33 @@ A `config.toml` file is generated after running `supabase init`.This file is located in the `supabase` folder under `supabase/config.toml`.---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## General--### `project_id`A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running `supabase init`.-<ul>-<li>Required: <code>true</code></li>-<li>Default: <code>None</code></li>+ <li>+ Required: <code>true</code>+ </li>+ <li>+ Default: <code>None</code>+ </li></ul><br />---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## API--### `api.port`Port to use for the API URL.-<ul><li>Required: <code>true</code></li><li>Default: <code>54321</code></li>@@ -57,12 +49,10 @@ Port to use for the API URL.<br />-### `api.extra_search_path`Extra schemas to add to the `search_path` of every request.-<ul><li>Required: <code>true</code></li><li>Default: <code>["extensions"]</code></li>@@ -75,12 +65,10 @@ Extra schemas to add to the `search_path` of every request.<br />-### `api.max_rows`The maximum number of rows returned from a view, table, or stored procedure. Limits payload size for accidental or malicious requests.-<ul><li>Required: <code>true</code></li><li>Default: <code>1000</code></li>@@ -93,20 +81,14 @@ The maximum number of rows returned from a view, table, or stored procedure. Lim<br />---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## Database--### `db.port`Port to use for the local database URL.-<ul><li>Required: <code>true</code></li><li>Default: <code>54322</code></li>@@ -119,12 +101,10 @@ Port to use for the local database URL.<br />-### `db.major_version`The database major version to use. This has to be the same as your remote database's. Run `SHOW server_version;` on the remote database to check.-<ul><li>Required: <code>true</code></li><li>Default: <code>14</code></li>@@ -137,43 +117,35 @@ The database major version to use. This has to be the same as your remote databa<br />---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## Dashboard--### `studio.port`Port to use for Supabase Studio.-<ul>-<li>Required: <code>true</code></li>-<li>Default: <code>54323</code></li>+ <li>+ Required: <code>true</code>+ </li>+ <li>+ Default: <code>54323</code>+ </li></ul><br />---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## Local Development--### `inbucket.port`Port to use for the email testing server web interface.Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.-<ul><li>Required: <code>true</code></li><li>Default: <code>54324</code></li>@@ -186,20 +158,14 @@ Emails sent with the local dev setup are not actually sent - rather, they are mo<br />---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->## Auth--### `auth.site_url`The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails.-<ul><li>Required: <code>true</code></li><li>Default: <code>"http://localhost:3000"</code></li>@@ -212,12 +178,10 @@ The base URL of your website. Used as an allow-list for redirects and for constr<br />-### `auth.additional_redirect_urls`A list of _exact_ URLs that auth providers are permitted to redirect to post authentication.-<ul><li>Required: <code>true</code></li><li>Default: <code>["https://localhost:3000"]</code></li>@@ -230,12 +194,10 @@ A list of _exact_ URLs that auth providers are permitted to redirect to post aut<br />-### `auth.jwt_expiry`How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week).-<ul><li>Required: <code>true</code></li><li>Default: <code>3600</code></li>@@ -248,12 +210,10 @@ How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 60<br />-### `auth.enable_signup`Allow/disallow new user signups to your project.-<ul><li>Required: <code>true</code></li><li>Default: <code>true</code></li>@@ -266,12 +226,10 @@ Allow/disallow new user signups to your project.<br />-### `auth.email.enable_signup`Allow/disallow new user signups via email to your project.-<ul><li>Required: <code>true</code></li><li>Default: <code>true</code></li>@@ -284,12 +242,10 @@ Allow/disallow new user signups via email to your project.<br />-### `auth.email.double_confirm_changes`If enabled, a user will be required to confirm any email change on both the old, and new email addresses. If disabled, only the new email is required to confirm.-<ul><li>Required: <code>true</code></li><li>Default: <code>true</code></li>@@ -302,12 +258,10 @@ If enabled, a user will be required to confirm any email change on both the old,<br />-### `auth.email.enable_confirmations`If enabled, users need to confirm their email address before signing in.-<ul><li>Required: <code>true</code></li><li>Default: <code>true</code></li>@@ -320,7 +274,6 @@ If enabled, users need to confirm their email address before signing in.<br />-### `auth.external.<provider>.enabled`Use an external OAuth provider. The full list of providers are:@@ -338,7 +291,6 @@ Use an external OAuth provider. The full list of providers are:- `slack`- `spotify`-<ul><li>Required: <code>true</code></li><li>Default: <code>true</code></li>@@ -351,12 +303,10 @@ Use an external OAuth provider. The full list of providers are:<br />-### `auth.external.<provider>.client_id`Client ID for the external OAuth provider.-<ul><li>Required: <code>true</code></li><li>Default: <code>""</code></li>@@ -369,12 +319,10 @@ Client ID for the external OAuth provider.<br />-### `auth.external.<provider>.secret`Client secret for the external OAuth provider.-<ul><li>Required: <code>true</code></li><li>Default: <code>""</code></li>@@ -386,5 +334,3 @@ Client secret for the external OAuth provider.</ul><br />--diff --git a/apps/reference/_cli/usage.mdx b/apps/reference/_cli/usage.mdxindex 906f5833b29..7ddea956077 100644--- a/apps/reference/_cli/usage.mdx+++ b/apps/reference/_cli/usage.mdx@@ -8,31 +8,21 @@ toc_max_heading_level: 3Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Stop all local Supabase containers {#supabase-stop}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase stop [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -41,30 +31,21 @@ supabase stop [flags]-h, --help help for stop```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Show status of local Supabase containers {#supabase-status}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase status [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -73,30 +54,21 @@ supabase status [flags]-h, --help help for status```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Start containers for Supabase local development {#supabase-start}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase start [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -105,35 +77,30 @@ supabase start [flags]-h, --help help for start```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage Supabase secrets {#supabase-secrets}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-secrets-list">+ <code>supabase secrets list</code>+ </a>-- <a href="#supabase-secrets-list"><code>supabase secrets list</code></a>--- <a href="#supabase-secrets-set"><code>supabase secrets set</code></a>--- <a href="#supabase-secrets-unset"><code>supabase secrets unset</code></a>--+- <a href="#supabase-secrets-set">+ <code>supabase secrets set</code>+ </a>+- <a href="#supabase-secrets-unset">+ <code>supabase secrets unset</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -143,11 +110,10 @@ supabase start [flags]-h, --help help for secrets```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Unset a secret(s) on Supabase {#supabase-secrets-unset}@@ -155,18 +121,12 @@ supabase start [flags]Unset a secret(s) from the linked Supabase project.--```shsupabase secrets unset <NAME> ... [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -175,11 +135,10 @@ supabase secrets unset <NAME> ... [flags]-h, --help help for unset```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Set a secret(s) on Supabase {#supabase-secrets-set}@@ -187,18 +146,12 @@ supabase secrets unset <NAME> ... [flags]Set a secret(s) to the linked Supabase project.--```shsupabase secrets set [flags] <NAME=VALUE> ...```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -208,11 +161,10 @@ supabase secrets set [flags] <NAME=VALUE> ...-h, --help help for set```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### List all secrets on Supabase {#supabase-secrets-list}@@ -220,18 +172,12 @@ supabase secrets set [flags] <NAME=VALUE> ...List all secrets in the linked project.--```shsupabase secrets list [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -240,33 +186,26 @@ supabase secrets list [flags]-h, --help help for list```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage Supabase projects {#supabase-projects}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-projects-create">+ <code>supabase projects create</code>+ </a>-- <a href="#supabase-projects-create"><code>supabase projects create</code></a>--- <a href="#supabase-projects-list"><code>supabase projects list</code></a>---+- <a href="#supabase-projects-list">+ <code>supabase projects list</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -276,11 +215,10 @@ supabase secrets list [flags]-h, --help help for projects```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### List all Supabase projects {#supabase-projects-list}@@ -288,18 +226,12 @@ supabase secrets list [flags]List all Supabase projects the logged-in user can access.--```shsupabase projects list [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -308,30 +240,21 @@ supabase projects list [flags]-h, --help help for list```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Create a project on Supabase {#supabase-projects-create}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase projects create <project name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -345,31 +268,22 @@ supabase projects create <project name> [flags]--region string Select a region close to you for the best performance.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage Supabase organizations {#supabase-orgs}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**--- <a href="#supabase-orgs-list"><code>supabase orgs list</code></a>---+- <a href="#supabase-orgs-list">+ <code>supabase orgs list</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -379,11 +293,10 @@ supabase projects create <project name> [flags]-h, --help help for orgs```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### List all organizations {#supabase-orgs-list}@@ -391,18 +304,12 @@ supabase projects create <project name> [flags]List all organizations the logged-in user belongs.--```shsupabase orgs list [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -411,33 +318,26 @@ supabase orgs list [flags]-h, --help help for list```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage database migration scripts {#supabase-migration}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-migration-list">+ <code>supabase migration list</code>+ </a>-- <a href="#supabase-migration-list"><code>supabase migration list</code></a>--- <a href="#supabase-migration-new"><code>supabase migration new</code></a>---+- <a href="#supabase-migration-new">+ <code>supabase migration new</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -447,30 +347,21 @@ supabase orgs list [flags]-h, --help help for migration```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Create an empty migration script {#supabase-migration-new}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase migration new <migration name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -479,30 +370,21 @@ supabase migration new <migration name> [flags]-h, --help help for new```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### List local and remote migrations {#supabase-migration-list}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase migration list [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -512,30 +394,21 @@ supabase migration list [flags]-p, --password string Password to your remote Postgres database.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Authenticate using an access token {#supabase-login}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase login [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -544,30 +417,21 @@ supabase login [flags]-h, --help help for login```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Link to a Supabase project {#supabase-link}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase link [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -578,30 +442,21 @@ supabase link [flags]--project-ref string Project ref of the Supabase project.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Initialize a local project {#supabase-init}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase init [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -610,31 +465,22 @@ supabase init [flags]-h, --help help for init```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Run code generation tools {#supabase-gen}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**--- <a href="#supabase-gen-types"><code>supabase gen types</code></a>---+- <a href="#supabase-gen-types">+ <code>supabase gen types</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -644,31 +490,22 @@ supabase init [flags]-h, --help help for gen```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Generate types from Postgres schema {#supabase-gen-types}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**--- <a href="#supabase-gen-types-typescript"><code>supabase gen types typescript</code></a>---+- <a href="#supabase-gen-types-typescript">+ <code>supabase gen types typescript</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -678,11 +515,10 @@ supabase init [flags]-h, --help help for types```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Generate types for TypeScript {#supabase-gen-types-typescript}@@ -690,19 +526,12 @@ supabase init [flags]Generate types for TypeScript. Must specify either --local or --db-url---```shsupabase gen types typescript [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -713,37 +542,34 @@ supabase gen types typescript [flags]--local Generate types from the local dev database.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage Supabase Edge functions {#supabase-functions}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-functions-delete">+ <code>supabase functions delete</code>+ </a>-- <a href="#supabase-functions-delete"><code>supabase functions delete</code></a>--- <a href="#supabase-functions-deploy"><code>supabase functions deploy</code></a>--- <a href="#supabase-functions-new"><code>supabase functions new</code></a>--- <a href="#supabase-functions-serve"><code>supabase functions serve</code></a>-+- <a href="#supabase-functions-deploy">+ <code>supabase functions deploy</code>+ </a>+- <a href="#supabase-functions-new">+ <code>supabase functions new</code>+ </a>+- <a href="#supabase-functions-serve">+ <code>supabase functions serve</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -753,30 +579,21 @@ supabase gen types typescript [flags]-h, --help help for functions```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Serve a Function locally {#supabase-functions-serve}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase functions serve <Function name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -787,30 +604,21 @@ supabase functions serve <Function name> [flags]--no-verify-jwt Disable JWT verification for the Function.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Create a new Function locally {#supabase-functions-new}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase functions new <Function name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -819,11 +627,10 @@ supabase functions new <Function name> [flags]-h, --help help for new```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Deploy a Function to Supabase {#supabase-functions-deploy}@@ -831,18 +638,12 @@ supabase functions new <Function name> [flags]Deploy a Function to the linked Supabase project.--```shsupabase functions deploy <Function name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -853,11 +654,10 @@ supabase functions deploy <Function name> [flags]--project-ref string Project ref of the Supabase project.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Delete a Function from Supabase {#supabase-functions-delete}@@ -865,19 +665,12 @@ supabase functions deploy <Function name> [flags]Delete a Function from the linked Supabase project. This does NOT remove the Function locally.---```shsupabase functions delete <Function name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -887,39 +680,38 @@ supabase functions delete <Function name> [flags]--project-ref string Project ref of the Supabase project.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage Postgres databases {#supabase-db}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-db-branch">+ <code>supabase db branch</code>+ </a>-- <a href="#supabase-db-branch"><code>supabase db branch</code></a>--- <a href="#supabase-db-diff"><code>supabase db diff</code></a>--- <a href="#supabase-db-push"><code>supabase db push</code></a>--- <a href="#supabase-db-remote"><code>supabase db remote</code></a>--- <a href="#supabase-db-reset"><code>supabase db reset</code></a>+- <a href="#supabase-db-diff">+ <code>supabase db diff</code>+ </a>+- <a href="#supabase-db-push">+ <code>supabase db push</code>+ </a>+- <a href="#supabase-db-remote">+ <code>supabase db remote</code>+ </a>+- <a href="#supabase-db-reset">+ <code>supabase db reset</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -929,30 +721,21 @@ supabase functions delete <Function name> [flags]-h, --help help for db```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Resets the local database to current migrations {#supabase-db-reset}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db reset [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -961,33 +744,26 @@ supabase db reset [flags]-h, --help help for reset```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage remote databases {#supabase-db-remote}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-db-remote-changes">+ <code>supabase db remote changes</code>+ </a>-- <a href="#supabase-db-remote-changes"><code>supabase db remote changes</code></a>--- <a href="#supabase-db-remote-commit"><code>supabase db remote commit</code></a>---+- <a href="#supabase-db-remote-commit">+ <code>supabase db remote commit</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -998,30 +774,21 @@ supabase db reset [flags]-p, --password string Password to your remote Postgres database.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Commit remote changes as a new migration {#supabase-db-remote-commit}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db remote commit [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1030,11 +797,10 @@ supabase db remote commit [flags]-h, --help help for commit```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Show changes on the remote database {#supabase-db-remote-changes}@@ -1042,18 +808,12 @@ supabase db remote commit [flags]Show changes on the remote database since last migration.--```shsupabase db remote changes [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1062,30 +822,21 @@ supabase db remote changes [flags]-h, --help help for changes```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Push new migrations to the remote database {#supabase-db-push}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db push [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1096,30 +847,21 @@ supabase db push [flags]-p, --password string Password to your remote Postgres database.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Diffs the local database for schema changes {#supabase-db-diff}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db diff [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1131,11 +873,10 @@ supabase db diff [flags]--use-migra Use migra to generate schema diff.```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />## Manage database branches {#supabase-db-branch}@@ -1143,26 +884,25 @@ supabase db diff [flags]Manage database branches. Each branch is associated with a separate database.----<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-**Available Commands**+- <a href="#supabase-db-branch-create">+ <code>supabase db branch create</code>+ </a>-- <a href="#supabase-db-branch-create"><code>supabase db branch create</code></a>--- <a href="#supabase-db-branch-delete"><code>supabase db branch delete</code></a>--- <a href="#supabase-db-branch-list"><code>supabase db branch list</code></a>--- <a href="#supabase-db-branch-switch"><code>supabase db branch switch</code></a>-+- <a href="#supabase-db-branch-delete">+ <code>supabase db branch delete</code>+ </a>+- <a href="#supabase-db-branch-list">+ <code>supabase db branch list</code>+ </a>+- <a href="#supabase-db-branch-switch">+ <code>supabase db branch switch</code>+ </a><!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->@@ -1172,30 +912,21 @@ Manage database branches. Each branch is associated with a separate database.-h, --help help for branch```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Switch the active branch {#supabase-db-branch-switch}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db branch switch <branch name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1204,30 +935,21 @@ supabase db branch switch <branch name> [flags]-h, --help help for switch```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### List branches {#supabase-db-branch-list}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db branch list [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1236,30 +958,21 @@ supabase db branch list [flags]-h, --help help for list```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Delete a branch {#supabase-db-branch-delete}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db branch delete <branch name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1268,30 +981,21 @@ supabase db branch delete <branch name> [flags]-h, --help help for delete```--<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->-<br /><br />+<br />+<br />### Create a branch {#supabase-db-branch-create}<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->----```shsupabase db branch create <branch name> [flags]```-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->**Options**@@ -1300,6 +1004,4 @@ supabase db branch create <branch name> [flags]-h, --help help for create```---<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->\ No newline at end of file+<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY -->diff --git a/apps/reference/_gotrue/config.mdx b/apps/reference/_gotrue/config.mdxindex c40b78c9409..4c7e3262d34 100644--- a/apps/reference/_gotrue/config.mdx+++ b/apps/reference/_gotrue/config.mdx@@ -8,5 +8,3 @@ title: ConfigurationA `config.toml` file is generated after running `supabase init`.This file is located in the `supabase` folder under `supabase/config.toml`.--diff --git a/apps/reference/_gotrue/release-notes.mdx b/apps/reference/_gotrue/release-notes.mdxindex 77883904adc..30c0f23e7c6 100644--- a/apps/reference/_gotrue/release-notes.mdx+++ b/apps/reference/_gotrue/release-notes.mdx@@ -4,4 +4,4 @@ id: release-notes# Release Notes-Start your release notes here.\ No newline at end of file+Start your release notes here.diff --git a/apps/reference/_storage/config.mdx b/apps/reference/_storage/config.mdxindex c40b78c9409..4c7e3262d34 100644--- a/apps/reference/_storage/config.mdx+++ b/apps/reference/_storage/config.mdx@@ -8,5 +8,3 @@ title: ConfigurationA `config.toml` file is generated after running `supabase init`.This file is located in the `supabase` folder under `supabase/config.toml`.--diff --git a/apps/reference/_storage/release-notes.mdx b/apps/reference/_storage/release-notes.mdxindex 77883904adc..30c0f23e7c6 100644--- a/apps/reference/_storage/release-notes.mdx+++ b/apps/reference/_storage/release-notes.mdx@@ -4,4 +4,4 @@ id: release-notes# Release Notes-Start your release notes here.\ No newline at end of file+Start your release notes here.diff --git a/apps/reference/_storage/usage.mdx b/apps/reference/_storage/usage.mdxindex a438b572594..1aaafa5d463 100644--- a/apps/reference/_storage/usage.mdx+++ b/apps/reference/_storage/usage.mdx@@ -4,29 +4,21 @@ title: Usagetoc_max_heading_level: 2----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';-+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->API documentation for Supabase Storage-<!-- AUTOGENERATED: DO NOT EDIT DIRECTLY IF THIS IS VERSION "next" -->-----## Create a bucket {#create-a-bucket}```/bucket/```-### Responses<Tabs>@@ -51,15 +43,12 @@ API documentation for Supabase Storage<br />--## Gets all buckets {#gets-all-buckets}```/bucket/```-### Responses<Tabs>@@ -84,17 +73,12 @@ API documentation for Supabase Storage<br />----## Empty a bucket {#empty-a-bucket}```/bucket/{bucketId}/empty```-### Responses<Tabs>@@ -119,17 +103,12 @@ API documentation for Supabase Storage<br />----## Get details of a bucket {#get-details-of-a-bucket}```/bucket/{bucketId}```-### Responses<Tabs>@@ -154,15 +133,12 @@ API documentation for Supabase Storage<br />--## Update properties of a bucket {#update-properties-of-a-bucket}```/bucket/{bucketId}```-### Responses<Tabs>@@ -187,15 +163,12 @@ API documentation for Supabase Storage<br />--## Delete a bucket {#delete-a-bucket}```/bucket/{bucketId}```-### Responses<Tabs>@@ -220,17 +193,12 @@ API documentation for Supabase Storage<br />----## Delete an object {#delete-an-object}```/object/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -255,15 +223,12 @@ API documentation for Supabase Storage<br />--## Deprecated (use GET /object/authenticated/{bucketName} instead): Retrieve an object {#deprecated-use-get-objectauthenticatedbucketname-instead-retrieve-an-object}```/object/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -280,15 +245,12 @@ API documentation for Supabase Storage<br />--## Update the object at an existing key {#update-the-object-at-an-existing-key}```/object/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -313,15 +275,12 @@ API documentation for Supabase Storage<br />--## Upload a new object {#upload-a-new-object}```/object/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -346,17 +305,12 @@ API documentation for Supabase Storage<br />----## Delete multiple objects {#delete-multiple-objects}```/object/{bucketName}```-### Responses<Tabs>@@ -381,17 +335,12 @@ API documentation for Supabase Storage<br />----## Retrieve an object {#retrieve-an-object}```/object/authenticated/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -408,17 +357,12 @@ API documentation for Supabase Storage<br />----## Generate a presigned url to retrieve an object {#generate-a-presigned-url-to-retrieve-an-object}```/object/sign/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -443,15 +387,12 @@ API documentation for Supabase Storage<br />--## Retrieve an object via a presigned URL {#retrieve-an-object-via-a-presigned-url}```/object/sign/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -468,17 +409,12 @@ API documentation for Supabase Storage<br />----## Generate presigned urls to retrieve objects {#generate-presigned-urls-to-retrieve-objects}```/object/sign/{bucketName}```-### Responses<Tabs>@@ -503,17 +439,12 @@ API documentation for Supabase Storage<br />----## Moves an object {#moves-an-object}```/object/move```-### Responses<Tabs>@@ -538,17 +469,12 @@ API documentation for Supabase Storage<br />----## Search for objects under a prefix {#search-for-objects-under-a-prefix}```/object/list/{bucketName}```-### Responses<Tabs>@@ -573,17 +499,12 @@ API documentation for Supabase Storage<br />----## Copies an object {#copies-an-object}```/object/copy```-### Responses<Tabs>@@ -608,17 +529,12 @@ API documentation for Supabase Storage<br />----## Retrieve an object from a public bucket {#retrieve-an-object-from-a-public-bucket}```/object/public/{bucketName}/{wildcard}```-### Responses<Tabs>@@ -634,4 +550,3 @@ API documentation for Supabase Storage</Tabs><br />-diff --git a/apps/reference/_supabase_dart/auth-onauthstatechange.mdx b/apps/reference/_supabase_dart/auth-onauthstatechange.mdxindex b712417a308..d030d9b30b4 100644--- a/apps/reference/_supabase_dart/auth-onauthstatechange.mdx+++ b/apps/reference/_supabase_dart/auth-onauthstatechange.mdx@@ -1,16 +1,15 @@---id: auth-onauthstatechange-title: "auth.onAuthStateChange()"+title: 'auth.onAuthStateChange()'slug: auth-onauthstatechangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Receive a notification every time an auth event happens.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,33 +24,14 @@ final subscription = supabase.auth.onAuthStateChange((event, session) {});```-</TabItem></Tabs>----------------## Examples### Listen to auth changes--<TabsdefaultValue="dart"groupId="reference/dart"@@ -66,7 +46,6 @@ final subscription = supabase.auth.onAuthStateChange((event, session) {});```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-session.mdx b/apps/reference/_supabase_dart/auth-session.mdxindex d341cb9c1a5..f1cc29c3f43 100644--- a/apps/reference/_supabase_dart/auth-session.mdx+++ b/apps/reference/_supabase_dart/auth-session.mdx@@ -1,16 +1,15 @@---id: auth-session-title: "auth.session()"+title: 'auth.session()'slug: auth-sessioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns the session data, if there is an active session.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -22,33 +21,14 @@ Returns the session data, if there is an active session.final session = supabase.auth.session();```-</TabItem></Tabs>----------------## Examples### Get the session data--<TabsdefaultValue="dart"groupId="reference/dart"@@ -60,7 +40,6 @@ final session = supabase.auth.session();final session = supabase.auth.session();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-signin.mdx b/apps/reference/_supabase_dart/auth-signin.mdxindex 6685d8b7cdd..10f4fd34c92 100644--- a/apps/reference/_supabase_dart/auth-signin.mdx+++ b/apps/reference/_supabase_dart/auth-signin.mdx@@ -1,16 +1,15 @@---id: auth-signin-title: "auth.signIn()"+title: 'auth.signIn()'slug: auth-signincustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Log in an existing user, or login via a third-party provider.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,38 +24,22 @@ final user = res.data?.user;final error = res.error;```-</TabItem></Tabs>----## Notes- A user can sign up via email, phone number.- If you provide `email` without a `password`, the user will be sent a magic link.- The magic link's destination URL is determined by the SITE_URL config variable. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)-- Similarly, if you provide `phone` without a `password`, the user will be sent a one time password.+- Similarly, if you provide `phone` without a `password`, the user will be sent a one time password.- If you are looking to sign users in with OAuth in Flutter apps, go to [`signInWithProvider()`](/docs/reference/dart/auth-signinwithprovider).---------## Examples### Sign in with email.--<TabsdefaultValue="dart"groupId="reference/dart"@@ -71,7 +54,6 @@ final user = res.data?.user;final error = res.error;```-</TabItem></Tabs>@@ -93,17 +75,15 @@ final res = await supabase.auth.signIn(email: '[email protected]');final error = res.error;```-</TabItem></Tabs>### Get OAuth sign in URL.-Passing provider parameter to `signIn()` will return a URL to sign your user in via OAuth.+Passing provider parameter to `signIn()` will return a URL to sign your user in via OAuth.If you are looking to sign in a user via OAuth on Flutter app, go to [`signInWithProvider()`](/docs/reference/dart/auth-signinwithprovider).-<TabsdefaultValue="dart"groupId="reference/dart"@@ -118,7 +98,6 @@ final url = res.data?.url;final error = res.error;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-signinwithprovider.mdx b/apps/reference/_supabase_dart/auth-signinwithprovider.mdxindex 7b7a7b4466f..f5e1fc87c0a 100644--- a/apps/reference/_supabase_dart/auth-signinwithprovider.mdx+++ b/apps/reference/_supabase_dart/auth-signinwithprovider.mdx@@ -1,16 +1,15 @@---id: auth-signinwithprovider-title: "auth.signInWithProvider()"+title: 'auth.signInWithProvider()'slug: auth-signinwithprovidercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Signs the user in using third party OAuth providers.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,35 +23,19 @@ final res = await supabase.auth.signInWithProvider(Provider.github);final error = res.error;```-</TabItem></Tabs>----## Notes- `auth.signInWithProvider()` is only available on `supabase_flutter`- It will open the browser to the relevant login page.---------## Examples### Sign in with provider.--<TabsdefaultValue="dart"groupId="reference/dart"@@ -66,7 +49,6 @@ final res = await supabase.auth.signInWithProvider(Provider.github);final error = res.error;```-</TabItem></Tabs>@@ -76,7 +58,6 @@ final error = res.error;Specify the redirect link to bring back the user via deeplink.Note that `redirectTo` should be null for Flutter Web.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -96,7 +77,6 @@ final res = await supabase.auth.signInWithProvider(final error = res.error;```-</TabItem></Tabs>@@ -106,7 +86,6 @@ final error = res.error;If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token.You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -123,7 +102,6 @@ const { user, session, error } = await supabase.auth.signIn({const oAuthToken = session.provider_token // use to access provider API```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-signout.mdx b/apps/reference/_supabase_dart/auth-signout.mdxindex efa6f614483..b596df5e209 100644--- a/apps/reference/_supabase_dart/auth-signout.mdx+++ b/apps/reference/_supabase_dart/auth-signout.mdx@@ -1,16 +1,15 @@---id: auth-signout-title: "auth.signOut()"+title: 'auth.signOut()'slug: auth-signoutcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Signs out the current user, if there is a logged in user.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,33 +23,14 @@ final res = await supabase.auth.signOut();final error = res.error;```-</TabItem></Tabs>----------------## Examples### Sign out--<TabsdefaultValue="dart"groupId="reference/dart"@@ -64,7 +44,6 @@ final res = await supabase.auth.signOut();final error = res.error;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-signup.mdx b/apps/reference/_supabase_dart/auth-signup.mdxindex 31845b564e1..1cf5a37b25e 100644--- a/apps/reference/_supabase_dart/auth-signup.mdx+++ b/apps/reference/_supabase_dart/auth-signup.mdx@@ -1,16 +1,15 @@---id: auth-signup-title: "auth.signUp()"+title: 'auth.signUp()'slug: auth-signupcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new user.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,15 +24,10 @@ final user = res.data?.user;final error = res.error;```-</TabItem></Tabs>----## Notes- By default, the user will need to verify their email address before logging in. If you would like to change this, you can disable "Email Confirmations" by going to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)@@ -41,21 +35,10 @@ final error = res.error;- If "Email Confirmations" is turned off, both a `user` and a `session` will be returned- When the user confirms their email address, they will be redirected to localhost:3000 by default. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)---------## Examples### Sign up.--<TabsdefaultValue="dart"groupId="reference/dart"@@ -70,11 +53,10 @@ final user = res.data?.user;final error = res.error;```-</TabItem></Tabs>### Sign up with third-party providers.-If you are using Flutter, you can sign up with OAuth providers using the [`signInWithProvider()`](/docs/reference/dart/auth-signinwithprovider) method available on `supabase_flutter`.\ No newline at end of file+If you are using Flutter, you can sign up with OAuth providers using the [`signInWithProvider()`](/docs/reference/dart/auth-signinwithprovider) method available on `supabase_flutter`.diff --git a/apps/reference/_supabase_dart/auth-update.mdx b/apps/reference/_supabase_dart/auth-update.mdxindex 489e5c3b7a7..2d94e6267af 100644--- a/apps/reference/_supabase_dart/auth-update.mdx+++ b/apps/reference/_supabase_dart/auth-update.mdx@@ -1,16 +1,15 @@---id: auth-update-title: "auth.update()"+title: 'auth.update()'slug: auth-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates user data, if there is a logged in user.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,35 +25,19 @@ final res = await supabase.auth.update(final error = res.error;```-</TabItem></Tabs>----## Notes-It's generally better to store user data in a table inside your public schema (i.e. `public.users`).+It's generally better to store user data in a table inside your public schema (i.e. `public.users`).Use the `update()` method if you have data which rarely changes or is specific only to the logged in user.---------## Examples### Update a user's metadata.--<TabsdefaultValue="dart"groupId="reference/dart"@@ -70,7 +53,6 @@ final res = await supabase.auth.update(final error = res.error;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/auth-user.mdx b/apps/reference/_supabase_dart/auth-user.mdxindex 5ac9e1a4aaa..e5092a11c9b 100644--- a/apps/reference/_supabase_dart/auth-user.mdx+++ b/apps/reference/_supabase_dart/auth-user.mdx@@ -1,16 +1,15 @@---id: auth-user-title: "auth.user()"+title: 'auth.user()'slug: auth-usercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns the user data, if there is a logged in user.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -22,33 +21,14 @@ Returns the user data, if there is a logged in user.final user = supabase.auth.user();```-</TabItem></Tabs>----------------## Examples### Get the logged in user--<TabsdefaultValue="dart"groupId="reference/dart"@@ -60,7 +40,6 @@ final user = supabase.auth.user();final user = supabase.auth.user();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/containedby.mdx b/apps/reference/_supabase_dart/containedby.mdxindex 73983f98edc..bb3159884dd 100644--- a/apps/reference/_supabase_dart/containedby.mdx+++ b/apps/reference/_supabase_dart/containedby.mdx@@ -1,14 +1,12 @@---id: containedby-title: ".containedBy()"+title: '.containedBy()'slug: containedbycustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/contains.mdx b/apps/reference/_supabase_dart/contains.mdxindex fb9a152e226..06c671cee19 100644--- a/apps/reference/_supabase_dart/contains.mdx+++ b/apps/reference/_supabase_dart/contains.mdx@@ -1,14 +1,12 @@---id: contains-title: ".contains()"+title: '.contains()'slug: containscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/delete.mdx b/apps/reference/_supabase_dart/delete.mdxindex 4193dafc50d..df5eed2e4b8 100644--- a/apps/reference/_supabase_dart/delete.mdx+++ b/apps/reference/_supabase_dart/delete.mdx@@ -1,16 +1,15 @@---id: delete-title: "Delete data: delete()"+title: 'Delete data: delete()'slug: deletecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs a DELETE on the table.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,34 +25,18 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes- `delete()` should always be combined with [Filters](/docs/reference/dart/using-filters) to target the item(s) you wish to delete.---------## Examples### Delete records--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,7 +52,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/eq.mdx b/apps/reference/_supabase_dart/eq.mdxindex de5e74fb445..7640ebaa2dd 100644--- a/apps/reference/_supabase_dart/eq.mdx+++ b/apps/reference/_supabase_dart/eq.mdx@@ -1,16 +1,15 @@---id: eq-title: ".eq()"+title: '.eq()'slug: eqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` exactly matches the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/filter.mdx b/apps/reference/_supabase_dart/filter.mdxindex 6d0db0b8a19..93c679d2c79 100644--- a/apps/reference/_supabase_dart/filter.mdx+++ b/apps/reference/_supabase_dart/filter.mdx@@ -1,16 +1,15 @@---id: filter-title: ".filter()"+title: '.filter()'slug: filtercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose `column` satisfies the filter.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,15 +25,10 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes- `.filter()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values, so it should only be used as an escape hatch in case other filters don't work.@@ -45,21 +39,10 @@ final res = await supabase.filter('id','cs','{${mylist.join(',')}}') // You can insert a Dart array list.```---------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -75,15 +58,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -99,15 +79,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -123,15 +100,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -146,15 +120,12 @@ final res = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>### Filter embedded resources--<TabsdefaultValue="dart"groupId="reference/dart"@@ -170,7 +141,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/getsubscriptions.mdx b/apps/reference/_supabase_dart/getsubscriptions.mdxindex 020450cc2d4..bbc51186072 100644--- a/apps/reference/_supabase_dart/getsubscriptions.mdx+++ b/apps/reference/_supabase_dart/getsubscriptions.mdx@@ -1,16 +1,15 @@---id: getsubscriptions-title: "getSubscriptions()"+title: 'getSubscriptions()'slug: getsubscriptionscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns an array of all your subscriptions.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -22,33 +21,14 @@ Returns an array of all your subscriptions.final subscriptions = supabase.getSubscriptions();```-</TabItem></Tabs>----------------## Examples### Get all subscriptions--<TabsdefaultValue="dart"groupId="reference/dart"@@ -60,7 +40,6 @@ final subscriptions = supabase.getSubscriptions();final subscriptions = supabase.getSubscriptions();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/gt.mdx b/apps/reference/_supabase_dart/gt.mdxindex a90f5b4d070..1ca45e7f7aa 100644--- a/apps/reference/_supabase_dart/gt.mdx+++ b/apps/reference/_supabase_dart/gt.mdx@@ -1,16 +1,15 @@---id: gt-title: ".gt()"+title: '.gt()'slug: gtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/gte.mdx b/apps/reference/_supabase_dart/gte.mdxindex 417c42914eb..4e63efe50cc 100644--- a/apps/reference/_supabase_dart/gte.mdx+++ b/apps/reference/_supabase_dart/gte.mdx@@ -1,16 +1,15 @@---id: gte-title: ".gte()"+title: '.gte()'slug: gtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than or equal to the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/ilike.mdx b/apps/reference/_supabase_dart/ilike.mdxindex 940fd0e1ed7..12187cab7e7 100644--- a/apps/reference/_supabase_dart/ilike.mdx+++ b/apps/reference/_supabase_dart/ilike.mdx@@ -1,16 +1,15 @@---id: ilike-title: ".ilike()"+title: '.ilike()'slug: ilikecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied `pattern` (case insensitive).-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/in_.mdx b/apps/reference/_supabase_dart/in_.mdxindex 920523b1524..73d7b293edd 100644--- a/apps/reference/_supabase_dart/in_.mdx+++ b/apps/reference/_supabase_dart/in_.mdx@@ -1,18 +1,17 @@---id: in_-title: ".in_()"+title: '.in_()'slug: in_custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is found on the specified `values`.`is_` and `in_` filter methods are suffixed with `_` to avoid collisions with reserved keywords.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -28,33 +27,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -70,15 +50,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -94,15 +71,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -118,15 +92,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -142,7 +113,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/index.mdx b/apps/reference/_supabase_dart/index.mdxindex 454faa9a369..832c254f5f4 100644--- a/apps/reference/_supabase_dart/index.mdx+++ b/apps/reference/_supabase_dart/index.mdx@@ -1,12 +1,11 @@---id: index-title: "Getting started"+title: 'Getting started'slug: getting-startedcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'--Supabase Dart.\ No newline at end of file+Supabase Dart.diff --git a/apps/reference/_supabase_dart/initializing.mdx b/apps/reference/_supabase_dart/initializing.mdxindex 4ad3f59a035..bbb5d017b3b 100644--- a/apps/reference/_supabase_dart/initializing.mdx+++ b/apps/reference/_supabase_dart/initializing.mdx@@ -1,49 +1,28 @@---id: initializing-title: "Initializing"+title: 'Initializing'slug: initializingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Dart+You can initialize a new Supabase client using the `SupabaseClient()` method.The Supabase client is your entrypoint to the rest of the Supabase functionalityand is the easiest way to interact with everything we offer within the Supabase ecosystem.-## FlutterFor `supabase_flutter`, you will be using the static `initialize()` method on `Supabase` class.-------------------## Examples### Dart SupabaseClient()--<TabsdefaultValue="dart"groupId="reference/dart"@@ -55,15 +34,12 @@ For `supabase_flutter`, you will be using the static `initialize()` method on `Sfinal supabase = SupabaseClient('https://xyzcompany.supabase.co', 'public-anon-key');```-</TabItem></Tabs>### Flutter initialize()--<TabsdefaultValue="dart"groupId="reference/dart"@@ -78,7 +54,6 @@ Future<void> main() async {}```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/insert.mdx b/apps/reference/_supabase_dart/insert.mdxindex c2b43055e7a..5f30113108e 100644--- a/apps/reference/_supabase_dart/insert.mdx+++ b/apps/reference/_supabase_dart/insert.mdx@@ -1,16 +1,15 @@---id: insert-title: "Create data: insert()"+title: 'Create data: insert()'slug: insertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an INSERT into the table.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,36 +25,20 @@ final res = await supabase]).execute();```-</TabItem></Tabs>----## Notes- By default, every time you run `insert()`, the client library will make a `select` to return the full record.-This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.-If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.---------+ This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.+ If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.## Examples### Create a record--<TabsdefaultValue="dart"groupId="reference/dart"@@ -71,15 +54,12 @@ final res = await supabase]).execute();```-</TabItem></Tabs>### Bulk create--<TabsdefaultValue="dart"groupId="reference/dart"@@ -96,7 +76,6 @@ final res = await supabase]).execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/installing.mdx b/apps/reference/_supabase_dart/installing.mdxindex d731749f757..3fb6d474143 100644--- a/apps/reference/_supabase_dart/installing.mdx+++ b/apps/reference/_supabase_dart/installing.mdx@@ -1,16 +1,16 @@---id: installing-title: "Installing"+title: 'Installing'slug: installingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Dart-Dart libraries are built and supported by the community.+Dart libraries are built and supported by the community.```bashdart pub add supabase@@ -18,7 +18,7 @@ dart pub add supabaseFind the source code on [GitHub](https://github.com/supabase/supabase-dart).-## Flutter+## FlutterFor Flutter project, you can use [supabase_flutter](https://github.com/supabase/supabase-flutter).@@ -27,6 +27,6 @@ flutter pub add supabase_flutter````supabase_flutter` plugin uses `supabase` plugin internally, and it adds some Flutter specific functionality such as handling deeplinks coming back from magic link verifications.-If you are creating a Flutter application, we recommend using `supabase_flutter` instead of `supabase`.+If you are creating a Flutter application, we recommend using `supabase_flutter` instead of `supabase`.-For the most part `supabase_flutter` shares the same API as `supabase` with few exceptions such as initialization or OAuth sign in.\ No newline at end of file+For the most part `supabase_flutter` shares the same API as `supabase` with few exceptions such as initialization or OAuth sign in.diff --git a/apps/reference/_supabase_dart/invoke.mdx b/apps/reference/_supabase_dart/invoke.mdxindex d533cd143ca..5c7ee5a6968 100644--- a/apps/reference/_supabase_dart/invoke.mdx+++ b/apps/reference/_supabase_dart/invoke.mdx@@ -1,12 +1,12 @@---id: invoke-title: "invoke()"+title: 'invoke()'slug: invokecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Invokes a Supabase Function. See the [guide](/docs/guides/api) for details on writing Functions.@@ -19,7 +19,6 @@ Supabase Functions are in Experimental release until 1 August 2022. There will bWe have released Supabase Functions to gather feedback. You're welcome to try them out and send us feedback but we strongly advise against using them for anything in production.There will be breaking changes with no notice.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -33,35 +32,19 @@ final data = res.data;final error = res.error;```-</TabItem></Tabs>----## Notes- Requires an Authorization header.- Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec.---------## Examples### Basic invocation.--<TabsdefaultValue="dart"groupId="reference/dart"@@ -75,7 +58,6 @@ final data = res.data;final error = res.error;```-</TabItem></Tabs>@@ -84,7 +66,6 @@ final error = res.error;By default, `invoke()` will parse the response as JSON. You can parse the response in the following formats: `json`, `blob`, `text`, and `arrayBuffer`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -102,7 +83,6 @@ final data = res.data;final error = res.error;```-</TabItem></Tabs>@@ -111,7 +91,6 @@ final error = res.error;Any `headers` will be passed through to the function. A common pattern is to pass a logged-in user's JWT token as an Authorization header.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -129,7 +108,6 @@ final res = await supabaseClient.functions.invoke();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/is_.mdx b/apps/reference/_supabase_dart/is_.mdxindex 99743c23867..d8fa63be1e8 100644--- a/apps/reference/_supabase_dart/is_.mdx+++ b/apps/reference/_supabase_dart/is_.mdx@@ -1,18 +1,17 @@---id: is_-title: ".is_()"+title: '.is_()'slug: is_custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'A check for exact equality (null, true, false), finds all rows whose value on the stated `column` exactly match the specified `value`.`is_` and `in_` filter methods are suffixed with `_` to avoid collisions with reserved keywords.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -28,33 +27,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -70,15 +50,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -94,15 +71,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -118,15 +92,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -142,7 +113,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/like.mdx b/apps/reference/_supabase_dart/like.mdxindex e2a326d1d45..3581f50b27a 100644--- a/apps/reference/_supabase_dart/like.mdx+++ b/apps/reference/_supabase_dart/like.mdx@@ -1,16 +1,15 @@---id: like-title: ".like()"+title: '.like()'slug: likecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied `pattern` (case sensitive).-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,14 +25,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,25 +75,10 @@ The pattern to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -113,15 +94,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -137,15 +115,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -161,15 +136,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -185,7 +157,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/limit.mdx b/apps/reference/_supabase_dart/limit.mdxindex 5d8444cce5a..e6729ebf431 100644--- a/apps/reference/_supabase_dart/limit.mdx+++ b/apps/reference/_supabase_dart/limit.mdx@@ -1,16 +1,15 @@---id: limit-title: "limit()"+title: 'limit()'slug: limitcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result with the specified count.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With embedded resources--<TabsdefaultValue="dart"groupId="reference/dart"@@ -93,7 +70,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/lt.mdx b/apps/reference/_supabase_dart/lt.mdxindex e381cc0db22..d2b3325b04a 100644--- a/apps/reference/_supabase_dart/lt.mdx+++ b/apps/reference/_supabase_dart/lt.mdx@@ -1,16 +1,15 @@---id: lt-title: ".lt()"+title: '.lt()'slug: ltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/lte.mdx b/apps/reference/_supabase_dart/lte.mdxindex 9223bac9cac..acf25dd9bd8 100644--- a/apps/reference/_supabase_dart/lte.mdx+++ b/apps/reference/_supabase_dart/lte.mdx@@ -1,16 +1,15 @@---id: lte-title: ".lte()"+title: '.lte()'slug: ltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than or equal to the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,14 +25,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -113,15 +94,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -137,15 +115,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -161,15 +136,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -185,7 +157,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/match.mdx b/apps/reference/_supabase_dart/match.mdxindex f8554a671a9..2f51fe0c0b3 100644--- a/apps/reference/_supabase_dart/match.mdx+++ b/apps/reference/_supabase_dart/match.mdx@@ -1,16 +1,15 @@---id: match-title: ".match()"+title: '.match()'slug: matchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose columns match the specified `query` object.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/neq.mdx b/apps/reference/_supabase_dart/neq.mdxindex 10e6a849f34..f6e9627d68a 100644--- a/apps/reference/_supabase_dart/neq.mdx+++ b/apps/reference/_supabase_dart/neq.mdx@@ -1,16 +1,15 @@---id: neq-title: ".neq()"+title: '.neq()'slug: neqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` doesn't match the specified `value`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -92,15 +69,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -116,15 +90,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -140,7 +111,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/not.mdx b/apps/reference/_supabase_dart/not.mdxindex 28029720717..c8a7f7592c5 100644--- a/apps/reference/_supabase_dart/not.mdx+++ b/apps/reference/_supabase_dart/not.mdx@@ -1,16 +1,15 @@---id: not-title: ".not()"+title: '.not()'slug: notcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows which doesn't satisfy the filter.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,15 +25,10 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes- `.not()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -47,21 +41,10 @@ final res = await supabase.not('id','in','(${mylist.join(',')})') // You can insert a Dart list array.```---------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -77,15 +60,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -101,15 +81,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -125,15 +102,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -149,7 +123,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/or.mdx b/apps/reference/_supabase_dart/or.mdxindex ebdde74e4c3..4124e6577a6 100644--- a/apps/reference/_supabase_dart/or.mdx+++ b/apps/reference/_supabase_dart/or.mdx@@ -1,16 +1,15 @@---id: or-title: ".or()"+title: '.or()'slug: orcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows satisfying at least one of the filters.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,15 +25,10 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes- `.or()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -45,21 +39,10 @@ final res = await supabase.or('id.in.(${mylist.join(',')}),rangecol.cs.(${mylistRange.join(',')}]') // You can insert a Dart list for list or range column.```---------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -75,15 +58,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### Use `or` with `and`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -99,7 +79,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/order.mdx b/apps/reference/_supabase_dart/order.mdxindex 0ae7d8ad73b..f466057de84 100644--- a/apps/reference/_supabase_dart/order.mdx+++ b/apps/reference/_supabase_dart/order.mdx@@ -1,16 +1,15 @@---id: order-title: "order()"+title: 'order()'slug: ordercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Orders the result with the specified column.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,15 +48,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With embedded resources--<TabsdefaultValue="dart"groupId="reference/dart"@@ -93,7 +70,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/overlaps.mdx b/apps/reference/_supabase_dart/overlaps.mdxindex a5e9e66c2a9..de4f5c1d25c 100644--- a/apps/reference/_supabase_dart/overlaps.mdx+++ b/apps/reference/_supabase_dart/overlaps.mdx@@ -1,14 +1,12 @@---id: overlaps-title: ".overlaps()"+title: '.overlaps()'slug: overlapscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/range.mdx b/apps/reference/_supabase_dart/range.mdxindex 31700fe1b2d..47ba737d074 100644--- a/apps/reference/_supabase_dart/range.mdx+++ b/apps/reference/_supabase_dart/range.mdx@@ -1,16 +1,15 @@---id: range-title: "range()"+title: 'range()'slug: rangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result to rows within the specified range, inclusive.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,7 +48,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rangeadjacent.mdx b/apps/reference/_supabase_dart/rangeadjacent.mdxindex 5f2ccb2f1a7..29b70d49ab7 100644--- a/apps/reference/_supabase_dart/rangeadjacent.mdx+++ b/apps/reference/_supabase_dart/rangeadjacent.mdx@@ -1,14 +1,12 @@---id: rangeadjacent-title: ".rangeAdjacent()"+title: '.rangeAdjacent()'slug: rangeadjacentcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rangegt.mdx b/apps/reference/_supabase_dart/rangegt.mdxindex c2b80008ac4..03d57458b56 100644--- a/apps/reference/_supabase_dart/rangegt.mdx+++ b/apps/reference/_supabase_dart/rangegt.mdx@@ -1,14 +1,12 @@---id: rangegt-title: ".rangeGt()"+title: '.rangeGt()'slug: rangegtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rangegte.mdx b/apps/reference/_supabase_dart/rangegte.mdxindex b03452ee437..c942f6b3728 100644--- a/apps/reference/_supabase_dart/rangegte.mdx+++ b/apps/reference/_supabase_dart/rangegte.mdx@@ -1,14 +1,12 @@---id: rangegte-title: ".rangeGte()"+title: '.rangeGte()'slug: rangegtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rangelt.mdx b/apps/reference/_supabase_dart/rangelt.mdxindex 0889d73a74e..40ad58cdc23 100644--- a/apps/reference/_supabase_dart/rangelt.mdx+++ b/apps/reference/_supabase_dart/rangelt.mdx@@ -1,14 +1,12 @@---id: rangelt-title: ".rangeLt()"+title: '.rangeLt()'slug: rangeltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rangelte.mdx b/apps/reference/_supabase_dart/rangelte.mdxindex 94712f7b09a..c36ab917cb6 100644--- a/apps/reference/_supabase_dart/rangelte.mdx+++ b/apps/reference/_supabase_dart/rangelte.mdx@@ -1,14 +1,12 @@---id: rangelte-title: ".rangeLte()"+title: '.rangeLte()'slug: rangeltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="dart"@@ -25,33 +23,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,15 +46,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,15 +67,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -115,15 +88,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -139,7 +109,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/release-notes.mdx b/apps/reference/_supabase_dart/release-notes.mdxindex 77883904adc..30c0f23e7c6 100644--- a/apps/reference/_supabase_dart/release-notes.mdx+++ b/apps/reference/_supabase_dart/release-notes.mdx@@ -4,4 +4,4 @@ id: release-notes# Release Notes-Start your release notes here.\ No newline at end of file+Start your release notes here.diff --git a/apps/reference/_supabase_dart/removesubscription.mdx b/apps/reference/_supabase_dart/removesubscription.mdxindex b8fca1f76b7..52624eeaf11 100644--- a/apps/reference/_supabase_dart/removesubscription.mdx+++ b/apps/reference/_supabase_dart/removesubscription.mdx@@ -1,16 +1,15 @@---id: removesubscription-title: "removeSubscription()"+title: 'removeSubscription()'slug: removesubscriptioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Removes an active subscription and returns the number of open connections.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -22,34 +21,18 @@ Removes an active subscription and returns the number of open connections.supabase.removeSubscription(mySubscription);```-</TabItem></Tabs>----## Notes- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.---------## Examples### Remove a subscription--<TabsdefaultValue="dart"groupId="reference/dart"@@ -61,7 +44,6 @@ supabase.removeSubscription(mySubscription);supabase.removeSubscription(mySubscription);```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/reset-password-email.mdx b/apps/reference/_supabase_dart/reset-password-email.mdxindex 9f23140dac9..e289467ef19 100644--- a/apps/reference/_supabase_dart/reset-password-email.mdx+++ b/apps/reference/_supabase_dart/reset-password-email.mdx@@ -1,16 +1,15 @@---id: reset-password-email-title: "Reset Password (Email)"+title: 'Reset Password (Email)'slug: reset-password-emailcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends a reset request to an email address.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,15 +23,10 @@ final res = await supabase.auth.api.resetPasswordForEmail('[email protected]');final error = res.error;```-</TabItem></Tabs>----## NotesSends a reset request to an email address.@@ -52,21 +46,10 @@ final res = await supabase.auth.api.updateUser();```---------## Examples### Reset password--<TabsdefaultValue="dart"groupId="reference/dart"@@ -80,15 +63,12 @@ final res = await supabase.auth.api.resetPasswordForEmail('[email protected]');final error = res.error;```-</TabItem></Tabs>### Reset password for Flutter--<TabsdefaultValue="dart"groupId="reference/dart"@@ -96,7 +76,8 @@ final error = res.error;<TabItem value="dart">-You can pass `redirectTo` to open the app via deeplink when user opens the password reset email.+You can pass `redirectTo` to open the app via deeplink when user opens the password reset email.+```dartfinal res = await supabase.auth.api.resetPasswordForEmail(@@ -108,7 +89,6 @@ final res = await supabase.auth.api.resetPasswordForEmail(final error = res.error;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/rpc.mdx b/apps/reference/_supabase_dart/rpc.mdxindex e8db06a63de..f4648dadb86 100644--- a/apps/reference/_supabase_dart/rpc.mdx+++ b/apps/reference/_supabase_dart/rpc.mdx@@ -1,19 +1,18 @@---id: rpc-title: "Stored Procedures: rpc()"+title: 'Stored Procedures: rpc()'slug: rpccustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'You can call stored procedures as a "Remote Procedure Call".That's a fancy way of saying that you can put some logic into your database then call it from anywhere.It's especially useful when the logic rarely changes - like password resets and updates.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -27,27 +26,10 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### Call a stored procedure@@ -67,15 +49,12 @@ final res = await supabase.execute();```-</TabItem></Tabs>### With Parameters--<TabsdefaultValue="dart"groupId="reference/dart"@@ -89,7 +68,6 @@ final res = await supabase.execute();```-</TabItem></Tabs>@@ -99,7 +77,6 @@ final res = await supabaseYou can specify a count option to get the row count along with your data.Allowed values for count option are `exact`, `planned` and `estimated`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -113,7 +90,6 @@ final res = await supabase.execute(count: CountOption.exact);```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/select.mdx b/apps/reference/_supabase_dart/select.mdxindex 59d67435a57..99b017f709e 100644--- a/apps/reference/_supabase_dart/select.mdx+++ b/apps/reference/_supabase_dart/select.mdx@@ -1,16 +1,15 @@---id: select-title: "Fetch data: select()"+title: 'Fetch data: select()'slug: selectcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs vertical filtering with SELECT.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -28,15 +27,10 @@ final data = res.data;final error = res.error;```-</TabItem></Tabs>----## Notes- By default, Supabase projects will return a maximum of 1,000 rows. This setting can be changed in Project API Settings. It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data.@@ -44,21 +38,10 @@ final error = res.error;- `select()` can be combined with [Filters](/docs/reference/dart/using-filters)- If using the Supabase hosted platform `apikey` is technically a reserved keyword, since the API gateway will pluck it out for authentication. [It should be avoided as a column name](https://github.com/supabase/supabase/issues/5465).---------## Examples### Getting your data--<TabsdefaultValue="dart"groupId="reference/dart"@@ -76,7 +59,6 @@ final data = res.data;final error = res.error;```-</TabItem></Tabs>@@ -99,7 +81,6 @@ final res = await supabase.execute();```-</TabItem></Tabs>@@ -127,21 +108,19 @@ final res = await supabase.execute();```-</TabItem></Tabs>### Query the same foreign table multiple times-Sometimes you will need to query the same foreign table twice.-In this case, you can use the name of the joined column to identify-which join you intend to use. For convenience, you can also give an-alias for each column. For example, if we had a shop of products,-and we wanted to get the supplier and the purchaser at the same time+Sometimes you will need to query the same foreign table twice.+In this case, you can use the name of the joined column to identify+which join you intend to use. For convenience, you can also give an+alias for each column. For example, if we had a shop of products,+and we wanted to get the supplier and the purchaser at the same time(both in the users) table:-<TabsdefaultValue="dart"groupId="reference/dart"@@ -160,17 +139,15 @@ final res = await supabase.execute();```-</TabItem></Tabs>### Filtering with inner joins-If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wanted+If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wantedto select all rows in a `message` table which belong to a user with the `username` "Jane":-<TabsdefaultValue="dart"groupId="reference/dart"@@ -186,7 +163,6 @@ final res = await supabase.execute();```-</TabItem></Tabs>@@ -196,7 +172,6 @@ final res = await supabaseYou can get the number of rows by using the count option.Allowed values for count option are [exact](https://postgrest.org/en/stable/api.html#exact-count), [planned](https://postgrest.org/en/stable/api.html#planned-count) and [estimated](https://postgrest.org/en/stable/api.html#estimated-count).-<TabsdefaultValue="dart"groupId="reference/dart"@@ -213,20 +188,18 @@ final res = await supabasefinal count = res.count;```-</TabItem></Tabs>### Querying JSON data-If you have data inside of a JSONB column, you can apply select-and query filters to the data values. Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for querying JSON data. Also see+If you have data inside of a JSONB column, you can apply select+and query filters to the data values. Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for querying JSON data. Also see[PostgREST docs](http://postgrest.org/en/v7.0.0/api.html#json-columns) for more details.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -245,7 +218,6 @@ final res = await supabase.execute();```-</TabItem></Tabs>@@ -254,7 +226,6 @@ final res = await supabaseBy default the data is returned in JSON format, however you can also request for it to be returned as Comma Separated Values.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -270,7 +241,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/single.mdx b/apps/reference/_supabase_dart/single.mdxindex 42d8c77a6a2..927b64f13ad 100644--- a/apps/reference/_supabase_dart/single.mdx+++ b/apps/reference/_supabase_dart/single.mdx@@ -1,16 +1,15 @@---id: single-title: "single()"+title: 'single()'slug: singlecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves only one row from the result. Result must be one row (e.g. using limit), otherwise this will result in an error.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,33 +25,14 @@ final res = await supabase.execute();```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,7 +48,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-createbucket.mdx b/apps/reference/_supabase_dart/storage-createbucket.mdxindex 9387f42f204..cb098913e60 100644--- a/apps/reference/_supabase_dart/storage-createbucket.mdx+++ b/apps/reference/_supabase_dart/storage-createbucket.mdx@@ -1,16 +1,15 @@---id: storage-createbucket-title: "createBucket()"+title: 'createBucket()'slug: storage-createbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new Storage bucket-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,36 +23,20 @@ final res = await supabase.createBucket('avatars');```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: `insert`+ - `buckets` permissions: `insert`- `objects` permissions: none---------## Examples### Create bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,7 +50,6 @@ final res = await supabase.createBucket('avatars');```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-deletebucket.mdx b/apps/reference/_supabase_dart/storage-deletebucket.mdxindex c4e0ea96b50..439040d4d06 100644--- a/apps/reference/_supabase_dart/storage-deletebucket.mdx+++ b/apps/reference/_supabase_dart/storage-deletebucket.mdx@@ -1,16 +1,15 @@---id: storage-deletebucket-title: "deleteBucket()"+title: 'deleteBucket()'slug: storage-deletebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first `empty()` the bucket.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,36 +23,20 @@ final res = await supabase.deleteBucket('avatars');```-</TabItem></Tabs>----## Notes- Policy permissions required:- `buckets` permissions: `select` and `delete`- `objects` permissions: none---------## Examples### Delete bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,7 +50,6 @@ final res = await supabase.deleteBucket('avatars');```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-emptybucket.mdx b/apps/reference/_supabase_dart/storage-emptybucket.mdxindex 74dda8e5615..63f7e76e684 100644--- a/apps/reference/_supabase_dart/storage-emptybucket.mdx+++ b/apps/reference/_supabase_dart/storage-emptybucket.mdx@@ -1,16 +1,15 @@---id: storage-emptybucket-title: "emptyBucket()"+title: 'emptyBucket()'slug: storage-emptybucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Removes all objects inside a single bucket.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,36 +23,20 @@ final res = await supabase.emptyBucket('avatars');```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: `select` and `delete`---------## Examples### Empty bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,7 +50,6 @@ final res = await supabase.emptyBucket('avatars');```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-createsignedurl.mdx b/apps/reference/_supabase_dart/storage-from-createsignedurl.mdxindex 377b4e163b8..ea825e73b67 100644--- a/apps/reference/_supabase_dart/storage-from-createsignedurl.mdx+++ b/apps/reference/_supabase_dart/storage-from-createsignedurl.mdx@@ -1,16 +1,15 @@---id: storage-from-createsignedurl-title: "from.createSignedUrl()"+title: 'from.createSignedUrl()'slug: storage-from-createsignedurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Create signed url to download file without requiring permissions. This URL can be valid for a set number of seconds.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -27,36 +26,20 @@ final res = await supabasefinal signedURL = res.data;```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Create Signed URL--<TabsdefaultValue="dart"groupId="reference/dart"@@ -73,7 +56,6 @@ final res = await supabasefinal signedURL = res.data;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-download.mdx b/apps/reference/_supabase_dart/storage-from-download.mdxindex 1c2ee1926fa..21efe3fa761 100644--- a/apps/reference/_supabase_dart/storage-from-download.mdx+++ b/apps/reference/_supabase_dart/storage-from-download.mdx@@ -1,16 +1,15 @@---id: storage-from-download-title: "from.download()"+title: 'from.download()'slug: storage-from-downloadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Downloads a file.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,36 +24,20 @@ final res = await supabase.download('avatar1.png');```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Download file--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,7 +52,6 @@ final res = await supabase.download('avatar1.png');```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-getpublicurl.mdx b/apps/reference/_supabase_dart/storage-from-getpublicurl.mdxindex c75e36be61e..fa69f113dfb 100644--- a/apps/reference/_supabase_dart/storage-from-getpublicurl.mdx+++ b/apps/reference/_supabase_dart/storage-from-getpublicurl.mdx@@ -1,16 +1,15 @@---id: storage-from-getpublicurl-title: "from.getPublicUrl()"+title: 'from.getPublicUrl()'slug: storage-from-getpublicurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieve URLs for assets in public buckets-<TabsdefaultValue="dart"groupId="reference/dart"@@ -27,37 +26,21 @@ final res = supabasefinal publicURL = res.data;```-</TabItem></Tabs>----## Notes- The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.com](https://app.supabase.com), clicking the overflow menu on a bucket and choosing "Make public"- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: none---------## Examples### Returns the URL for an asset in a public bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -74,7 +57,6 @@ final res = supabasefinal publicURL = res.data;```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-list.mdx b/apps/reference/_supabase_dart/storage-from-list.mdxindex 8aac0be4e0c..bc1628f3f0d 100644--- a/apps/reference/_supabase_dart/storage-from-list.mdx+++ b/apps/reference/_supabase_dart/storage-from-list.mdx@@ -1,16 +1,15 @@---id: storage-from-list-title: "from.list()"+title: 'from.list()'slug: storage-from-listcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Lists all the files within a bucket.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,36 +24,20 @@ final res = await supabase.list();```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### List files in a bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,7 +52,6 @@ final res = await supabase.list();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-move.mdx b/apps/reference/_supabase_dart/storage-from-move.mdxindex d9becf49156..1e99ea4333a 100644--- a/apps/reference/_supabase_dart/storage-from-move.mdx+++ b/apps/reference/_supabase_dart/storage-from-move.mdx@@ -1,16 +1,15 @@---id: storage-from-move-title: "from.move()"+title: 'from.move()'slug: storage-from-movecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Moves an existing file, optionally renaming it at the same time.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,36 +24,20 @@ final res = await supabase.move('public/avatar1.png', 'private/avatar2.png');```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Move file--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,7 +52,6 @@ final res = await supabase.move('public/avatar1.png', 'private/avatar2.png');```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-remove.mdx b/apps/reference/_supabase_dart/storage-from-remove.mdxindex c0d41df9af9..bda14efba6d 100644--- a/apps/reference/_supabase_dart/storage-from-remove.mdx+++ b/apps/reference/_supabase_dart/storage-from-remove.mdx@@ -1,16 +1,15 @@---id: storage-from-remove-title: "from.remove()"+title: 'from.remove()'slug: storage-from-removecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes files within the same bucket-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,36 +24,20 @@ final res = await supabase.remove(['avatar1.png']);```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `delete` and `select`---------## Examples### Delete file--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,7 +52,6 @@ final res = await supabase.remove(['avatar1.png']);```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-update.mdx b/apps/reference/_supabase_dart/storage-from-update.mdxindex b184b8aa3b2..25b63e7c48e 100644--- a/apps/reference/_supabase_dart/storage-from-update.mdx+++ b/apps/reference/_supabase_dart/storage-from-update.mdx@@ -1,16 +1,15 @@---id: storage-from-update-title: "from.update()"+title: 'from.update()'slug: storage-from-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Replaces an existing file at the specified path with a new one.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -29,36 +28,20 @@ final res = await supabase));```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Update file--<TabsdefaultValue="dart"groupId="reference/dart"@@ -77,7 +60,6 @@ final res = await supabase));```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-from-upload.mdx b/apps/reference/_supabase_dart/storage-from-upload.mdxindex d5ab185be60..848418e88fd 100644--- a/apps/reference/_supabase_dart/storage-from-upload.mdx+++ b/apps/reference/_supabase_dart/storage-from-upload.mdx@@ -1,16 +1,15 @@---id: storage-from-upload-title: "from.upload()"+title: 'from.upload()'slug: storage-from-uploadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Uploads a file to an existing bucket.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -29,14 +28,12 @@ final res = await supabase));```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -59,7 +56,6 @@ The relative file path. Should be of the format `folder/subfolder/filename.png`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -80,7 +76,6 @@ The body of the file to be stored in the bucket.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -106,28 +101,16 @@ HTTP headers.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `insert`---------## Examples### Upload file--<TabsdefaultValue="dart"groupId="reference/dart"@@ -146,7 +129,6 @@ final res = await supabase));```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-getbucket.mdx b/apps/reference/_supabase_dart/storage-getbucket.mdxindex 2dcef67779c..93ab3362707 100644--- a/apps/reference/_supabase_dart/storage-getbucket.mdx+++ b/apps/reference/_supabase_dart/storage-getbucket.mdx@@ -1,16 +1,15 @@---id: storage-getbucket-title: "getBucket()"+title: 'getBucket()'slug: storage-getbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of an existing Storage bucket.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,14 +23,12 @@ final res = await supabase.getBucket('avatars')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,28 +53,16 @@ The unique identifier of the bucket you would like to retrieve.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### Get bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -91,7 +76,6 @@ final res = await supabase.getBucket('avatars')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-listbuckets.mdx b/apps/reference/_supabase_dart/storage-listbuckets.mdxindex b79aad2ff67..a0547136966 100644--- a/apps/reference/_supabase_dart/storage-listbuckets.mdx+++ b/apps/reference/_supabase_dart/storage-listbuckets.mdx@@ -1,16 +1,15 @@---id: storage-listbuckets-title: "listBuckets()"+title: 'listBuckets()'slug: storage-listbucketscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of all Storage buckets within an existing product.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,36 +23,20 @@ final res = await supabase.listBuckets()```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### List buckets--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,7 +50,6 @@ final res = await supabase.listBuckets()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/storage-updatebucket.mdx b/apps/reference/_supabase_dart/storage-updatebucket.mdxindex 47e1fc79a50..b6ee378907e 100644--- a/apps/reference/_supabase_dart/storage-updatebucket.mdx+++ b/apps/reference/_supabase_dart/storage-updatebucket.mdx@@ -1,16 +1,15 @@---id: storage-updatebucket-title: "updateBucket()"+title: 'updateBucket()'slug: storage-updatebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates a new Storage bucket-<TabsdefaultValue="dart"groupId="reference/dart"@@ -24,36 +23,20 @@ final res = await supabase.updateBucket('avatars', { public: false });```-</TabItem></Tabs>----## Notes- Policy permissions required:- `buckets` permissions: `update`- `objects` permissions: none---------## Examples### Update bucket--<TabsdefaultValue="dart"groupId="reference/dart"@@ -67,7 +50,6 @@ final res = await supabase.updateBucket('avatars', { public: false });```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/stream.mdx b/apps/reference/_supabase_dart/stream.mdxindex 1d103a76885..8af3aa103b3 100644--- a/apps/reference/_supabase_dart/stream.mdx+++ b/apps/reference/_supabase_dart/stream.mdx@@ -1,16 +1,15 @@---id: stream-title: "stream()"+title: 'stream()'slug: streamcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Notifies of data at the queried table.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,35 +24,19 @@ supabase.execute();```-</TabItem></Tabs>----## Notes- `stream()` will emit the initial data as well as any further change on the database as `Stream` of `List<Map<String, dynamic>>` by combining Postgrest and Realtime.- Takes a list of primary key columns as its argument.---------## Examples### Listening to a specific table--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,7 +51,6 @@ supabase.execute();```-</TabItem></Tabs>@@ -78,7 +60,6 @@ supabaseYou can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match.This syntax is the as how you can filter data in Realtime-<TabsdefaultValue="dart"groupId="reference/dart"@@ -93,15 +74,12 @@ supabase.execute();```-</TabItem></Tabs>### With `order()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -117,15 +95,12 @@ supabase.execute();```-</TabItem></Tabs>### With `limit()`--<TabsdefaultValue="dart"groupId="reference/dart"@@ -142,7 +117,6 @@ supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/subscribe.mdx b/apps/reference/_supabase_dart/subscribe.mdxindex a5cfbb66579..5f2f0c73819 100644--- a/apps/reference/_supabase_dart/subscribe.mdx+++ b/apps/reference/_supabase_dart/subscribe.mdx@@ -1,16 +1,15 @@---id: subscribe-title: "on().subscribe()"+title: 'on().subscribe()'slug: subscribecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Subscribe to realtime changes in your database.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -27,35 +26,19 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>----## Notes- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime).- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`---------## Examples### Listen to all database changes--<TabsdefaultValue="dart"groupId="reference/dart"@@ -72,15 +55,12 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>### Listening to a specific table--<TabsdefaultValue="dart"groupId="reference/dart"@@ -97,15 +77,12 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>### Listening to inserts--<TabsdefaultValue="dart"groupId="reference/dart"@@ -122,21 +99,19 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>### Listening to updates-By default, Supabase will send only the updated record. If you want to receive the previous values as well you can-enable full replication for the table you are listening too:+By default, Supabase will send only the updated record. If you want to receive the previous values as well you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-<TabsdefaultValue="dart"groupId="reference/dart"@@ -153,21 +128,19 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>### Listening to deletes-By default, Supabase does not send deleted records. If you want to receive the deleted record you can-enable full replication for the table you are listening too:+By default, Supabase does not send deleted records. If you want to receive the deleted record you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-<TabsdefaultValue="dart"groupId="reference/dart"@@ -184,7 +157,6 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>@@ -208,7 +180,6 @@ final mySubscription = supabase.subscribe();```-</TabItem></Tabs>@@ -231,7 +202,6 @@ final mySubscription = supabase.subscribe();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/textsearch.mdx b/apps/reference/_supabase_dart/textsearch.mdxindex ec605003ac6..499127f94c1 100644--- a/apps/reference/_supabase_dart/textsearch.mdx+++ b/apps/reference/_supabase_dart/textsearch.mdx@@ -1,40 +1,19 @@---id: textsearch-title: ".textSearch()"+title: '.textSearch()'slug: textsearchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose tsvector value on the stated `column` matches to_tsquery(query).-------------------## Examples### Text search--<TabsdefaultValue="dart"groupId="reference/dart"@@ -46,13 +25,12 @@ Finds all rows whose tsvector value on the stated `column` matches to_tsquery(qufinal res = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', "'fat' & 'cat'",- config: 'english'+ .textSearch('catchphrase', "'fat' & 'cat'",+ config: 'english').execute();```-</TabItem></Tabs>@@ -72,14 +50,13 @@ Uses PostgreSQL's `plainto_tsquery` function.final res = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', "'fat' & 'cat'",+ .textSearch('catchphrase', "'fat' & 'cat'",type: TextSearchType.plain,- config: 'english'+ config: 'english').execute();```-</TabItem></Tabs>@@ -99,22 +76,21 @@ Uses PostgreSQL's `phraseto_tsquery` function.final res = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', "'fat' & 'cat'",+ .textSearch('catchphrase', "'fat' & 'cat'",type: TextSearchType.phrase,- config: 'english'+ config: 'english').execute();```-</TabItem></Tabs>### Full normalization-Uses PostgreSQL's `websearch_to_tsquery` function.-This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used+Uses PostgreSQL's `websearch_to_tsquery` function.+This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be usedwith advanced operators.- `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.@@ -122,7 +98,6 @@ with advanced operators.- `OR`: the word “or” will be converted to the | operator.- `-`: a dash will be converted to the ! operator.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -134,14 +109,13 @@ with advanced operators.final res = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', "'fat or cat'",+ .textSearch('catchphrase', "'fat or cat'",type: TextSearchType.websearch,config: 'english').execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/update.mdx b/apps/reference/_supabase_dart/update.mdxindex b67156e93ef..e7071cafa1a 100644--- a/apps/reference/_supabase_dart/update.mdx+++ b/apps/reference/_supabase_dart/update.mdx@@ -1,16 +1,15 @@---id: update-title: "Modify data: update()"+title: 'Modify data: update()'slug: updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPDATE on the table.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -26,34 +25,18 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes- `update()` should always be combined with [Filters](/docs/reference/dart/using-filters) to target the item(s) you wish to update.---------## Examples### Updating your data--<TabsdefaultValue="dart"groupId="reference/dart"@@ -69,19 +52,17 @@ final res = await supabase.execute();```-</TabItem></Tabs>### Updating JSON data-Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for working with JSON data. Right now it is only possible to update an entire JSON document,+Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for working with JSON data. Right now it is only possible to update an entire JSON document,but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -93,7 +74,7 @@ but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465)final res = await supabase.from('users').update({- 'address': {+ 'address': {'street': 'Melrose Place','postcode': 90210}@@ -102,7 +83,6 @@ final res = await supabase.execute();```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/upsert.mdx b/apps/reference/_supabase_dart/upsert.mdxindex 0d599b66f12..22b4faa6456 100644--- a/apps/reference/_supabase_dart/upsert.mdx+++ b/apps/reference/_supabase_dart/upsert.mdx@@ -1,16 +1,15 @@---id: upsert-title: "Upsert data: upsert()"+title: 'Upsert data: upsert()'slug: upsertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPSERT into the table.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -25,35 +24,19 @@ final res = await supabase.execute();```-</TabItem></Tabs>----## Notes-- Primary keys should be included in the data payload in order for an update to work correctly.+- Primary keys should be included in the data payload in order for an update to work correctly.- Primary keys must be natural, not surrogate. There are however, [workarounds](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.---------## Examples### Upsert your data--<TabsdefaultValue="dart"groupId="reference/dart"@@ -68,18 +51,16 @@ final res = await supabase.execute();```-</TabItem></Tabs>### Upserting into tables with constraints-Running the following will cause supabase to upsert data into the `users` table.-If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that row+Running the following will cause supabase to upsert data into the `users` table.+If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that rowbased on the column passed into `onConflict`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -94,7 +75,6 @@ final res = await supabase.execute();```-</TabItem></Tabs>@@ -103,7 +83,6 @@ final res = await supabaseAllowed values for count option are `exact`, `planned` and `estimated`.-<TabsdefaultValue="dart"groupId="reference/dart"@@ -114,15 +93,14 @@ Allowed values for count option are `exact`, `planned` and `estimated`.```dartfinal res = await supabase.from('users')- .upsert({+ .upsert({'id': 3,- 'message': 'foo',- 'username': 'supabot'+ 'message': 'foo',+ 'username': 'supabot'}).execute(count: CountOption.exact);```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_dart/using-filters.mdx b/apps/reference/_supabase_dart/using-filters.mdxindex cd06fc27708..e486fbb77c1 100644--- a/apps/reference/_supabase_dart/using-filters.mdx+++ b/apps/reference/_supabase_dart/using-filters.mdx@@ -1,14 +1,14 @@---id: using-filters-title: "Using Filters"+title: 'Using Filters'slug: using-filterscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Filters can be used on `select()`, `update()`, and `delete()` queries.+Filters can be used on `select()`, `update()`, and `delete()` queries.If a Stored Procedure returns a table response, you can also apply filters.@@ -41,4 +41,4 @@ final res = await supabase.gte('population', 1000).lt('population', 10000).execute();-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_dart/using-modifiers.mdx b/apps/reference/_supabase_dart/using-modifiers.mdxindex 4335f600b6d..9b0689e7b80 100644--- a/apps/reference/_supabase_dart/using-modifiers.mdx+++ b/apps/reference/_supabase_dart/using-modifiers.mdx@@ -1,13 +1,13 @@---id: using-modifiers-title: "Using Modifiers"+title: 'Using Modifiers'slug: using-modifierscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/dart.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Modifiers can be used on `select()` queries.+Modifiers can be used on `select()` queries.-If a Stored Procedure returns a table response, you can also apply modifiers to the `rpc()` function.\ No newline at end of file+If a Stored Procedure returns a table response, you can also apply modifiers to the `rpc()` function.diff --git a/apps/reference/_supabase_js/initializing.mdx b/apps/reference/_supabase_js/initializing.mdxindex b6844ce57aa..f921020d8f0 100644--- a/apps/reference/_supabase_js/initializing.mdx+++ b/apps/reference/_supabase_js/initializing.mdx@@ -1,24 +1,20 @@---id: initializing-title: "Initializing"+title: 'Initializing'slug: initializingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'You can initialize a new Supabase client using the `createClient()` method.The Supabase client is your entrypoint to the rest of the Supabase functionalityand is the easiest way to interact with everything we offer within the Supabase ecosystem.---## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -41,7 +37,6 @@ The unique Supabase URL which is supplied when you create a new project in your</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -62,7 +57,6 @@ The unique Supabase Key which is supplied when you create a new project in your</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,7 +71,7 @@ The unique Supabase Key which is supplied when you create a new project in your</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -85,25 +79,10 @@ No description provided.</ul>-------------## Examples### createClient()--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -114,19 +93,19 @@ No description provided.```jsimport { createClient } from '@supabase/supabase-js'-// Create a single supabase client for interacting with your database-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')+// Create a single supabase client for interacting with your database+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key'+)```-</TabItem></Tabs>### With additional parameters--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -142,20 +121,21 @@ const options = {headers: { 'x-my-custom-header': 'my-app-name' },autoRefreshToken: true,persistSession: true,- detectSessionInUrl: true+ detectSessionInUrl: true,}-const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", options)+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ options+)```-</TabItem></Tabs>### API schemas--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -167,25 +147,26 @@ const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-keyimport { createClient } from '@supabase/supabase-js'// Provide a custom schema. Defaults to "public".-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {- schema: 'other_schema'-})+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ {+ schema: 'other_schema',+ }+)```-By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.+By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.Go to `Settings > API > Schema` and add the schema which you want to expose to the API.Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema.-</TabItem></Tabs>### Custom `fetch` implementation--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -196,16 +177,19 @@ Note: each client connection can only access a single schema, so the code above```jsimport { createClient } from '@supabase/supabase-js'-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {- fetch: fetch.bind(globalThis)-})+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ {+ fetch: fetch.bind(globalThis),+ }+)```-`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,-but an alternative `fetch` implementation can be provided as an option.+`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,+but an alternative `fetch` implementation can be provided as an option.This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers).-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js/installing.mdx b/apps/reference/_supabase_js/installing.mdxindex cb6372c7d8b..960bac4e30f 100644--- a/apps/reference/_supabase_js/installing.mdx+++ b/apps/reference/_supabase_js/installing.mdx@@ -1,34 +1,37 @@---id: installing-title: "Installing"+title: 'Installing'slug: installingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-All JavaScript libraries are built directly by the Supabase team.+All JavaScript libraries are built directly by the Supabase team.Other languages are built by the community and supported by Supabase.## JavaScriptVia NPM+```bashnpm install @supabase/supabase-js```Via Yarn+```bashyarn add @supabase/supabase-js```-Find the source code on [GitHub](https://github.com/supabase/supabase-js).+Find the source code on [GitHub](https://github.com/supabase/supabase-js).Or via CDN+```js<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>//or<script src="https://unpkg.com/@supabase/supabase-js"></script>-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-createuser.mdx b/apps/reference/_supabase_js/sdk/auth-api-createuser.mdxindex 5c3a58ba987..8b7a1149efb 100644--- a/apps/reference/_supabase_js/sdk/auth-api-createuser.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-createuser.mdx@@ -1,12 +1,12 @@---id: auth-api-createuser-title: "createUser()"+title: 'createUser()'slug: /auth-api-createusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new user.@@ -16,14 +16,12 @@ This function should only be called on a server. Never expose your `service_roleconst { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',password: 'password',- user_metadata: { name: 'Yoda' }+ user_metadata: { name: 'Yoda' },})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,54 +46,38 @@ The data you want to create the user with.</ul>-## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.- If you do not provide the `email_confirm` and `phone_confirm` options to this function, both will default to false.---------## Examples### Create a new user.--```jsconst { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',password: 'password',- user_metadata: { name: 'Yoda' }+ user_metadata: { name: 'Yoda' },})```### Auto-confirm email.--```jsconst { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',- email_confirm: true+ email_confirm: true,})```### Auto-confirm phone.--```jsconst { data: user, error } = await supabase.auth.api.createUser({phone: '1234567890',- phone_confirm: true+ phone_confirm: true,})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-deleteuser.mdx b/apps/reference/_supabase_js/sdk/auth-api-deleteuser.mdxindex 6b5775e6183..12ff527f317 100644--- a/apps/reference/_supabase_js/sdk/auth-api-deleteuser.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-deleteuser.mdx@@ -1,12 +1,12 @@---id: auth-api-deleteuser-title: "deleteUser()"+title: 'deleteUser()'slug: /auth-api-deleteusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Delete a user. Requires a `service_role` key.@@ -18,10 +18,8 @@ const { data: user, error } = await supabase.auth.api.deleteUser()```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -46,29 +44,17 @@ The user uid you want to remove.</ul>-## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Remove a user completely.--```jsconst { data: user, error } = await supabase.auth.api.deleteUser('715ed5db-f090-4b8c-a067-640ecee36aa0')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-generatelink.mdx b/apps/reference/_supabase_js/sdk/auth-api-generatelink.mdxindex 3f276354568..92a755a813e 100644--- a/apps/reference/_supabase_js/sdk/auth-api-generatelink.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-generatelink.mdx@@ -1,20 +1,17 @@---id: auth-api-generatelink-title: "generateLink()"+title: 'generateLink()'slug: /auth-api-generatelinkcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Generates links to be sent via email or other.--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The link type ("signup" or "magiclink" or "recovery" or "invite").</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +54,6 @@ The user's email.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -73,7 +68,7 @@ The user's email.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -94,13 +89,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -115,13 +109,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -136,7 +129,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -148,30 +141,18 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Generate invite link.--```jsconst { data: user, error } = await supabase.auth.api.generateLink('invite',)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-getuser.mdx b/apps/reference/_supabase_js/sdk/auth-api-getuser.mdxindex 1752d24e297..235055ad277 100644--- a/apps/reference/_supabase_js/sdk/auth-api-getuser.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-getuser.mdx@@ -1,12 +1,12 @@---id: auth-api-getuser-title: "getUser()"+title: 'getUser()'slug: /auth-api-getusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Gets the current user details.@@ -15,15 +15,11 @@ the jwt is set to this.currentSession.access_tokenand therefore, acts like getting the currently authenticated user```js-const { user, error } = await supabase.auth.api.getUser(- 'ACCESS_TOKEN_JWT',-)+const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,30 +44,16 @@ A valid, logged-in JWT. Typically, the access_token for the currentSession</ul>-## Notes- Fetches the user object from the database instead of local storage.- Note that user() fetches the user object from local storage which might not be the most updated.- Requires the user's access_token.---------## Examples### Fetch the user object using the access_token jwt.--```js-const { user, error } = await supabase.auth.api.getUser(- 'ACCESS_TOKEN_JWT',-)-```\ No newline at end of file+const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-inviteuserbyemail.mdx b/apps/reference/_supabase_js/sdk/auth-api-inviteuserbyemail.mdxindex ebb638f20b2..26e32e2c3a2 100644--- a/apps/reference/_supabase_js/sdk/auth-api-inviteuserbyemail.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-inviteuserbyemail.mdx@@ -1,20 +1,17 @@---id: auth-api-inviteuserbyemail-title: "inviteUserByEmail()"+title: 'inviteUserByEmail()'slug: /auth-api-inviteuserbyemailcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends an invite link to an email address.--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The email address of the user.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -52,7 +48,7 @@ The email address of the user.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -73,13 +69,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,7 +89,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -106,29 +101,17 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Basic example.--```js-const { data: user, error } = await supabase.auth- .api- .inviteUserByEmail('[email protected]')-```\ No newline at end of file+const { data: user, error } = await supabase.auth.api.inviteUserByEmail(+)+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-listusers.mdx b/apps/reference/_supabase_js/sdk/auth-api-listusers.mdxindex 76e74758cf5..b9318d5d854 100644--- a/apps/reference/_supabase_js/sdk/auth-api-listusers.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-listusers.mdx@@ -1,12 +1,12 @@---id: auth-api-listusers-title: "listUsers()"+title: 'listUsers()'slug: /auth-api-listuserscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Get a list of users.@@ -16,31 +16,15 @@ This function should only be called on a server. Never expose your `service_roleconst { data: user, error } = await supabase.auth.api.listUsers()```-----## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Get a full list of users.--```jsconst { data: user, error } = await supabase.auth.api.listUsers()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-resetpasswordforemail.mdx b/apps/reference/_supabase_js/sdk/auth-api-resetpasswordforemail.mdxindex d0cd8ccd63d..84363170606 100644--- a/apps/reference/_supabase_js/sdk/auth-api-resetpasswordforemail.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-resetpasswordforemail.mdx@@ -1,24 +1,23 @@---id: auth-api-resetpasswordforemail-title: "resetPasswordForEmail()"+title: 'resetPasswordForEmail()'slug: /auth-api-resetpasswordforemailcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends a reset request to an email address.```js-const { data, error } = await supabase.auth.api- .resetPasswordForEmail('[email protected]')+const { data, error } = await supabase.auth.api.resetPasswordForEmail(+)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -41,7 +40,6 @@ The email address of the user.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -56,7 +54,7 @@ The email address of the user.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -77,13 +75,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -98,7 +95,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -110,7 +107,6 @@ No description provided.</ul>-## NotesSends a reset request to an email address.@@ -124,26 +120,17 @@ Your app must detect `type=recovery` in the fragment and display a password reseYou should then use the access_token in the url and new password to update the user as follows:```js-const { error, data } = await supabase.auth.api- .updateUser(access_token, { password : new_password })+const { error, data } = await supabase.auth.api.updateUser(access_token, {+ password: new_password,+})```---------## Examples### Reset password--```js-const { data, error } = await supabase.auth.api- .resetPasswordForEmail('[email protected]')-```\ No newline at end of file+const { data, error } = await supabase.auth.api.resetPasswordForEmail(+)+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-sendmobileotp.mdx b/apps/reference/_supabase_js/sdk/auth-api-sendmobileotp.mdxindex cd5a67c4f6c..9e4f6b6b4a3 100644--- a/apps/reference/_supabase_js/sdk/auth-api-sendmobileotp.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-sendmobileotp.mdx@@ -1,20 +1,17 @@---id: auth-api-sendmobileotp-title: "sendMobileOTP()"+title: 'sendMobileOTP()'slug: /auth-api-sendmobileotpcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends a mobile OTP via SMS. Will register the account if it doesn't already exist--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The user's phone number WITH international prefix</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -52,7 +48,7 @@ The user's phone number WITH international prefix</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -73,13 +69,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,7 +89,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -106,29 +101,15 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Basic example.--```js-const { data: user, error } = await supabase.auth- .api- .sendMobileOTP('12345879')-```\ No newline at end of file+const { data: user, error } = await supabase.auth.api.sendMobileOTP('12345879')+```diff --git a/apps/reference/_supabase_js/sdk/auth-api-updateuserbyid.mdx b/apps/reference/_supabase_js/sdk/auth-api-updateuserbyid.mdxindex 8834cda84b6..75129556236 100644--- a/apps/reference/_supabase_js/sdk/auth-api-updateuserbyid.mdx+++ b/apps/reference/_supabase_js/sdk/auth-api-updateuserbyid.mdx@@ -1,12 +1,12 @@---id: auth-api-updateuserbyid-title: "updateUserById()"+title: 'updateUserById()'slug: /auth-api-updateuserbyidcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates the user data.@@ -17,10 +17,8 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,13 +35,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById(</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,27 +65,15 @@ This function should only be called on a server. Never expose your `service_role</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Updates a user's email.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',@@ -98,8 +83,6 @@ const { data: user, error } = await supabase.auth.api.updateUserById(### Updates a user's password.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',@@ -109,8 +92,6 @@ const { data: user, error } = await supabase.auth.api.updateUserById(### Updates a user's metadata.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',@@ -120,8 +101,6 @@ const { data: user, error } = await supabase.auth.api.updateUserById(### Updates a user's app_metadata.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',@@ -131,8 +110,6 @@ const { data: user, error } = await supabase.auth.api.updateUserById(### Confirms a user's email address.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',@@ -142,11 +119,9 @@ const { data: user, error } = await supabase.auth.api.updateUserById(### Confirms a user's phone number.--```jsconst { data: user, error } = await supabase.auth.api.updateUserById('6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',{ phone_confirm: true })-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-onauthstatechange.mdx b/apps/reference/_supabase_js/sdk/auth-onauthstatechange.mdxindex 1a8ffa10d9d..f102c5b9680 100644--- a/apps/reference/_supabase_js/sdk/auth-onauthstatechange.mdx+++ b/apps/reference/_supabase_js/sdk/auth-onauthstatechange.mdx@@ -1,12 +1,12 @@---id: auth-onauthstatechange-title: "onAuthStateChange()"+title: 'onAuthStateChange()'slug: /auth-onauthstatechangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Receive a notification every time an auth event happens.@@ -16,10 +16,8 @@ supabase.auth.onAuthStateChange((event, session) => {})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -36,7 +34,7 @@ supabase.auth.onAuthStateChange((event, session) => {</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -44,25 +42,10 @@ No description provided.</ul>-------------## Examples### Listen to auth changes--```jssupabase.auth.onAuthStateChange((event, session) => {console.log(event, session)@@ -71,8 +54,6 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to sign in--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'SIGNED_IN') console.log('SIGNED_IN', session)@@ -81,8 +62,6 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to sign out--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'SIGNED_OUT') console.log('SIGNED_OUT', session)@@ -91,8 +70,6 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to token refresh--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'TOKEN_REFRESHED') console.log('TOKEN_REFRESHED', session)@@ -101,8 +78,6 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to user updates--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'USER_UPDATED') console.log('USER_UPDATED', session)@@ -111,8 +86,6 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to user deleted--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'USER_DELETED') console.log('USER_DELETED', session)@@ -121,10 +94,8 @@ supabase.auth.onAuthStateChange((event, session) => {### Listen to password recovery events--```jssupabase.auth.onAuthStateChange((event, session) => {if (event == 'PASSWORD_RECOVERY') console.log('PASSWORD_RECOVERY', session)})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-session.mdx b/apps/reference/_supabase_js/sdk/auth-session.mdxindex 672fe9660f3..65bd9a57241 100644--- a/apps/reference/_supabase_js/sdk/auth-session.mdx+++ b/apps/reference/_supabase_js/sdk/auth-session.mdx@@ -1,12 +1,12 @@---id: auth-session-title: "session()"+title: 'session()'slug: /auth-sessioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns the session data, if there is an active session.@@ -14,29 +14,10 @@ Returns the session data, if there is an active session.const session = supabase.auth.session()```-----------------## Examples### Get the session data--```jsconst session = supabase.auth.session()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-setauth.mdx b/apps/reference/_supabase_js/sdk/auth-setauth.mdxindex 2ac19039419..c0d03e8a82f 100644--- a/apps/reference/_supabase_js/sdk/auth-setauth.mdx+++ b/apps/reference/_supabase_js/sdk/auth-setauth.mdx@@ -1,21 +1,21 @@---id: auth-setauth-title: "setAuth()"+title: 'setAuth()'slug: /auth-setauthcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests.```jsfunction apiFunction(req, res) {// Assuming the access token was sent as a header "X-Supabase-Auth"- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client+ // You can now use it within a Supabase Clientconst supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")const { user, error } = supabase.auth.setAuth(access_token)@@ -24,10 +24,8 @@ function apiFunction(req, res) {}```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -52,19 +50,6 @@ a jwt access token</ul>-------------## Examples### Basic example.@@ -74,9 +59,9 @@ This is most useful on server-side functions where you cannot log the user in, b```jsfunction apiFunction(req, res) {// Assuming the access token was sent as a header "X-Supabase-Auth"- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client+ // You can now use it within a Supabase Clientconst supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")const { user, error } = supabase.auth.setAuth(access_token)@@ -87,39 +72,39 @@ function apiFunction(req, res) {### With Express.--```js-/**-* Make a request from the client to your server function-*/+ * Make a request from the client to your server function+ */async function makeApiRequest() {const token = newClient.session()?.access_tokenawait fetch('https://example.com/withAuth', {- method: 'GET',- withCredentials: true,- credentials: 'include',- headers: {+ method: 'GET',+ withCredentials: true,+ credentials: 'include',+ headers: {'Content-Type': 'application/json',- 'Authorization': bearer, // Your own auth+ Authorization: bearer, // Your own auth'X-Supabase-Auth': token, // Set the Supabase user- }+ },})}/**-* Use the Auth token in your server-side function.-*/+ * Use the Auth token in your server-side function.+ */async function apiFunction(req, res) {- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client- const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")+ // You can now use it within a Supabase Client+ const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key'+ )const { user, error } = supabase.auth.setAuth(access_token)// This client will now send requests as this userconst { data } = await supabase.from('your_table').select()}-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-signin.mdx b/apps/reference/_supabase_js/sdk/auth-signin.mdxindex 5895529482d..1d4c5b197f4 100644--- a/apps/reference/_supabase_js/sdk/auth-signin.mdx+++ b/apps/reference/_supabase_js/sdk/auth-signin.mdx@@ -1,12 +1,12 @@---id: auth-signin-title: "signIn()"+title: 'signIn()'slug: /auth-signincustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Log in an existing user, or login via a third-party provider.@@ -17,10 +17,8 @@ const { user, session, error } = await supabase.auth.signIn({})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,13 +35,12 @@ const { user, session, error } = await supabase.auth.signIn({</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -79,13 +76,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -100,13 +96,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -121,13 +116,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -142,13 +136,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -163,7 +156,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -175,7 +168,6 @@ No description provided.</ul>-## Notes- A user can sign up either via email or OAuth.@@ -183,21 +175,10 @@ No description provided.- The magic link's destination URL is determined by the SITE_URL config variable. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)- Specifying a `provider` will open the browser to the relevant login page.---------## Examples### Sign in with email.--```jsconst { user, session, error } = await supabase.auth.signIn({email: '[email protected]',@@ -211,7 +192,7 @@ If no password is provided, the user will be sent a "magic link" to their email```jsconst { user, session, error } = await supabase.auth.signIn({- email: '[email protected]'+ email: '[email protected]',})```@@ -222,7 +203,7 @@ Supabase supports many different [third-party providers](https://supabase.com/do```jsconst { user, session, error } = await supabase.auth.signIn({// provider can be 'github', 'google', 'gitlab', and more- provider: 'github'+ provider: 'github',})```@@ -239,19 +220,21 @@ const { user, session, error } = await supabase.auth.signIn({### Sign in with redirect.-Note that the `redirectTo` param is only relevant for OAuth logins, where the login flow is managed by+Note that the `redirectTo` param is only relevant for OAuth logins, where the login flow is managed bythe Auth server. If you are using email/phone logins you should set up your own redirects (within the email/sms template).--Sometimes you want to control where the user is redirected to after they are logged in. Supabase supports this for-any URL path on your website (the URL must either be on the same domain as your Site URL [see Auth>Settings in dashboard], or must match one of the Additional Redirect URLs [also in Auth>Settings]).+Sometimes you want to control where the user is redirected to after they are logged in. Supabase supports this for+any URL path on your website (the URL must either be on the same domain as your Site URL [see Auth>Settings in dashboard], or must match one of the Additional Redirect URLs [also in Auth>Settings]).```js-const { user, session, error } = await supabase.auth.signIn({- provider: 'github'-}, {- redirectTo: 'https://example.com/welcome'-})+const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'github',+ },+ {+ redirectTo: 'https://example.com/welcome',+ }+)```### Sign in with scopes.@@ -259,13 +242,15 @@ const { user, session, error } = await supabase.auth.signIn({If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token.You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider.-```js-const { user, session, error } = await supabase.auth.signIn({- provider: 'github'-}, {- scopes: 'repo gist notifications'-})+const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'github',+ },+ {+ scopes: 'repo gist notifications',+ }+)const oAuthToken = session.provider_token // use to access provider API```@@ -273,19 +258,18 @@ const oAuthToken = session.provider_token // use to access provider APIIf you are completing a sign up or login in a React Native app you can pass the refresh token obtained from the provider to obtain a session.-```js// An example using Expo's `AuthSession`-const redirectUri = AuthSession.makeRedirectUri({ useProxy: false });-const provider = 'google';+const redirectUri = AuthSession.makeRedirectUri({ useProxy: false })+const provider = 'google'AuthSession.startAsync({authUrl: `https://MYSUPABASEAPP.supabase.co/auth/v1/authorize?provider=${provider}&redirect_to=${redirectUri}`,returnUrl: redirectUri,}).then(async (response: any) => {- if (!response) return;+ if (!response) returnconst { user, session, error } = await supabase.auth.signIn({refreshToken: response.params?.refresh_token,- });-});-```\ No newline at end of file+ })+})+```diff --git a/apps/reference/_supabase_js/sdk/auth-signout.mdx b/apps/reference/_supabase_js/sdk/auth-signout.mdxindex 1c625761128..ffe27f139f2 100644--- a/apps/reference/_supabase_js/sdk/auth-signout.mdx+++ b/apps/reference/_supabase_js/sdk/auth-signout.mdx@@ -1,12 +1,12 @@---id: auth-signout-title: "signOut()"+title: 'signOut()'slug: /auth-signoutcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Inside a browser context, `signOut()` will remove the logged in user from the browser sessionand log them out - removing all items from localstorage and then trigger a "SIGNED_OUT" event.@@ -17,29 +17,10 @@ For server-side management, you can revoke all refresh tokens for a user by passconst { error } = await supabase.auth.signOut()```-----------------## Examples### Sign out--```jsconst { error } = await supabase.auth.signOut()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-signup.mdx b/apps/reference/_supabase_js/sdk/auth-signup.mdxindex 3d981b92162..f587ddc1b63 100644--- a/apps/reference/_supabase_js/sdk/auth-signup.mdx+++ b/apps/reference/_supabase_js/sdk/auth-signup.mdx@@ -1,12 +1,12 @@---id: auth-signup-title: "signUp()"+title: 'signUp()'slug: /auth-signupcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new user.@@ -17,10 +17,8 @@ const { user, session, error } = await supabase.auth.signUp({})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,13 +35,12 @@ const { user, session, error } = await supabase.auth.signUp({</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -79,13 +76,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -100,13 +96,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -121,7 +116,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -133,7 +128,6 @@ No description provided.</ul>-## Notes- By default, the user will need to verify their email address before logging in. If you would like to change this, you can disable "Email Confirmations" by going to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)@@ -141,25 +135,14 @@ No description provided.- If "Email Confirmations" is turned off, both a `user` and a `session` will be returned- When the user confirms their email address, they will be redirected to localhost:3000 by default. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)- If signUp() is called for an existing confirmed user:- - If "Enable email confirmations" is enabled on the "Authentication" -> "Settings" page, an obfuscated / fake user object will be returned.- - If "Enable email confirmations" is disabled, an error with a message "User already registered" will be returned.+ - If "Enable email confirmations" is enabled on the "Authentication" -> "Settings" page, an obfuscated / fake user object will be returned.+ - If "Enable email confirmations" is disabled, an error with a message "User already registered" will be returned.- To check if a user already exists, refer to getUser().---------## Examples### Sign up.--```jsconst { user, session, error } = await supabase.auth.signUp({email: '[email protected]',@@ -169,8 +152,6 @@ const { user, session, error } = await supabase.auth.signUp({### Sign up with additional user meta data.--```jsconst { user, session, error } = await supabase.auth.signUp({@@ -178,10 +159,10 @@ const { user, session, error } = await supabase.auth.signUp(password: 'example-password',},{- data: {- first_name: 'John',+ data: {+ first_name: 'John',age: 27,- }+ },})```@@ -194,7 +175,6 @@ You can sign up with OAuth providers using the [`signIn()`](/docs/reference/javaSupabase supports Phone Auth. After a user has verified their number, they can use the [`signIn()`](/docs/reference/javascript/auth-signin#sign-in-using-phone) method.-```jsconst { user, session, error } = await supabase.auth.signUp({phone: '+13334445555',@@ -206,4 +186,4 @@ let { session, error } = await supabase.auth.verifyOTP({phone: '+13334445555',token: '123456',})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-update.mdx b/apps/reference/_supabase_js/sdk/auth-update.mdxindex 0fe4703e299..4ceb5f7e6e9 100644--- a/apps/reference/_supabase_js/sdk/auth-update.mdx+++ b/apps/reference/_supabase_js/sdk/auth-update.mdx@@ -1,23 +1,21 @@---id: auth-update-title: "update()"+title: 'update()'slug: /auth-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates user data, if there is a logged in user.```js-const { user, error } = await supabase.auth.update({email: '[email protected]'})+const { user, error } = await supabase.auth.update({ email: '[email protected]' })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -34,7 +32,7 @@ const { user, error } = await supabase.auth.update({email: '[email protected]'})</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -42,25 +40,14 @@ No description provided.</ul>-## NotesUser email: Email updates will send an email to both the user's current and new email with a confirmation link by default.To toggle this behavior off and only send a single confirmation link to the new email, toggle "Double confirm email changes" under "Authentication" -> "Settings" off.--User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).+User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).Use the `update()` method if you have data which rarely changes or is specific only to the logged in user.---------## Examples### Update email for authenticated user.@@ -68,23 +55,19 @@ Use the `update()` method if you have data which rarely changes or is specific oSends a "Confirm Email Change" email to the new email address.```js-const { user, error } = await supabase.auth.update({email: '[email protected]'})+const { user, error } = await supabase.auth.update({ email: '[email protected]' })```### Update password for authenticated user.--```js-const { user, error } = await supabase.auth.update({password: 'new password'})+const { user, error } = await supabase.auth.update({ password: 'new password' })```### Update a user's metadata.--```js-const { user, error } = await supabase.auth.update({- data: { hello: 'world' }+const { user, error } = await supabase.auth.update({+ data: { hello: 'world' },})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/auth-user.mdx b/apps/reference/_supabase_js/sdk/auth-user.mdxindex d98ca381f8d..1f0bda9417a 100644--- a/apps/reference/_supabase_js/sdk/auth-user.mdx+++ b/apps/reference/_supabase_js/sdk/auth-user.mdx@@ -1,12 +1,12 @@---id: auth-user-title: "user()"+title: 'user()'slug: /auth-usercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Inside a browser context, `user()` will return the user data, if there is a logged in user.@@ -16,30 +16,14 @@ For server-side management, you can get a user through `auth.api.getUserByCookieconst user = supabase.auth.user()```-----## NotesThis method gets the user object from memory.---------## Examples### Get the logged in user--```jsconst user = supabase.auth.user()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/containedby.mdx b/apps/reference/_supabase_js/sdk/containedby.mdxindex 52bc8940214..b58a3271632 100644--- a/apps/reference/_supabase_js/sdk/containedby.mdx+++ b/apps/reference/_supabase_js/sdk/containedby.mdx@@ -1,14 +1,12 @@---id: containedby-title: ".containedBy()"+title: '.containedBy()'slug: /containedbycustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,11 +15,6 @@ const { data, error } = await supabase.containedBy('main_exports', ['cars', 'food', 'machine'])```-----## Notes- `.containedBy()` can work on array columns or range columns.@@ -33,21 +26,10 @@ const { data, error } = await supabase.containedBy('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -57,8 +39,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -68,8 +48,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -79,11 +57,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').containedBy('main_exports', ['cars', 'food', 'machine'])-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/contains.mdx b/apps/reference/_supabase_js/sdk/contains.mdxindex d983747a20c..1203d6ad3ed 100644--- a/apps/reference/_supabase_js/sdk/contains.mdx+++ b/apps/reference/_supabase_js/sdk/contains.mdx@@ -1,14 +1,12 @@---id: contains-title: ".contains()"+title: '.contains()'slug: /containscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,11 +15,6 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-----## Notes- `.contains()` can work on array columns or range columns.@@ -34,21 +27,10 @@ const { data, error } = await supabase.contains('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -58,8 +40,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -69,8 +49,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -80,11 +58,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').contains('main_exports', ['oil'])-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/delete.mdx b/apps/reference/_supabase_js/sdk/delete.mdxindex 0453d4b1e87..c63b41b8e30 100644--- a/apps/reference/_supabase_js/sdk/delete.mdx+++ b/apps/reference/_supabase_js/sdk/delete.mdx@@ -1,12 +1,12 @@---id: delete-title: "Delete data: delete()"+title: 'Delete data: delete()'slug: /deletecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs a DELETE on the table.@@ -17,10 +17,8 @@ const { data, error } = await supabase.match({ id: 666 })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +35,7 @@ const { data, error } = await supabase</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -64,7 +62,6 @@ If `true`, return the deleted row(s) in the response.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -91,7 +88,6 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete.@@ -101,24 +97,13 @@ Count algorithm to use to count rows in a table.no rows are visible, so you need at least one `SELECT`/`ALL` policy thatmakes the rows visible.---------## Examples### Delete records--```jsconst { data, error } = await supabase.from('cities').delete().match({ id: 666 })-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/eq.mdx b/apps/reference/_supabase_js/sdk/eq.mdxindex 445f466fb4c..44e46e82900 100644--- a/apps/reference/_supabase_js/sdk/eq.mdx+++ b/apps/reference/_supabase_js/sdk/eq.mdx@@ -1,12 +1,12 @@---id: eq-title: ".eq()"+title: '.eq()'slug: /eqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` exactly matches thespecified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.eq('name', 'The shire')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').eq('name', 'San Francisco')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/filter.mdx b/apps/reference/_supabase_js/sdk/filter.mdxindex ed8db493a0e..0dc9d9bfaaf 100644--- a/apps/reference/_supabase_js/sdk/filter.mdx+++ b/apps/reference/_supabase_js/sdk/filter.mdx@@ -1,12 +1,12 @@---id: filter-title: ".filter()"+title: '.filter()'slug: /filtercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose `column` satisfies the filter.@@ -17,10 +17,8 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -64,7 +61,6 @@ The operator to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -87,7 +83,6 @@ The value to filter with.</ul>-## Notes- `.filter()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values, so it should only be used as an escape hatch in case other filters don't work.@@ -98,21 +93,10 @@ The value to filter with..filter('id','in',`(${arr})`) // You can insert a javascript array.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -122,8 +106,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -133,8 +115,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -144,8 +124,6 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase@@ -155,11 +133,9 @@ const { data, error } = await supabase### Filter embedded resources--```jsconst { data, error } = await supabase.from('cities').select('name, countries ( name )').filter('countries.name', 'in', '("France","Japan")')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/getsubscriptions.mdx b/apps/reference/_supabase_js/sdk/getsubscriptions.mdxindex 6d38faa1b03..77b312b53a8 100644--- a/apps/reference/_supabase_js/sdk/getsubscriptions.mdx+++ b/apps/reference/_supabase_js/sdk/getsubscriptions.mdx@@ -1,12 +1,12 @@---id: getsubscriptions-title: "getSubscriptions()"+title: 'getSubscriptions()'slug: /getsubscriptionscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns an array of all your subscriptions.@@ -14,29 +14,10 @@ Returns an array of all your subscriptions.const subscriptions = supabase.getSubscriptions()```-----------------## Examples### Get all subscriptions--```jsconst subscriptions = supabase.getSubscriptions()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/gt.mdx b/apps/reference/_supabase_js/sdk/gt.mdxindex 1f25f55f72c..19f5dffd62c 100644--- a/apps/reference/_supabase_js/sdk/gt.mdx+++ b/apps/reference/_supabase_js/sdk/gt.mdx@@ -1,12 +1,12 @@---id: gt-title: ".gt()"+title: '.gt()'slug: /gtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than thespecified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.gt('country_id', 250)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').gt('country_id', 250)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/gte.mdx b/apps/reference/_supabase_js/sdk/gte.mdxindex f634c5adc13..0b130750794 100644--- a/apps/reference/_supabase_js/sdk/gte.mdx+++ b/apps/reference/_supabase_js/sdk/gte.mdx@@ -1,12 +1,12 @@---id: gte-title: ".gte()"+title: '.gte()'slug: /gtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than orequal to the specified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.gte('country_id', 250)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').gte('country_id', 250)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/ilike.mdx b/apps/reference/_supabase_js/sdk/ilike.mdxindex 283aca0016d..e03a5313ab6 100644--- a/apps/reference/_supabase_js/sdk/ilike.mdx+++ b/apps/reference/_supabase_js/sdk/ilike.mdx@@ -1,12 +1,12 @@---id: ilike-title: ".ilike()"+title: '.ilike()'slug: /ilikecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied`pattern` (case insensitive).@@ -18,10 +18,8 @@ const { data, error } = await supabase.ilike('name', '%la%')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The pattern to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').ilike('name', '%la%')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/in.mdx b/apps/reference/_supabase_js/sdk/in.mdxindex 52a93876a1e..382c102d728 100644--- a/apps/reference/_supabase_js/sdk/in.mdx+++ b/apps/reference/_supabase_js/sdk/in.mdx@@ -1,12 +1,12 @@---id: in-title: ".in()"+title: '.in()'slug: /incustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is found on thespecified `values`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The values to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').in('name', ['Rio de Janeiro', 'San Francisco'])-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/index.mdx b/apps/reference/_supabase_js/sdk/index.mdxindex e3f79dd22fd..a25a52f0326 100644--- a/apps/reference/_supabase_js/sdk/index.mdx+++ b/apps/reference/_supabase_js/sdk/index.mdx@@ -1,12 +1,11 @@---id: index-title: "Supabase Client"+title: 'Supabase Client'slug: supabase-clientcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'--Supabase JavaScript.\ No newline at end of file+Supabase JavaScript.diff --git a/apps/reference/_supabase_js/sdk/insert.mdx b/apps/reference/_supabase_js/sdk/insert.mdxindex 43d57e89c88..588bdc094e0 100644--- a/apps/reference/_supabase_js/sdk/insert.mdx+++ b/apps/reference/_supabase_js/sdk/insert.mdx@@ -1,27 +1,23 @@---id: insert-title: "Create data: insert()"+title: 'Create data: insert()'slug: /insertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an INSERT into the table.```jsconst { data, error } = await supabase.from('cities')- .insert([- { name: 'The Shire', country_id: 554 }- ])+ .insert([{ name: 'The Shire', country_id: 554 }])```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +40,6 @@ The values to insert.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -59,7 +54,7 @@ The values to insert.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -67,68 +62,49 @@ No description provided.</ul>-## Notes- By default, every time you run `insert()`, the client library will make a `select` to return the full record.-This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.-If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.---------+ This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.+ If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.## Examples### Create a record--```jsconst { data, error } = await supabase.from('cities')- .insert([- { name: 'The Shire', country_id: 554 }- ])+ .insert([{ name: 'The Shire', country_id: 554 }])```### Bulk create-When running a bulk create, the operation is handled in a single transaction. If any of the inserts fail, all other operations are+When running a bulk create, the operation is handled in a single transaction. If any of the inserts fail, all other operations arerolled back.-```js-const { data, error } = await supabase- .from('cities')- .insert([- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- ])+const { data, error } = await supabase.from('cities').insert([+ { name: 'The Shire', country_id: 554 },+ { name: 'Rohan', country_id: 555 },+])```### Upsert-For upsert, if set to true, primary key columns would need to be included-in the data parameter in order for an update to properly happen. Also, primary keys-used must be natural, not surrogate. There are however,-[workarounds](https://github.com/PostgREST/postgrest/issues/1118)+For upsert, if set to true, primary key columns would need to be included+in the data parameter in order for an update to properly happen. Also, primary keys+used must be natural, not surrogate. There are however,+[workarounds](https://github.com/PostgREST/postgrest/issues/1118)for surrogate primary keys.-```js-const { data, error } = await supabase- .from('cities')- .insert(- [- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- { name: 'City by the Bay', country_id:840}- ],- { upsert: true })-```\ No newline at end of file+const { data, error } = await supabase.from('cities').insert(+ [+ { name: 'The Shire', country_id: 554 },+ { name: 'Rohan', country_id: 555 },+ { name: 'City by the Bay', country_id: 840 },+ ],+ { upsert: true }+)+```diff --git a/apps/reference/_supabase_js/sdk/invoke.mdx b/apps/reference/_supabase_js/sdk/invoke.mdxindex 91a039b2652..cfd24c6afcb 100644--- a/apps/reference/_supabase_js/sdk/invoke.mdx+++ b/apps/reference/_supabase_js/sdk/invoke.mdx@@ -1,26 +1,23 @@---id: invoke-title: "invoke()"+title: 'invoke()'slug: /invokecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Invokes a Supabase Function.-```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +40,6 @@ the name of the function to invoke</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,30 +65,18 @@ object with the following properties</ul>-## Notes- Requires an Authorization header.- Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec.---------## Examples### Basic invocation.--```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```@@ -100,11 +84,10 @@ const { data: user, error } = await supabase.functions.invoke('hello', {By default, `invoke()` will parse the response as JSON. You can parse the response in the following formats: `json`, `blob`, `text`, and `arrayBuffer`.-```jsconst { data: user, error } = await supabase.functions.invoke('hello', {responseType: 'text',- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```@@ -112,12 +95,11 @@ const { data: user, error } = await supabase.functions.invoke('hello', {You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT.-```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- headers: {- "my-custom-header": 'my-custom-header-value'+ headers: {+ 'my-custom-header': 'my-custom-header-value',},- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/is.mdx b/apps/reference/_supabase_js/sdk/is.mdxindex e1d109957ad..dbb0c8c72a7 100644--- a/apps/reference/_supabase_js/sdk/is.mdx+++ b/apps/reference/_supabase_js/sdk/is.mdx@@ -1,12 +1,12 @@---id: is-title: ".is()"+title: '.is()'slug: /iscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'A check for exact equality (null, true, false), finds all rows whosevalue on the stated `column` exactly match the specified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.is('name', null)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,22 +86,13 @@ const { data, error } = await supabase### With `delete()`--```js-const { data, error } = await supabase- .from('cities')- .delete()- .is('name', null)+const { data, error } = await supabase.from('cities').delete().is('name', null)```### With `rpc()`--```js// Only valid if the Postgres function returns a table type.-const { data, error } = await supabase- .rpc('echo_all_cities')- .is('name', null)-```\ No newline at end of file+const { data, error } = await supabase.rpc('echo_all_cities').is('name', null)+```diff --git a/apps/reference/_supabase_js/sdk/like.mdx b/apps/reference/_supabase_js/sdk/like.mdxindex bdca88b2926..8a8ac83bebc 100644--- a/apps/reference/_supabase_js/sdk/like.mdx+++ b/apps/reference/_supabase_js/sdk/like.mdx@@ -1,12 +1,12 @@---id: like-title: ".like()"+title: '.like()'slug: /likecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied`pattern` (case sensitive).@@ -18,10 +18,8 @@ const { data, error } = await supabase.like('name', '%la%')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The pattern to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').like('name', '%la%')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/limit.mdx b/apps/reference/_supabase_js/sdk/limit.mdxindex 47f3d14d803..9dc354106db 100644--- a/apps/reference/_supabase_js/sdk/limit.mdx+++ b/apps/reference/_supabase_js/sdk/limit.mdx@@ -1,12 +1,12 @@---id: limit-title: "limit()"+title: 'limit()'slug: /limitcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result with the specified `count`.@@ -17,10 +17,8 @@ const { data, error } = await supabase.limit(1)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The maximum no. of rows to limit to.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ The maximum no. of rows to limit to.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -91,25 +88,10 @@ The foreign table to use (for foreign columns).</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -119,12 +101,10 @@ const { data, error } = await supabase### With embedded resources--```jsconst { data, error } = await supabase.from('countries').select('name, cities(name)').eq('name', 'United States').limit(1, { foreignTable: 'cities' })-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/lt.mdx b/apps/reference/_supabase_js/sdk/lt.mdxindex 7503a07b5c0..c0411060feb 100644--- a/apps/reference/_supabase_js/sdk/lt.mdx+++ b/apps/reference/_supabase_js/sdk/lt.mdx@@ -1,12 +1,12 @@---id: lt-title: ".lt()"+title: '.lt()'slug: /ltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than thespecified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.lt('country_id', 250)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').lt('country_id', 250)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/lte.mdx b/apps/reference/_supabase_js/sdk/lte.mdxindex f63470b12f7..71fd438cbdf 100644--- a/apps/reference/_supabase_js/sdk/lte.mdx+++ b/apps/reference/_supabase_js/sdk/lte.mdx@@ -1,12 +1,12 @@---id: lte-title: ".lte()"+title: '.lte()'slug: /ltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than or equalto the specified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.lte('country_id', 250)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').lte('country_id', 250)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/match.mdx b/apps/reference/_supabase_js/sdk/match.mdxindex bc1e80c4e5a..c2ba9363b02 100644--- a/apps/reference/_supabase_js/sdk/match.mdx+++ b/apps/reference/_supabase_js/sdk/match.mdx@@ -1,12 +1,12 @@---id: match-title: ".match()"+title: '.match()'slug: /matchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose columns match the specified `query` object.@@ -14,13 +14,11 @@ Finds all rows whose columns match the specified `query` object.const { data, error } = await supabase.from('cities').select('name, country_id')- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -38,7 +36,7 @@ const { data, error } = await supabase<div class="method-list-item-description">The object to filter with, with column names as keys mapped- to their filter values.+to their filter values.</div>@@ -46,61 +44,40 @@ The object to filter with, with column names as keys mapped</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities').select('name, country_id')- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```### With `update()`--```jsconst { data, error } = await supabase.from('cities').update({ name: 'Mordor' })- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```### With `delete()`--```jsconst { data, error } = await supabase.from('cities').delete()- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities')- .match({name: 'Beijing', country_id: 156})-```\ No newline at end of file+ .match({ name: 'Beijing', country_id: 156 })+```diff --git a/apps/reference/_supabase_js/sdk/maybesingle.mdx b/apps/reference/_supabase_js/sdk/maybesingle.mdxindex 57796c41506..8d354b462ed 100644--- a/apps/reference/_supabase_js/sdk/maybesingle.mdx+++ b/apps/reference/_supabase_js/sdk/maybesingle.mdx@@ -1,12 +1,12 @@---id: maybesingle-title: "maybeSingle()"+title: 'maybeSingle()'slug: /maybesinglecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves at most one row from the result. Result must be at most one row(e.g. using `eq` on a UNIQUE column), otherwise this will result in an@@ -20,33 +20,14 @@ const { data, error } = await supabase.maybeSingle()```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities').select('name, country_id').eq('name', 'Singapore').maybeSingle()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/neq.mdx b/apps/reference/_supabase_js/sdk/neq.mdxindex ca323304a8a..cdedceafcd1 100644--- a/apps/reference/_supabase_js/sdk/neq.mdx+++ b/apps/reference/_supabase_js/sdk/neq.mdx@@ -1,12 +1,12 @@---id: neq-title: ".neq()"+title: '.neq()'slug: /neqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` doesn't match thespecified `value`.@@ -18,10 +18,8 @@ const { data, error } = await supabase.neq('name', 'The shire')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,7 +42,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,25 +64,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -95,8 +77,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -106,8 +86,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -117,11 +95,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').neq('name', 'Lagos')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/not.mdx b/apps/reference/_supabase_js/sdk/not.mdxindex 05031b67036..e0c55713b76 100644--- a/apps/reference/_supabase_js/sdk/not.mdx+++ b/apps/reference/_supabase_js/sdk/not.mdx@@ -1,12 +1,12 @@---id: not-title: ".not()"+title: '.not()'slug: /notcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows which doesn't satisfy the filter.@@ -17,10 +17,8 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -64,7 +61,6 @@ The operator to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -87,7 +83,6 @@ The value to filter with.</ul>-## Notes- `.not()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -100,21 +95,10 @@ The value to filter with..not('id','in',`(${arr})`) // You can insert a javascript array.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -124,8 +108,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('cities')@@ -135,8 +117,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('cities')@@ -146,11 +126,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities').not('name', 'eq', 'Paris')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/or.mdx b/apps/reference/_supabase_js/sdk/or.mdxindex 9fc4a43f072..3e78274a2da 100644--- a/apps/reference/_supabase_js/sdk/or.mdx+++ b/apps/reference/_supabase_js/sdk/or.mdx@@ -1,12 +1,12 @@---id: or-title: ".or()"+title: '.or()'slug: /orcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows satisfying at least one of the filters.@@ -17,10 +17,8 @@ const { data, error } = await supabase.or('id.eq.20,id.eq.30')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The filters to use, separated by commas.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ The filters to use, separated by commas.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -91,7 +88,6 @@ The foreign table to use (if `column` is a foreign column).</ul>-## Notes- `.or()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -102,21 +98,10 @@ The foreign table to use (if `column` is a foreign column)..or(`id.in.(${arrList}),rangecol.cs.[${arrRange})`) // You can insert a javascipt array for list or range on a range column.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -126,8 +111,6 @@ const { data, error } = await supabase### Use `or` with `and`--```jsconst { data, error } = await supabase.from('cities')@@ -137,11 +120,9 @@ const { data, error } = await supabase### Use `or` on foreign tables--```jsconst { data, error } = await supabase.from('countries').select('id, cities(*)')- .or('name.eq.Wellington,name.eq.Paris', { foreignTable: "cities" })-```\ No newline at end of file+ .or('name.eq.Wellington,name.eq.Paris', { foreignTable: 'cities' })+```diff --git a/apps/reference/_supabase_js/sdk/order.mdx b/apps/reference/_supabase_js/sdk/order.mdxindex 395d3dd059a..afd5e2a2d16 100644--- a/apps/reference/_supabase_js/sdk/order.mdx+++ b/apps/reference/_supabase_js/sdk/order.mdx@@ -1,12 +1,12 @@---id: order-title: "order()"+title: 'order()'slug: /ordercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Orders the result with the specified `column`.@@ -17,10 +17,8 @@ const { data, error } = await supabase.order('id', { ascending: false })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The column to order on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ The column to order on.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -85,7 +82,6 @@ If `true`, `null`s appear first.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -106,7 +102,6 @@ The foreign table to use (if `column` is a foreign column).</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -133,25 +128,10 @@ If `true`, the result will be in ascending order.</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities')@@ -161,12 +141,10 @@ const { data, error } = await supabase### With embedded resources--```jsconst { data, error } = await supabase.from('countries').select('name, cities(name)').eq('name', 'United States')- .order('name', {foreignTable: 'cities'})-```\ No newline at end of file+ .order('name', { foreignTable: 'cities' })+```diff --git a/apps/reference/_supabase_js/sdk/overlaps.mdx b/apps/reference/_supabase_js/sdk/overlaps.mdxindex 541022f5df6..b3f0f877f79 100644--- a/apps/reference/_supabase_js/sdk/overlaps.mdx+++ b/apps/reference/_supabase_js/sdk/overlaps.mdx@@ -1,14 +1,12 @@---id: overlaps-title: ".overlaps()"+title: '.overlaps()'slug: /overlapscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,11 +15,6 @@ const { data, error } = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-----## Notes- `.overlaps()` can work on array columns or range columns.@@ -33,21 +26,10 @@ const { data, error } = await supabase.overlaps('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -57,8 +39,6 @@ const { data, error } = await supabase### With `update()`--```jslet countries = await supabase.from('countries')@@ -68,8 +48,6 @@ let countries = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -79,11 +57,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').overlaps('main_exports', ['computers', 'minerals'])-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/range.mdx b/apps/reference/_supabase_js/sdk/range.mdxindex c30519946a5..5f304eff4c8 100644--- a/apps/reference/_supabase_js/sdk/range.mdx+++ b/apps/reference/_supabase_js/sdk/range.mdx@@ -1,12 +1,12 @@---id: range-title: "range()"+title: 'range()'slug: /rangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result to rows within the specified range, inclusive.@@ -14,13 +14,11 @@ Limits the result to rows within the specified range, inclusive.const { data, error } = await supabase.from('cities').select('name, country_id')- .range(0,3)+ .range(0, 3)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The starting index from which to limit the result, inclusive.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -64,7 +61,6 @@ The last index to which to limit the result, inclusive.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,7 +75,7 @@ The last index to which to limit the result, inclusive.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -112,28 +108,13 @@ The foreign table to use (for foreign columns).</ul>-------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities').select('name, country_id')- .range(0,3)-```\ No newline at end of file+ .range(0, 3)+```diff --git a/apps/reference/_supabase_js/sdk/rangeadjacent.mdx b/apps/reference/_supabase_js/sdk/rangeadjacent.mdxindex 596c0650cc0..49aa41beb45 100644--- a/apps/reference/_supabase_js/sdk/rangeadjacent.mdx+++ b/apps/reference/_supabase_js/sdk/rangeadjacent.mdx@@ -1,14 +1,12 @@---id: rangeadjacent-title: ".rangeAdjacent()"+title: '.rangeAdjacent()'slug: /rangeadjacentcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,29 +15,10 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -49,8 +28,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -60,8 +37,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -71,11 +46,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').rangeAdjacent('population_range_millions', '[70, 185]')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/rangegt.mdx b/apps/reference/_supabase_js/sdk/rangegt.mdxindex 986e1db4ea9..20f7f13cc2a 100644--- a/apps/reference/_supabase_js/sdk/rangegt.mdx+++ b/apps/reference/_supabase_js/sdk/rangegt.mdx@@ -1,14 +1,12 @@---id: rangegt-title: ".rangeGt()"+title: '.rangeGt()'slug: /rangegtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,29 +15,10 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -49,8 +28,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -60,8 +37,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -71,11 +46,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').rangeGt('population_range_millions', '[150, 250]')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/rangegte.mdx b/apps/reference/_supabase_js/sdk/rangegte.mdxindex 250ac324505..b31f8068d73 100644--- a/apps/reference/_supabase_js/sdk/rangegte.mdx+++ b/apps/reference/_supabase_js/sdk/rangegte.mdx@@ -1,14 +1,12 @@---id: rangegte-title: ".rangeGte()"+title: '.rangeGte()'slug: /rangegtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,29 +15,10 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -49,8 +28,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -60,8 +37,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -71,11 +46,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').rangeGte('population_range_millions', '[150, 250]')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/rangelt.mdx b/apps/reference/_supabase_js/sdk/rangelt.mdxindex 1f01359c1eb..5c28fb1b8a9 100644--- a/apps/reference/_supabase_js/sdk/rangelt.mdx+++ b/apps/reference/_supabase_js/sdk/rangelt.mdx@@ -1,14 +1,12 @@---id: rangelt-title: ".rangeLt()"+title: '.rangeLt()'slug: /rangeltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,29 +15,10 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -49,8 +28,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -60,8 +37,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -71,11 +46,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').rangeLt('population_range_millions', '[150, 250]')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/rangelte.mdx b/apps/reference/_supabase_js/sdk/rangelte.mdxindex 86c8811c2ba..1884658f482 100644--- a/apps/reference/_supabase_js/sdk/rangelte.mdx+++ b/apps/reference/_supabase_js/sdk/rangelte.mdx@@ -1,14 +1,12 @@---id: rangelte-title: ".rangeLte()"+title: '.rangeLte()'slug: /rangeltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'```jsconst { data, error } = await supabase@@ -17,29 +15,10 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('countries')@@ -49,8 +28,6 @@ const { data, error } = await supabase### With `update()`--```jsconst { data, error } = await supabase.from('countries')@@ -60,8 +37,6 @@ const { data, error } = await supabase### With `delete()`--```jsconst { data, error } = await supabase.from('countries')@@ -71,11 +46,9 @@ const { data, error } = await supabase### With `rpc()`--```js// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_countries').rangeLte('population_range_millions', '[150, 250]')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/removeallsubscriptions.mdx b/apps/reference/_supabase_js/sdk/removeallsubscriptions.mdxindex 72d2f1510d8..bd79ef872b9 100644--- a/apps/reference/_supabase_js/sdk/removeallsubscriptions.mdx+++ b/apps/reference/_supabase_js/sdk/removeallsubscriptions.mdx@@ -1,12 +1,12 @@---id: removeallsubscriptions-title: "removeAllSubscriptions()"+title: 'removeAllSubscriptions()'slug: /removeallsubscriptionscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Closes and removes all subscriptions and returns a list of removedsubscriptions and their errors.@@ -15,30 +15,14 @@ subscriptions and their errors.supabase.removeAllSubscriptions()```-----## Notes- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.---------## Examples### Removes all subscriptions--```jssupabase.removeAllSubscriptions()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/removesubscription.mdx b/apps/reference/_supabase_js/sdk/removesubscription.mdxindex 883ea6ae0ca..3c168797420 100644--- a/apps/reference/_supabase_js/sdk/removesubscription.mdx+++ b/apps/reference/_supabase_js/sdk/removesubscription.mdx@@ -1,12 +1,12 @@---id: removesubscription-title: "removeSubscription()"+title: 'removeSubscription()'slug: /removesubscriptioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Closes and removes a subscription and returns the number of open subscriptions.@@ -14,10 +14,8 @@ Closes and removes a subscription and returns the number of open subscriptions.supabase.removeSubscription(mySubscription)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -42,26 +40,14 @@ The subscription you want to close and remove.</ul>-## Notes- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.---------## Examples### Remove a subscription--```jssupabase.removeSubscription(mySubscription)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/rpc.mdx b/apps/reference/_supabase_js/sdk/rpc.mdxindex f516b310db3..3e6982909e2 100644--- a/apps/reference/_supabase_js/sdk/rpc.mdx+++ b/apps/reference/_supabase_js/sdk/rpc.mdx@@ -1,12 +1,12 @@---id: rpc-title: "Postgres functions: rpc()"+title: 'Postgres functions: rpc()'slug: /rpccustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'You can call Postgres functions as a "Remote Procedure Call".@@ -19,16 +19,12 @@ create or replace function hello_world() returns text as $$$$ language sql;```-```js-const { data, error } = await supabase- .rpc('hello_world')+const { data, error } = await supabase.rpc('hello_world')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -51,7 +47,6 @@ The function name to call.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -72,7 +67,6 @@ The parameters to pass to the function call.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -87,7 +81,7 @@ The parameters to pass to the function call.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -114,7 +108,6 @@ When set to true, no data will be returned.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -141,19 +134,6 @@ Count algorithm to use to count rows in a table.</ul>-------------## Examples### Call a Postgres function@@ -161,17 +141,13 @@ Count algorithm to use to count rows in a table.This is an example of invoking a Postgres function with no parameters.```js-const { data, error } = await supabase- .rpc('hello_world')+const { data, error } = await supabase.rpc('hello_world')```### With Parameters--```js-const { data, error } = await supabase- .rpc('echo_city', { name: 'The Shire' })+const { data, error } = await supabase.rpc('echo_city', { name: 'The Shire' })```### Bulk processing@@ -179,17 +155,17 @@ const { data, error } = await supabaseYou can process large payloads at once using [array parameters](https://postgrest.org/en/stable/api.html#calling-functions-with-array-parameters).```js-const { data, error } = await postgrest- .rpc('echo_cities', { names: ['The Shire', 'Mordor'] })+const { data, error } = await postgrest.rpc('echo_cities', {+ names: ['The Shire', 'Mordor'],+})```### With filtersPostgres functions that return tables can also be combined with-[Modifiers](/docs/reference/javascript/using-modifiers) and+[Modifiers](/docs/reference/javascript/using-modifiers) and[Filters](/docs/reference/javascript/using-filters).-```jsconst { data, error } = await supabase.rpc('echo_all_cities')@@ -202,8 +178,10 @@ const { data, error } = await supabaseYou can specify a count option to get the row count along with your data.Allowed values for count option are `null`, `exact`, `planned` and `estimated`.-```js-const { data, error, count } = await supabase- .rpc('hello_world', {}, { count: 'exact' })-```\ No newline at end of file+const { data, error, count } = await supabase.rpc(+ 'hello_world',+ {},+ { count: 'exact' }+)+```diff --git a/apps/reference/_supabase_js/sdk/select.mdx b/apps/reference/_supabase_js/sdk/select.mdxindex 0c486a678b5..0cc42396eba 100644--- a/apps/reference/_supabase_js/sdk/select.mdx+++ b/apps/reference/_supabase_js/sdk/select.mdx@@ -1,25 +1,21 @@---id: select-title: "Fetch data: select()"+title: 'Fetch data: select()'slug: /selectcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs vertical filtering with SELECT.```js-const { data, error } = await supabase- .from('cities')- .select()+const { data, error } = await supabase.from('cities').select()```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -42,7 +38,6 @@ The columns to retrieve, separated by commas.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -57,7 +52,7 @@ The columns to retrieve, separated by commas.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -84,7 +79,6 @@ When set to true, select will void data.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -111,7 +105,6 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- By default, Supabase projects will return a maximum of 1,000 rows. This setting can be changed in Project API Settings. It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data.@@ -119,25 +112,12 @@ Count algorithm to use to count rows in a table.- `select()` can be combined with [Filters](/docs/reference/javascript/using-filters)- If using the Supabase hosted platform `apikey` is technically a reserved keyword, since the API gateway will pluck it out for authentication. [It should be avoided as a column name](https://github.com/supabase/supabase/issues/5465).---------## Examples### Getting your data--```js-const { data, error } = await supabase- .from('cities')- .select()+const { data, error } = await supabase.from('cities').select()```### Selecting specific columns@@ -145,9 +125,7 @@ const { data, error } = await supabaseYou can select specific fields from your tables.```js-const { data, error } = await supabase- .from('cities')- .select('name')+const { data, error } = await supabase.from('cities').select('name')```### Query foreign tables@@ -155,9 +133,7 @@ const { data, error } = await supabaseIf your database has foreign key relationships, you can query related tables too.```js-const { data, error } = await supabase- .from('countries')- .select(`+const { data, error } = await supabase.from('countries').select(`name,cities (name@@ -165,10 +141,8 @@ const { data, error } = await supabase`)```--:::note What about join tables- If you're in a situation where your tables are **NOT** directly related, but instead are joined by a _join table_,+If you're in a situation where your tables are **NOT** directly related, but instead are joined by a _join table_,you can still use the `select()` method to query the related data. The PostgREST engine detects the relationship automatically.For more details, [follow the link](https://postgrest.org/en/latest/api.html#embedding-through-join-tables).@@ -176,18 +150,15 @@ For more details, [follow the link](https://postgrest.org/en/latest/api.html#emb### Query the same foreign table multiple times-Sometimes you will need to query the same foreign table twice.-In this case, you can use the name of the joined column to identify-which join you intend to use. For convenience, you can also give an-alias for each column. For example, if we had a shop of products,-and we wanted to get the supplier and the purchaser at the same time+Sometimes you will need to query the same foreign table twice.+In this case, you can use the name of the joined column to identify+which join you intend to use. For convenience, you can also give an+alias for each column. For example, if we had a shop of products,+and we wanted to get the supplier and the purchaser at the same time(both in the users) table:-```js-const { data, error } = await supabase- .from('products')- .select(`+const { data, error } = await supabase.from('products').select(`id,supplier:supplier_id ( name ),purchaser:purchaser_id ( name )@@ -196,10 +167,9 @@ const { data, error } = await supabase### Filtering with inner joins-If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wanted+If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wantedto select all rows in a `message` table which belong to a user with the `username` "Jane":-```jsconst { data, error } = await supabase.from('messages')@@ -212,7 +182,6 @@ const { data, error } = await supabaseYou can get the number of rows by using the count option.Allowed values for count option are `null`, [exact](https://postgrest.org/en/stable/api.html#exact-count), [planned](https://postgrest.org/en/stable/api.html#planned-count) and [estimated](https://postgrest.org/en/stable/api.html#estimated-count).-```jsconst { data, error, count } = await supabase.from('cities')@@ -221,20 +190,21 @@ const { data, error, count } = await supabase### Querying JSON data-If you have data inside of a JSONB column, you can apply select-and query filters to the data values. Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for querying JSON data. Also see+If you have data inside of a JSONB column, you can apply select+and query filters to the data values. Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for querying JSON data. Also see[PostgREST docs](http://postgrest.org/en/v7.0.0/api.html#json-columns) for more details.-```jsconst { data, error } = await supabase.from('users')- .select(`+ .select(+ `id, name,address->street- `)+ `+ ).eq('address->postcode', 90210)```@@ -242,19 +212,14 @@ const { data, error } = await supabaseBy default the data is returned in JSON format, however you can also request for it to be returned as Comma Separated Values.-```js-const { data, error } = await supabase- .from('users')- .select()- .csv()+const { data, error } = await supabase.from('users').select().csv()```### Aborting requests in-flightYou can use an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to abort requests. Note that `status` and `statusText` doesn't mean anything for aborted requests, since the request wasn't actually fulfilled.-```jsconst ac = new AbortController()supabase@@ -276,4 +241,4 @@ ac.abort()// status: 400,// statusText: 'Bad Request'// }-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/single.mdx b/apps/reference/_supabase_js/sdk/single.mdxindex ad1d131f2a9..c1879471f4d 100644--- a/apps/reference/_supabase_js/sdk/single.mdx+++ b/apps/reference/_supabase_js/sdk/single.mdx@@ -1,12 +1,12 @@---id: single-title: "single()"+title: 'single()'slug: /singlecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves only one row from the result. Result must be one row (e.g. using`limit`), otherwise this will result in an error.@@ -19,33 +19,14 @@ const { data, error } = await supabase.single()```-----------------## Examples### With `select()`--```jsconst { data, error } = await supabase.from('cities').select('name, country_id').limit(1).single()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-createbucket.mdx b/apps/reference/_supabase_js/sdk/storage-createbucket.mdxindex 756a435cd92..f02934dd370 100644--- a/apps/reference/_supabase_js/sdk/storage-createbucket.mdx+++ b/apps/reference/_supabase_js/sdk/storage-createbucket.mdx@@ -1,25 +1,23 @@---id: storage-createbucket-title: "createBucket()"+title: 'createBucket()'slug: /storage-createbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new Storage bucket```js-const { data, error } = await supabase- .storage- .createBucket('avatars', { public: false })+const { data, error } = await supabase.storage.createBucket('avatars', {+ public: false,+})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -42,7 +40,6 @@ A unique identifier for the bucket you are creating.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -57,7 +54,7 @@ A unique identifier for the bucket you are creating.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -78,7 +75,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -90,30 +87,18 @@ No description provided.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `insert`+ - `buckets` permissions: `insert`- `objects` permissions: none---------## Examples### Create bucket--```js-const { data, error } = await supabase- .storage- .createBucket('avatars', { public: false })-```\ No newline at end of file+const { data, error } = await supabase.storage.createBucket('avatars', {+ public: false,+})+```diff --git a/apps/reference/_supabase_js/sdk/storage-deletebucket.mdx b/apps/reference/_supabase_js/sdk/storage-deletebucket.mdxindex 1cbd48872b9..c629a8eba95 100644--- a/apps/reference/_supabase_js/sdk/storage-deletebucket.mdx+++ b/apps/reference/_supabase_js/sdk/storage-deletebucket.mdx@@ -1,26 +1,22 @@---id: storage-deletebucket-title: "deleteBucket()"+title: 'deleteBucket()'slug: /storage-deletebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.You must first `empty()` the bucket.```js-const { data, error } = await supabase- .storage- .deleteBucket('avatars')+const { data, error } = await supabase.storage.deleteBucket('avatars')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,30 +41,16 @@ The unique identifier of the bucket you would like to delete.</ul>-## Notes- Policy permissions required:- `buckets` permissions: `select` and `delete`- `objects` permissions: none---------## Examples### Delete bucket--```js-const { data, error } = await supabase- .storage- .deleteBucket('avatars')-```\ No newline at end of file+const { data, error } = await supabase.storage.deleteBucket('avatars')+```diff --git a/apps/reference/_supabase_js/sdk/storage-emptybucket.mdx b/apps/reference/_supabase_js/sdk/storage-emptybucket.mdxindex 8dfaa55dfcb..8824e754ed8 100644--- a/apps/reference/_supabase_js/sdk/storage-emptybucket.mdx+++ b/apps/reference/_supabase_js/sdk/storage-emptybucket.mdx@@ -1,25 +1,21 @@---id: storage-emptybucket-title: "emptyBucket()"+title: 'emptyBucket()'slug: /storage-emptybucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Removes all objects inside a single bucket.```js-const { data, error } = await supabase- .storage- .emptyBucket('avatars')+const { data, error } = await supabase.storage.emptyBucket('avatars')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,30 +40,16 @@ The unique identifier of the bucket you would like to empty.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: `select` and `delete`---------## Examples### Empty bucket--```js-const { data, error } = await supabase- .storage- .emptyBucket('avatars')-```\ No newline at end of file+const { data, error } = await supabase.storage.emptyBucket('avatars')+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-copy.mdx b/apps/reference/_supabase_js/sdk/storage-from-copy.mdxindex 65c81231d29..1716ed889b5 100644--- a/apps/reference/_supabase_js/sdk/storage-from-copy.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-copy.mdx@@ -1,26 +1,23 @@---id: storage-from-copy-title: "from.copy()"+title: 'from.copy()'slug: /storage-from-copycustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Copies an existing file.```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').copy('public/avatar1.png', 'private/avatar2.png')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +40,6 @@ The original file path, including the current file name. For example `folder/ima</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -66,31 +62,18 @@ The new file path, including the new file name. For example `folder/image-copy.p</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Copy file--```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').copy('public/avatar1.png', 'private/avatar2.png')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-createsignedurl.mdx b/apps/reference/_supabase_js/sdk/storage-from-createsignedurl.mdxindex 7f769366297..488f6004674 100644--- a/apps/reference/_supabase_js/sdk/storage-from-createsignedurl.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-createsignedurl.mdx@@ -1,26 +1,23 @@---id: storage-from-createsignedurl-title: "from.createSignedUrl()"+title: 'from.createSignedUrl()'slug: /storage-from-createsignedurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Create signed URL to download file without requiring permissions. This URL can be valid for a set number of seconds.```js-const { signedURL, error } = await supabase- .storage+const { signedURL, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +40,6 @@ The file path to be downloaded, including the current file name. For example `fo</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -66,31 +62,18 @@ The number of seconds until the signed URL expires. For example, `60` for a URL</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Create Signed URL--```js-const { signedURL, error } = await supabase- .storage+const { signedURL, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-createsignedurls.mdx b/apps/reference/_supabase_js/sdk/storage-from-createsignedurls.mdxindex cec7efb7318..f17d08e05c1 100644--- a/apps/reference/_supabase_js/sdk/storage-from-createsignedurls.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-createsignedurls.mdx@@ -1,26 +1,23 @@---id: storage-from-createsignedurls-title: "from.createSignedUrls()"+title: 'from.createSignedUrls()'slug: /storage-from-createsignedurlscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Create signed URLs to download files without requiring permissions. These URLs can be valid for a set number of seconds.```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +40,6 @@ The file paths to be downloaded, including the current file names. For example `</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -66,31 +62,18 @@ The number of seconds until the signed URLs expire. For example, `60` for URLs w</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Create Signed URLs--```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-download.mdx b/apps/reference/_supabase_js/sdk/storage-from-download.mdxindex c70cb7d4614..e4db68c7f26 100644--- a/apps/reference/_supabase_js/sdk/storage-from-download.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-download.mdx@@ -1,26 +1,23 @@---id: storage-from-download-title: "from.download()"+title: 'from.download()'slug: /storage-from-downloadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Downloads a file.```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').download('folder/avatar1.png')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,31 +42,18 @@ The file path to be downloaded, including the path and file name. For example `f</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Download file--```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').download('folder/avatar1.png')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-getpublicurl.mdx b/apps/reference/_supabase_js/sdk/storage-from-getpublicurl.mdxindex 7bd94b037fd..93fc34a5a23 100644--- a/apps/reference/_supabase_js/sdk/storage-from-getpublicurl.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-getpublicurl.mdx@@ -1,26 +1,23 @@---id: storage-from-getpublicurl-title: "from.getPublicUrl()"+title: 'from.getPublicUrl()'slug: /storage-from-getpublicurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieve URLs for assets in public buckets```js-const { publicURL, error } = supabase- .storage+const { publicURL, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,32 +42,19 @@ The file path to be downloaded, including the path and file name. For example `f</ul>-## Notes- The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.com](https://app.supabase.com), clicking the overflow menu on a bucket and choosing "Make public"- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: none---------## Examples### Returns the URL for an asset in a public bucket--```js-const { publicURL, error } = supabase- .storage+const { publicURL, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-list.mdx b/apps/reference/_supabase_js/sdk/storage-from-list.mdxindex 5399b7ac110..e188a4c4970 100644--- a/apps/reference/_supabase_js/sdk/storage-from-list.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-list.mdx@@ -1,30 +1,25 @@---id: storage-from-list-title: "from.list()"+title: 'from.list()'slug: /storage-from-listcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Lists all the files within a bucket.```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- })+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -47,7 +42,6 @@ The folder path.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +62,6 @@ Search options, including `limit`, `offset`, `sortBy`, and `search`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -91,51 +84,31 @@ Fetch parameters, currently only supports `signal`, which is an AbortController'</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### List files in a bucket--```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- })+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+})```### Search files in a bucket--```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- search: 'jon'- })-```\ No newline at end of file+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+ search: 'jon',+})+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-move.mdx b/apps/reference/_supabase_js/sdk/storage-from-move.mdxindex 81a365a897f..09152fb8619 100644--- a/apps/reference/_supabase_js/sdk/storage-from-move.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-move.mdx@@ -1,26 +1,23 @@---id: storage-from-move-title: "from.move()"+title: 'from.move()'slug: /storage-from-movecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Moves an existing file.```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').move('public/avatar1.png', 'private/avatar2.png')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +40,6 @@ The original file path, including the current file name. For example `folder/ima</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -66,31 +62,18 @@ The new file path, including the new file name. For example `folder/image-new.pn</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Move file--```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').move('public/avatar1.png', 'private/avatar2.png')-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-remove.mdx b/apps/reference/_supabase_js/sdk/storage-from-remove.mdxindex 95cfec0c8b0..8b594a25c53 100644--- a/apps/reference/_supabase_js/sdk/storage-from-remove.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-remove.mdx@@ -1,26 +1,23 @@---id: storage-from-remove-title: "from.remove()"+title: 'from.remove()'slug: /storage-from-removecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes files within the same bucket```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').remove(['folder/avatar1.png'])```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,31 +42,18 @@ An array of files to be deleted, including the path and file name. For example [</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `delete` and `select`---------## Examples### Delete file--```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').remove(['folder/avatar1.png'])-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-update.mdx b/apps/reference/_supabase_js/sdk/storage-from-update.mdxindex 3a4d1f6197a..3fd9f3cc370 100644--- a/apps/reference/_supabase_js/sdk/storage-from-update.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-update.mdx@@ -1,30 +1,27 @@---id: storage-from-update-title: "from.update()"+title: 'from.update()'slug: /storage-from-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Replaces an existing file at the specified path with a new one.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -47,7 +44,6 @@ The relative file path. Should be of the format `folder/subfolder/filename.png`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +64,6 @@ The body of the file to be stored in the bucket.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,51 +89,35 @@ HTTP headers.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`- For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.---------## Examples### Update file--```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```### Update file using `ArrayBuffer` from base64 file data--```js-import {decode} from 'base64-arraybuffer'+import { decode } from 'base64-arraybuffer'-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', decode('base64FileData'), {- contentType: 'image/png'+ contentType: 'image/png',})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-from-upload.mdx b/apps/reference/_supabase_js/sdk/storage-from-upload.mdxindex b2d1de70385..82f0c843e35 100644--- a/apps/reference/_supabase_js/sdk/storage-from-upload.mdx+++ b/apps/reference/_supabase_js/sdk/storage-from-upload.mdx@@ -1,30 +1,27 @@---id: storage-from-upload-title: "from.upload()"+title: 'from.upload()'slug: /storage-from-uploadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Uploads a file to an existing bucket.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -47,7 +44,6 @@ The relative file path. Should be of the format `folder/subfolder/filename.png`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +64,6 @@ The body of the file to be stored in the bucket.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,51 +89,35 @@ HTTP headers.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `insert`- For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.---------## Examples### Upload file--```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```### Upload file using `ArrayBuffer` from base64 file data--```jsimport { decode } from 'base64-arraybuffer'-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', decode('base64FileData'), {- contentType: 'image/png'+ contentType: 'image/png',})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/storage-getbucket.mdx b/apps/reference/_supabase_js/sdk/storage-getbucket.mdxindex f08aac39665..38f17b1a56a 100644--- a/apps/reference/_supabase_js/sdk/storage-getbucket.mdx+++ b/apps/reference/_supabase_js/sdk/storage-getbucket.mdx@@ -1,25 +1,21 @@---id: storage-getbucket-title: "getBucket()"+title: 'getBucket()'slug: /storage-getbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of an existing Storage bucket.```js-const { data, error } = await supabase- .storage- .getBucket('avatars')+const { data, error } = await supabase.storage.getBucket('avatars')```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -44,30 +40,16 @@ The unique identifier of the bucket you would like to retrieve.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### Get bucket--```js-const { data, error } = await supabase- .storage- .getBucket('avatars')-```\ No newline at end of file+const { data, error } = await supabase.storage.getBucket('avatars')+```diff --git a/apps/reference/_supabase_js/sdk/storage-listbuckets.mdx b/apps/reference/_supabase_js/sdk/storage-listbuckets.mdxindex a2b1b90d997..da1fb046c54 100644--- a/apps/reference/_supabase_js/sdk/storage-listbuckets.mdx+++ b/apps/reference/_supabase_js/sdk/storage-listbuckets.mdx@@ -1,49 +1,29 @@---id: storage-listbuckets-title: "listBuckets()"+title: 'listBuckets()'slug: /storage-listbucketscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of all Storage buckets within an existing project.```js-const { data, error } = await supabase- .storage- .listBuckets()+const { data, error } = await supabase.storage.listBuckets()```-----## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### List buckets--```js-const { data, error } = await supabase- .storage- .listBuckets()-```\ No newline at end of file+const { data, error } = await supabase.storage.listBuckets()+```diff --git a/apps/reference/_supabase_js/sdk/storage-updatebucket.mdx b/apps/reference/_supabase_js/sdk/storage-updatebucket.mdxindex bc5a92cf2d9..fb73694e139 100644--- a/apps/reference/_supabase_js/sdk/storage-updatebucket.mdx+++ b/apps/reference/_supabase_js/sdk/storage-updatebucket.mdx@@ -1,25 +1,23 @@---id: storage-updatebucket-title: "updateBucket()"+title: 'updateBucket()'slug: /storage-updatebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates a new Storage bucket```js-const { data, error } = await supabase- .storage- .updateBucket('avatars', { public: false })+const { data, error } = await supabase.storage.updateBucket('avatars', {+ public: false,+})```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -42,7 +40,6 @@ A unique identifier for the bucket you are updating.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -57,7 +54,7 @@ A unique identifier for the bucket you are updating.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -78,7 +75,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -90,30 +87,18 @@ No description provided.</ul>-## Notes- Policy permissions required:- `buckets` permissions: `update`- `objects` permissions: none---------## Examples### Update bucket--```js-const { data, error } = await supabase- .storage- .updateBucket('avatars', { public: false })-```\ No newline at end of file+const { data, error } = await supabase.storage.updateBucket('avatars', {+ public: false,+})+```diff --git a/apps/reference/_supabase_js/sdk/subscribe.mdx b/apps/reference/_supabase_js/sdk/subscribe.mdxindex 66b2477ffb0..b25997936c4 100644--- a/apps/reference/_supabase_js/sdk/subscribe.mdx+++ b/apps/reference/_supabase_js/sdk/subscribe.mdx@@ -1,28 +1,26 @@---id: subscribe-title: "on().subscribe()"+title: 'on().subscribe()'slug: /subscribecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Subscribe to realtime changes in your database.```jsconst mySubscription = supabase.from('*')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,7 +43,6 @@ The database event which you would like to receive updates for, or you can use t</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,31 +65,19 @@ A callback that will handle the payload that is sent whenever your database chan</ul>-## Notes- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime).- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`---------## Examples### Listen to all database changes--```jsconst mySubscription = supabase.from('*')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()@@ -100,12 +85,10 @@ const mySubscription = supabase### Listening to a specific table--```jsconst mySubscription = supabase.from('countries')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()@@ -113,12 +96,10 @@ const mySubscription = supabase### Listening to inserts--```jsconst mySubscription = supabase.from('countries')- .on('INSERT', payload => {+ .on('INSERT', (payload) => {console.log('Change received!', payload)}).subscribe()@@ -126,18 +107,17 @@ const mySubscription = supabase### Listening to updates-By default, Supabase will send only the updated record. If you want to receive the previous values as well you can-enable full replication for the table you are listening too:+By default, Supabase will send only the updated record. If you want to receive the previous values as well you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-```jsconst mySubscription = supabase.from('countries')- .on('UPDATE', payload => {+ .on('UPDATE', (payload) => {console.log('Change received!', payload)}).subscribe()@@ -145,18 +125,17 @@ const mySubscription = supabase### Listening to deletes-By default, Supabase does not send deleted records. If you want to receive the deleted record you can-enable full replication for the table you are listening too:+By default, Supabase does not send deleted records. If you want to receive the deleted record you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-```jsconst mySubscription = supabase.from('countries')- .on('DELETE', payload => {+ .on('DELETE', (payload) => {console.log('Change received!', payload)}).subscribe()@@ -183,4 +162,4 @@ const mySubscription = supabase.from('countries:id=eq.200').on('UPDATE', handleRecordUpdated).subscribe()-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/textsearch.mdx b/apps/reference/_supabase_js/sdk/textsearch.mdxindex 104c77b4b85..02514ae1b0d 100644--- a/apps/reference/_supabase_js/sdk/textsearch.mdx+++ b/apps/reference/_supabase_js/sdk/textsearch.mdx@@ -1,21 +1,18 @@---id: textsearch-title: ".textSearch()"+title: '.textSearch()'slug: /textsearchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose tsvector value on the stated `column` matchesto_tsquery(`query`).--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -38,7 +35,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -59,7 +55,6 @@ The Postgres tsquery string to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -74,7 +69,7 @@ The Postgres tsquery string to filter with.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -107,31 +102,16 @@ The text search configuration to use.</ul>-------------## Examples### Text search--```jsconst { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {- config: 'english'+ .textSearch('catchphrase', `'fat' & 'cat'`, {+ config: 'english',})```@@ -143,9 +123,9 @@ Uses PostgreSQL's `plainto_tsquery` function.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {+ .textSearch('catchphrase', `'fat' & 'cat'`, {type: 'plain',- config: 'english'+ config: 'english',})```@@ -157,16 +137,16 @@ Uses PostgreSQL's `phraseto_tsquery` function.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {+ .textSearch('catchphrase', `'fat' & 'cat'`, {type: 'phrase',- config: 'english'+ config: 'english',})```### Websearch-Uses PostgreSQL's `websearch_to_tsquery` function.-This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used+Uses PostgreSQL's `websearch_to_tsquery` function.+This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be usedwith advanced operators.- `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.@@ -174,13 +154,12 @@ with advanced operators.- `OR`: the word “or” will be converted to the | operator.- `-`: a dash will be converted to the ! operator.-```jsconst { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat or cat'`, {+ .textSearch('catchphrase', `'fat or cat'`, {type: 'websearch',- config: 'english'+ config: 'english',})-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/update.mdx b/apps/reference/_supabase_js/sdk/update.mdxindex 81003a69bb7..4ad779421da 100644--- a/apps/reference/_supabase_js/sdk/update.mdx+++ b/apps/reference/_supabase_js/sdk/update.mdx@@ -1,12 +1,12 @@---id: update-title: "Modify data: update()"+title: 'Modify data: update()'slug: /updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPDATE on the table.@@ -17,10 +17,8 @@ const { data, error } = await supabase.match({ name: 'Auckland' })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -43,7 +41,6 @@ The values to update.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +55,7 @@ The values to update.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -85,7 +82,6 @@ By default the updated record is returned. Set this to 'minimal' if you don't ne</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -112,26 +108,14 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- `update()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to update.---------## Examples### Updating your data--```jsconst { data, error } = await supabase.from('cities')@@ -141,20 +125,21 @@ const { data, error } = await supabase### Updating JSON data-Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for working with JSON data. Right now it is only possible to update an entire JSON document,+Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for working with JSON data. Right now it is only possible to update an entire JSON document,but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys.-```jsconst { data, error } = await supabase.from('users')- .update(`+ .update(+ `address: {street: 'Melrose Place',postcode: 90210}- `)+ `+ ).eq('address->postcode', 90210)-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/upsert.mdx b/apps/reference/_supabase_js/sdk/upsert.mdxindex 13084d67249..9fb12f9ae2d 100644--- a/apps/reference/_supabase_js/sdk/upsert.mdx+++ b/apps/reference/_supabase_js/sdk/upsert.mdx@@ -1,12 +1,12 @@---id: upsert-title: "Upsert data: upsert()"+title: 'Upsert data: upsert()'slug: /upsertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPSERT into the table.@@ -16,10 +16,8 @@ const { data, error } = await supabase.upsert({ id: 3, message: 'foo', username: 'supabot' })```-## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -42,7 +40,6 @@ The values to insert.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -57,7 +54,7 @@ The values to insert.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -84,7 +81,6 @@ By default the new record is returned. Set this to 'minimal' if you don't need t</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -105,7 +101,6 @@ By specifying the `on_conflict` query parameter, you can make UPSERT work on a c</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -126,7 +121,6 @@ Specifies if duplicate rows should be ignored and not inserted.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -153,27 +147,15 @@ Count algorithm to use to count rows in a table.</ul>-## Notes-- Primary keys should be included in the data payload in order for an update to work correctly.-- Primary keys must be natural, not surrogate. There are however, [workarounds](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.---------+- Primary keys should be included in the data payload in order for an update to work correctly.+- Primary keys must be natural, not surrogate. There are however, [workarounds](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.## Examples### Upsert your data--```jsconst { data, error } = await supabase.from('messages')@@ -182,24 +164,19 @@ const { data, error } = await supabase### Bulk Upsert your data--```js-const { data, error } = await supabase- .from('messages')- .upsert([+const { data, error } = await supabase.from('messages').upsert([{ id: 3, message: 'foo', username: 'supabot' },- { id: 4, message: 'bar', username: 'supabot' }- ])+ { id: 4, message: 'bar', username: 'supabot' },+])```### Upserting into tables with constraints-Running the following will cause supabase to upsert data into the `users` table.-If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that row+Running the following will cause supabase to upsert data into the `users` table.+If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that rowbased on the column passed into `onConflict`.-```jsconst { data, error } = await supabase.from('users')@@ -208,15 +185,15 @@ const { data, error } = await supabase### Return the exact number of rows--```js-const { data, error, count } = await supabase- .from('users')- .upsert({- id: 3, message: 'foo',- username: 'supabot'- }, {- count: 'exact'- })-```\ No newline at end of file+const { data, error, count } = await supabase.from('users').upsert(+ {+ id: 3,+ message: 'foo',+ username: 'supabot',+ },+ {+ count: 'exact',+ }+)+```diff --git a/apps/reference/_supabase_js/sdk/using-filters.mdx b/apps/reference/_supabase_js/sdk/using-filters.mdxindex 49664a05397..61c8b3e4286 100644--- a/apps/reference/_supabase_js/sdk/using-filters.mdx+++ b/apps/reference/_supabase_js/sdk/using-filters.mdx@@ -1,14 +1,14 @@---id: using-filters-title: "Using Filters"+title: 'Using Filters'slug: /using-filterscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Filters can be used on `select()`, `update()`, and `delete()` queries.+Filters can be used on `select()`, `update()`, and `delete()` queries.If a Postgres function returns a table response, you can also apply filters.@@ -20,11 +20,11 @@ You must apply your filters to the end of your query. For example:const { data, error } = await supabase.from('cities').select('name, country_id')- .eq('name', 'The Shire') // Correct+ .eq('name', 'The Shire') // Correctconst { data, error } = await supabase.from('cities')- .eq('name', 'The Shire') // Incorrect+ .eq('name', 'The Shire') // Incorrect.select('name, country_id')```@@ -49,13 +49,17 @@ const filterByName = nullconst filterPopLow = 1000const filterPopHigh = 10000-let query = supabase- .from('cities')- .select('name, country_id')--if (filterByName) { query = query.eq('name', filterByName) }-if (filterPopLow) { query = query.gte('population', filterPopLow) }-if (filterPopHigh) { query = query.lt('population', filterPopHigh) }+let query = supabase.from('cities').select('name, country_id')++if (filterByName) {+ query = query.eq('name', filterByName)+}+if (filterPopLow) {+ query = query.gte('population', filterPopLow)+}+if (filterPopHigh) {+ query = query.lt('population', filterPopHigh)+}const { data, error } = await query-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js/sdk/using-modifiers.mdx b/apps/reference/_supabase_js/sdk/using-modifiers.mdxindex 2b7c9351e86..933bbaaaefb 100644--- a/apps/reference/_supabase_js/sdk/using-modifiers.mdx+++ b/apps/reference/_supabase_js/sdk/using-modifiers.mdx@@ -1,13 +1,13 @@---id: using-modifiers-title: "Using Modifiers"+title: 'Using Modifiers'slug: /using-modifierscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase_js_v2_ref.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Modifiers can be used on `select()` queries.+Modifiers can be used on `select()` queries.-If a Postgres function returns a table response, you can also apply modifiers to the `rpc()` function.\ No newline at end of file+If a Postgres function returns a table response, you can also apply modifiers to the `rpc()` function.diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-createuser.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-createuser.mdxindex 07a1958e1a1..5304713306c 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-createuser.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-createuser.mdx@@ -1,12 +1,12 @@---id: auth-api-createuser-title: "createUser()"+title: 'createUser()'slug: auth-api-createusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new user.@@ -23,18 +23,16 @@ This function should only be called on a server. Never expose your `service_roleconst { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',password: 'password',- user_metadata: { name: 'Yoda' }+ user_metadata: { name: 'Yoda' },})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -59,28 +57,16 @@ The data you want to create the user with.</ul>-## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.- If you do not provide the `email_confirm` and `phone_confirm` options to this function, both will default to false.---------## Examples### Create a new user.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -92,19 +78,16 @@ The data you want to create the user with.const { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',password: 'password',- user_metadata: { name: 'Yoda' }+ user_metadata: { name: 'Yoda' },})```-</TabItem></Tabs>### Auto-confirm email.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -115,19 +98,16 @@ const { data: user, error } = await supabase.auth.api.createUser({```jsconst { data: user, error } = await supabase.auth.api.createUser({email: '[email protected]',- email_confirm: true+ email_confirm: true,})```-</TabItem></Tabs>### Auto-confirm phone.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -138,11 +118,10 @@ const { data: user, error } = await supabase.auth.api.createUser({```jsconst { data: user, error } = await supabase.auth.api.createUser({phone: '1234567890',- phone_confirm: true+ phone_confirm: true,})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-deleteuser.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-deleteuser.mdxindex ff8e4acff96..be86ecc7804 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-deleteuser.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-deleteuser.mdx@@ -1,12 +1,12 @@---id: auth-api-deleteuser-title: "deleteUser()"+title: 'deleteUser()'slug: auth-api-deleteusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Delete a user. Requires a `service_role` key.@@ -25,14 +25,12 @@ const { data: user, error } = await supabase.auth.api.deleteUser()```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -57,27 +55,15 @@ The user uid you want to remove.</ul>-## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Remove a user completely.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -91,7 +77,6 @@ const { data: user, error } = await supabase.auth.api.deleteUser()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-generatelink.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-generatelink.mdxindex 540ff45da0f..d694b2e3357 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-generatelink.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-generatelink.mdx@@ -1,20 +1,17 @@---id: auth-api-generatelink-title: "generateLink()"+title: 'generateLink()'slug: auth-api-generatelinkcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Generates links to be sent via email or other.--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The link type ("signup" or "magiclink" or "recovery" or "invite").</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -58,7 +54,6 @@ The user's email.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -73,7 +68,7 @@ The user's email.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -94,13 +89,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -115,13 +109,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -136,7 +129,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -148,27 +141,15 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Generate invite link.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -183,7 +164,6 @@ const { data: user, error } = await supabase.auth.api.generateLink()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-getuser.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-getuser.mdxindex 3ad698e9be5..5cf3d958ba9 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-getuser.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-getuser.mdx@@ -1,12 +1,12 @@---id: auth-api-getuser-title: "getUser()"+title: 'getUser()'slug: auth-api-getusercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Gets the current user details.@@ -22,19 +22,15 @@ and therefore, acts like getting the currently authenticated user<TabItem value="js">```js-const { user, error } = await supabase.auth.api.getUser(- 'ACCESS_TOKEN_JWT',-)+const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -59,28 +55,16 @@ A valid, logged-in JWT. Typically, the access_token for the currentSession</ul>-## Notes- Fetches the user object from the database instead of local storage.- Note that user() fetches the user object from local storage which might not be the most updated.- Requires the user's access_token.---------## Examples### Fetch the user object using the access_token jwt.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -89,12 +73,9 @@ A valid, logged-in JWT. Typically, the access_token for the currentSession<TabItem value="js">```js-const { user, error } = await supabase.auth.api.getUser(- 'ACCESS_TOKEN_JWT',-)+const { user, error } = await supabase.auth.api.getUser('ACCESS_TOKEN_JWT')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-inviteuserbyemail.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-inviteuserbyemail.mdxindex 0f6479e5127..42b351402dc 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-inviteuserbyemail.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-inviteuserbyemail.mdx@@ -1,20 +1,17 @@---id: auth-api-inviteuserbyemail-title: "inviteUserByEmail()"+title: 'inviteUserByEmail()'slug: auth-api-inviteuserbyemailcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends an invite link to an email address.--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The email address of the user.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -52,7 +48,7 @@ The email address of the user.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -73,13 +69,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,7 +89,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -106,27 +101,15 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Basic example.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -135,12 +118,11 @@ No description provided.<TabItem value="js">```js-const { data: user, error } = await supabase.auth- .api- .inviteUserByEmail('[email protected]')+const { data: user, error } = await supabase.auth.api.inviteUserByEmail(+)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-listusers.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-listusers.mdxindex e3c7b9e37f7..28c3b32bb40 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-listusers.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-listusers.mdx@@ -1,12 +1,12 @@---id: auth-api-listusers-title: "listUsers()"+title: 'listUsers()'slug: auth-api-listuserscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Get a list of users.@@ -23,35 +23,19 @@ This function should only be called on a server. Never expose your `service_roleconst { data: user, error } = await supabase.auth.api.listUsers()```-</TabItem></Tabs>----## Notes- Requires a `service_role` key.- This function should be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Get a full list of users.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -63,7 +47,6 @@ const { data: user, error } = await supabase.auth.api.listUsers()const { data: user, error } = await supabase.auth.api.listUsers()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-resetpasswordforemail.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-resetpasswordforemail.mdxindex 0196aa94520..044b55e6246 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-resetpasswordforemail.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-resetpasswordforemail.mdx@@ -1,12 +1,12 @@---id: auth-api-resetpasswordforemail-title: "resetPasswordForEmail()"+title: 'resetPasswordForEmail()'slug: auth-api-resetpasswordforemailcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends a reset request to an email address.@@ -18,18 +18,17 @@ Sends a reset request to an email address.<TabItem value="js">```js-const { data, error } = await supabase.auth.api- .resetPasswordForEmail('[email protected]')+const { data, error } = await supabase.auth.api.resetPasswordForEmail(+)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -52,7 +51,6 @@ The email address of the user.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -67,7 +65,7 @@ The email address of the user.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -88,13 +86,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -109,7 +106,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -121,7 +118,6 @@ No description provided.</ul>-## NotesSends a reset request to an email address.@@ -135,25 +131,15 @@ Your app must detect `type=recovery` in the fragment and display a password reseYou should then use the access_token in the url and new password to update the user as follows:```js-const { error, data } = await supabase.auth.api- .updateUser(access_token, { password : new_password })+const { error, data } = await supabase.auth.api.updateUser(access_token, {+ password: new_password,+})```---------## Examples### Reset password--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -162,11 +148,11 @@ const { error, data } = await supabase.auth.api<TabItem value="js">```js-const { data, error } = await supabase.auth.api- .resetPasswordForEmail('[email protected]')+const { data, error } = await supabase.auth.api.resetPasswordForEmail(+)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-sendmobileotp.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-sendmobileotp.mdxindex 969dfe58a3e..3c206e079cf 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-sendmobileotp.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-sendmobileotp.mdx@@ -1,20 +1,17 @@---id: auth-api-sendmobileotp-title: "sendMobileOTP()"+title: 'sendMobileOTP()'slug: auth-api-sendmobileotpcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Sends a mobile OTP via SMS. Will register the account if it doesn't already exist--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -37,7 +34,6 @@ The user's phone number WITH international prefix</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -52,7 +48,7 @@ The user's phone number WITH international prefix</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -73,13 +69,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -94,7 +89,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -106,27 +101,15 @@ No description provided.</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Basic example.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -135,12 +118,9 @@ No description provided.<TabItem value="js">```js-const { data: user, error } = await supabase.auth- .api- .sendMobileOTP('12345879')+const { data: user, error } = await supabase.auth.api.sendMobileOTP('12345879')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-updateuserbyid.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-updateuserbyid.mdxindex df0565e3272..b83d7947919 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-updateuserbyid.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-api-updateuserbyid.mdx@@ -1,12 +1,12 @@---id: auth-api-updateuserbyid-title: "updateUserById()"+title: 'updateUserById()'slug: auth-api-updateuserbyidcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates the user data.@@ -24,14 +24,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,13 +46,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById(</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,27 +76,15 @@ This function should only be called on a server. Never expose your `service_role</ul>-## Notes- Requires a `service_role` key.- This function should only be called on a server. Never expose your `service_role` key in the browser.---------## Examples### Updates a user's email.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -114,15 +99,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>### Updates a user's password.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -137,15 +119,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>### Updates a user's metadata.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -160,15 +139,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>### Updates a user's app_metadata.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -183,15 +159,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>### Confirms a user's email address.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -206,15 +179,12 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem></Tabs>### Confirms a user's phone number.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -229,7 +199,6 @@ const { data: user, error } = await supabase.auth.api.updateUserById()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-onauthstatechange.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-onauthstatechange.mdxindex e57427a6851..8ccf0c63fb8 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-onauthstatechange.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-onauthstatechange.mdx@@ -1,12 +1,12 @@---id: auth-onauthstatechange-title: "onAuthStateChange()"+title: 'onAuthStateChange()'slug: auth-onauthstatechangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Receive a notification every time an auth event happens.@@ -23,14 +23,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -47,7 +45,7 @@ supabase.auth.onAuthStateChange((event, session) => {</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -55,25 +53,10 @@ No description provided.</ul>-------------## Examples### Listen to auth changes--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -87,15 +70,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to sign in--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -109,15 +89,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to sign out--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -131,15 +108,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to token refresh--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -153,15 +127,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to user updates--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -175,15 +146,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to user deleted--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -197,15 +165,12 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem></Tabs>### Listen to password recovery events--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -219,7 +184,6 @@ supabase.auth.onAuthStateChange((event, session) => {})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-session.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-session.mdxindex d2bafcbd3ec..33725c8b844 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-session.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-session.mdx@@ -1,12 +1,12 @@---id: auth-session-title: "session()"+title: 'session()'slug: auth-sessioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns the session data, if there is an active session.@@ -21,33 +21,14 @@ Returns the session data, if there is an active session.const session = supabase.auth.session()```-</TabItem></Tabs>----------------## Examples### Get the session data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -59,7 +40,6 @@ const session = supabase.auth.session()const session = supabase.auth.session()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-setauth.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-setauth.mdxindex b5e5339dad5..81a30c9f8d5 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-setauth.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-setauth.mdx@@ -1,12 +1,12 @@---id: auth-setauth-title: "setAuth()"+title: 'setAuth()'slug: auth-setauthcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests.@@ -20,9 +20,9 @@ Overrides the JWT on the current client. The JWT will then be sent in all subseq```jsfunction apiFunction(req, res) {// Assuming the access token was sent as a header "X-Supabase-Auth"- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client+ // You can now use it within a Supabase Clientconst supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")const { user, error } = supabase.auth.setAuth(access_token)@@ -31,14 +31,12 @@ function apiFunction(req, res) {}```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -63,19 +61,6 @@ a jwt access token</ul>-------------## Examples### Basic example.@@ -92,9 +77,9 @@ This is most useful on server-side functions where you cannot log the user in, b```jsfunction apiFunction(req, res) {// Assuming the access token was sent as a header "X-Supabase-Auth"- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client+ // You can now use it within a Supabase Clientconst supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")const { user, error } = supabase.auth.setAuth(access_token)@@ -103,15 +88,12 @@ function apiFunction(req, res) {}```-</TabItem></Tabs>### With Express.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -120,33 +102,35 @@ function apiFunction(req, res) {<TabItem value="js">```js-/**-* Make a request from the client to your server function-*/+ * Make a request from the client to your server function+ */async function makeApiRequest() {const token = newClient.session()?.access_tokenawait fetch('https://example.com/withAuth', {- method: 'GET',- withCredentials: true,- credentials: 'include',- headers: {+ method: 'GET',+ withCredentials: true,+ credentials: 'include',+ headers: {'Content-Type': 'application/json',- 'Authorization': bearer, // Your own auth+ Authorization: bearer, // Your own auth'X-Supabase-Auth': token, // Set the Supabase user- }+ },})}/**-* Use the Auth token in your server-side function.-*/+ * Use the Auth token in your server-side function.+ */async function apiFunction(req, res) {- const { access_token } = req.get('X-Supabase-Auth')+ const { access_token } = req.get('X-Supabase-Auth')- // You can now use it within a Supabase Client- const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key")+ // You can now use it within a Supabase Client+ const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key'+ )const { user, error } = supabase.auth.setAuth(access_token)// This client will now send requests as this user@@ -154,7 +138,6 @@ async function apiFunction(req, res) {}```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signin.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signin.mdxindex 61a0ac22607..73432bdbc55 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signin.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signin.mdx@@ -1,12 +1,12 @@---id: auth-signin-title: "signIn()"+title: 'signIn()'slug: auth-signincustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Log in an existing user, or login via a third-party provider.@@ -24,14 +24,12 @@ const { user, session, error } = await supabase.auth.signIn({})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,13 +46,12 @@ const { user, session, error } = await supabase.auth.signIn({</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -90,13 +87,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -111,13 +107,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -132,13 +127,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -153,13 +147,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -174,7 +167,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -186,7 +179,6 @@ No description provided.</ul>-## Notes- A user can sign up either via email or OAuth.@@ -194,21 +186,10 @@ No description provided.- The magic link's destination URL is determined by the SITE_URL config variable. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)- Specifying a `provider` will open the browser to the relevant login page.---------## Examples### Sign in with email.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -223,7 +204,6 @@ const { user, session, error } = await supabase.auth.signIn({})```-</TabItem></Tabs>@@ -241,11 +221,10 @@ If no password is provided, the user will be sent a "magic link" to their email```jsconst { user, session, error } = await supabase.auth.signIn({- email: '[email protected]'+ email: '[email protected]',})```-</TabItem></Tabs>@@ -264,11 +243,10 @@ Supabase supports many different [third-party providers](https://supabase.com/do```jsconst { user, session, error } = await supabase.auth.signIn({// provider can be 'github', 'google', 'gitlab', and more- provider: 'github'+ provider: 'github',})```-</TabItem></Tabs>@@ -291,19 +269,17 @@ const { user, session, error } = await supabase.auth.signIn({})```-</TabItem></Tabs>### Sign in with redirect.-Note that the `redirectTo` param is only relevant for OAuth logins, where the login flow is managed by+Note that the `redirectTo` param is only relevant for OAuth logins, where the login flow is managed bythe Auth server. If you are using email/phone logins you should set up your own redirects (within the email/sms template).--Sometimes you want to control where the user is redirected to after they are logged in. Supabase supports this for-any URL path on your website (the URL must either be on the same domain as your Site URL [see Auth>Settings in dashboard], or must match one of the Additional Redirect URLs [also in Auth>Settings]).+Sometimes you want to control where the user is redirected to after they are logged in. Supabase supports this for+any URL path on your website (the URL must either be on the same domain as your Site URL [see Auth>Settings in dashboard], or must match one of the Additional Redirect URLs [also in Auth>Settings]).<TabsdefaultValue="js"@@ -313,14 +289,16 @@ any URL path on your website (the URL must either be on the same domain as your<TabItem value="js">```js-const { user, session, error } = await supabase.auth.signIn({- provider: 'github'-}, {- redirectTo: 'https://example.com/welcome'-})+const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'github',+ },+ {+ redirectTo: 'https://example.com/welcome',+ }+)```-</TabItem></Tabs>@@ -330,7 +308,6 @@ const { user, session, error } = await supabase.auth.signIn({If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token.You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -339,15 +316,17 @@ You may also need to specify the scopes in the provider's OAuth app settings, de<TabItem value="js">```js-const { user, session, error } = await supabase.auth.signIn({- provider: 'github'-}, {- scopes: 'repo gist notifications'-})+const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'github',+ },+ {+ scopes: 'repo gist notifications',+ }+)const oAuthToken = session.provider_token // use to access provider API```-</TabItem></Tabs>@@ -356,7 +335,6 @@ const oAuthToken = session.provider_token // use to access provider APIIf you are completing a sign up or login in a React Native app you can pass the refresh token obtained from the provider to obtain a session.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -366,21 +344,20 @@ If you are completing a sign up or login in a React Native app you can pass the```js// An example using Expo's `AuthSession`-const redirectUri = AuthSession.makeRedirectUri({ useProxy: false });-const provider = 'google';+const redirectUri = AuthSession.makeRedirectUri({ useProxy: false })+const provider = 'google'AuthSession.startAsync({authUrl: `https://MYSUPABASEAPP.supabase.co/auth/v1/authorize?provider=${provider}&redirect_to=${redirectUri}`,returnUrl: redirectUri,}).then(async (response: any) => {- if (!response) return;+ if (!response) returnconst { user, session, error } = await supabase.auth.signIn({refreshToken: response.params?.refresh_token,- });-});+ })+})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signout.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signout.mdxindex 01e7ea089db..8a157ce461c 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signout.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signout.mdx@@ -1,12 +1,12 @@---id: auth-signout-title: "signOut()"+title: 'signOut()'slug: auth-signoutcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Inside a browser context, `signOut()` will remove the logged in user from the browser sessionand log them out - removing all items from localstorage and then trigger a "SIGNED_OUT" event.@@ -24,33 +24,14 @@ For server-side management, you can revoke all refresh tokens for a user by passconst { error } = await supabase.auth.signOut()```-</TabItem></Tabs>----------------## Examples### Sign out--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -62,7 +43,6 @@ const { error } = await supabase.auth.signOut()const { error } = await supabase.auth.signOut()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signup.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signup.mdxindex f9b2a3467b6..be5d55c5610 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signup.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-signup.mdx@@ -1,12 +1,12 @@---id: auth-signup-title: "signUp()"+title: 'signUp()'slug: auth-signupcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new user.@@ -24,14 +24,12 @@ const { user, session, error } = await supabase.auth.signUp({})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,13 +46,12 @@ const { user, session, error } = await supabase.auth.signUp({</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -90,13 +87,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -111,13 +107,12 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div></li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -132,7 +127,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -144,7 +139,6 @@ No description provided.</ul>-## Notes- By default, the user will need to verify their email address before logging in. If you would like to change this, you can disable "Email Confirmations" by going to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)@@ -152,25 +146,14 @@ No description provided.- If "Email Confirmations" is turned off, both a `user` and a `session` will be returned- When the user confirms their email address, they will be redirected to localhost:3000 by default. To change this, you can go to Authentication -> Settings on [app.supabase.com](https://app.supabase.com)- If signUp() is called for an existing confirmed user:- - If "Enable email confirmations" is enabled on the "Authentication" -> "Settings" page, an obfuscated / fake user object will be returned.- - If "Enable email confirmations" is disabled, an error with a message "User already registered" will be returned.+ - If "Enable email confirmations" is enabled on the "Authentication" -> "Settings" page, an obfuscated / fake user object will be returned.+ - If "Enable email confirmations" is disabled, an error with a message "User already registered" will be returned.- To check if a user already exists, refer to getUser().---------## Examples### Sign up.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -185,15 +168,12 @@ const { user, session, error } = await supabase.auth.signUp({})```-</TabItem></Tabs>### Sign up with additional user meta data.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -208,15 +188,14 @@ const { user, session, error } = await supabase.auth.signUp(password: 'example-password',},{- data: {- first_name: 'John',+ data: {+ first_name: 'John',age: 27,- }+ },})```-</TabItem></Tabs>@@ -229,7 +208,6 @@ You can sign up with OAuth providers using the [`signIn()`](/docs/reference/javaSupabase supports Phone Auth. After a user has verified their number, they can use the [`signIn()`](/docs/reference/javascript/auth-signin#sign-in-using-phone) method.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -250,7 +228,6 @@ let { session, error } = await supabase.auth.verifyOTP({})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-update.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-update.mdxindex 54b93440033..a4f8d8e6bfe 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-update.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-update.mdx@@ -1,12 +1,12 @@---id: auth-update-title: "update()"+title: 'update()'slug: auth-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates user data, if there is a logged in user.@@ -18,17 +18,15 @@ Updates user data, if there is a logged in user.<TabItem value="js">```js-const { user, error } = await supabase.auth.update({email: '[email protected]'})+const { user, error } = await supabase.auth.update({ email: '[email protected]' })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -45,7 +43,7 @@ const { user, error } = await supabase.auth.update({email: '[email protected]'})</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -53,25 +51,14 @@ No description provided.</ul>-## NotesUser email: Email updates will send an email to both the user's current and new email with a confirmation link by default.To toggle this behavior off and only send a single confirmation link to the new email, toggle "Double confirm email changes" under "Authentication" -> "Settings" off.--User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).+User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).Use the `update()` method if you have data which rarely changes or is specific only to the logged in user.---------## Examples### Update email for authenticated user.@@ -86,18 +73,15 @@ Sends a "Confirm Email Change" email to the new email address.<TabItem value="js">```js-const { user, error } = await supabase.auth.update({email: '[email protected]'})+const { user, error } = await supabase.auth.update({ email: '[email protected]' })```-</TabItem></Tabs>### Update password for authenticated user.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -106,18 +90,15 @@ const { user, error } = await supabase.auth.update({email: '[email protected]'})<TabItem value="js">```js-const { user, error } = await supabase.auth.update({password: 'new password'})+const { user, error } = await supabase.auth.update({ password: 'new password' })```-</TabItem></Tabs>### Update a user's metadata.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -126,12 +107,11 @@ const { user, error } = await supabase.auth.update({password: 'new password'})<TabItem value="js">```js-const { user, error } = await supabase.auth.update({- data: { hello: 'world' }+const { user, error } = await supabase.auth.update({+ data: { hello: 'world' },})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-user.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-user.mdxindex 22a6c096b30..5631da9ebed 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/auth-user.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/auth-user.mdx@@ -1,12 +1,12 @@---id: auth-user-title: "user()"+title: 'user()'slug: auth-usercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Inside a browser context, `user()` will return the user data, if there is a logged in user.@@ -23,34 +23,18 @@ For server-side management, you can get a user through `auth.api.getUserByCookieconst user = supabase.auth.user()```-</TabItem></Tabs>----## NotesThis method gets the user object from memory.---------## Examples### Get the logged in user--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -62,7 +46,6 @@ This method gets the user object from memory.const user = supabase.auth.user()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/containedby.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/containedby.mdxindex 7dbc64a74db..1a4beb88682 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/containedby.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/containedby.mdx@@ -1,14 +1,12 @@---id: containedby-title: ".containedBy()"+title: '.containedBy()'slug: containedbycustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,15 +22,10 @@ const { data, error } = await supabase.containedBy('main_exports', ['cars', 'food', 'machine'])```-</TabItem></Tabs>----## Notes- `.containedBy()` can work on array columns or range columns.@@ -44,21 +37,10 @@ const { data, error } = await supabase.containedBy('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -73,15 +55,12 @@ const { data, error } = await supabase.containedBy('main_exports', ['cars', 'food', 'machine'])```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -96,15 +75,12 @@ const { data, error } = await supabase.containedBy('main_exports', ['orks', 'surveillance', 'evil'])```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -119,15 +95,12 @@ const { data, error } = await supabase.containedBy('main_exports', ['cars', 'food', 'machine'])```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -142,7 +115,6 @@ const { data, error } = await supabase.containedBy('main_exports', ['cars', 'food', 'machine'])```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/contains.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/contains.mdxindex 91e6d30d646..45d1b70c6e2 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/contains.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/contains.mdx@@ -1,14 +1,12 @@---id: contains-title: ".contains()"+title: '.contains()'slug: containscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,15 +22,10 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-</TabItem></Tabs>----## Notes- `.contains()` can work on array columns or range columns.@@ -45,21 +38,10 @@ const { data, error } = await supabase.contains('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -74,15 +56,12 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -97,15 +76,12 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -120,15 +96,12 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -143,7 +116,6 @@ const { data, error } = await supabase.contains('main_exports', ['oil'])```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/delete.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/delete.mdxindex cb521c142c8..41075b120ef 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/delete.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/delete.mdx@@ -1,12 +1,12 @@---id: delete-title: "Delete data: delete()"+title: 'Delete data: delete()'slug: deletecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs a DELETE on the table.@@ -24,14 +24,12 @@ const { data, error } = await supabase.match({ id: 666 })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -48,7 +46,7 @@ const { data, error } = await supabase</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -75,7 +73,6 @@ If `true`, return the deleted row(s) in the response.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -102,7 +99,6 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete.@@ -112,21 +108,10 @@ Count algorithm to use to count rows in a table.no rows are visible, so you need at least one `SELECT`/`ALL` policy thatmakes the rows visible.---------## Examples### Delete records--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -141,7 +126,6 @@ const { data, error } = await supabase.match({ id: 666 })```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/eq.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/eq.mdxindex e53807ff03f..506ac14c24d 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/eq.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/eq.mdx@@ -1,12 +1,12 @@---id: eq-title: ".eq()"+title: '.eq()'slug: eqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` exactly matches thespecified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.eq('name', 'The shire')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.eq('name', 'The shire')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.eq('name', 'San Francisco')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.eq('name', 'Mordor')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.eq('name', 'San Francisco')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/filter.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/filter.mdxindex 260e432dc1a..88f0190da3d 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/filter.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/filter.mdx@@ -1,12 +1,12 @@---id: filter-title: ".filter()"+title: '.filter()'slug: filtercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose `column` satisfies the filter.@@ -24,14 +24,12 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -75,7 +72,6 @@ The operator to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -98,7 +94,6 @@ The value to filter with.</ul>-## Notes- `.filter()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values, so it should only be used as an escape hatch in case other filters don't work.@@ -109,21 +104,10 @@ The value to filter with..filter('id','in',`(${arr})`) // You can insert a javascript array.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -138,15 +122,12 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -161,15 +142,12 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -184,15 +162,12 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -207,15 +182,12 @@ const { data, error } = await supabase.filter('name', 'in', '("Paris","Tokyo")')```-</TabItem></Tabs>### Filter embedded resources--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -230,7 +202,6 @@ const { data, error } = await supabase.filter('countries.name', 'in', '("France","Japan")')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/generating-types.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/generating-types.mdxindex f79966e82b4..dd81e860e66 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/generating-types.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/generating-types.mdx@@ -1,12 +1,12 @@---id: generating-types-title: "Generating Types"+title: 'Generating Types'slug: generating-typescustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Supabase will soon release native type generators that dump your database types for various languages. For now, we support TypeScript [through third-party tools](/docs/guides/api/generating-types).@@ -14,17 +14,17 @@ Supabase will soon release native type generators that dump your database types`supabase-js` ships with type definitions for usage with TypeScript and for convenient IntelliSense auto-complete and documentation in your editor.-When using TypeScript, you can pass the type of database row as a type parameter to the `from` method to get better auto-completion support down the chain.+When using TypeScript, you can pass the type of database row as a type parameter to the `from` method to get better auto-completion support down the chain.If you don't provide a type for the row you need to explicitly pass `from<any>('tableName')`.```tstype Message = {- id: number;- inserted_at: string;- message: string;- user_id: string;- channel_id: number;- author: { username: string };+ id: number+ inserted_at: string+ message: string+ user_id: string+ channel_id: number+ author: { username: string }}const response = await supabase@@ -39,4 +39,4 @@ const response = await supabase.select('*, author:user_id(username)').match({ channel_id: 2 })response.data // Response data will be of type Array<any>.-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/getsubscriptions.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/getsubscriptions.mdxindex f416012ba1e..beea8b5a5fc 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/getsubscriptions.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/getsubscriptions.mdx@@ -1,12 +1,12 @@---id: getsubscriptions-title: "getSubscriptions()"+title: 'getSubscriptions()'slug: getsubscriptionscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Returns an array of all your subscriptions.@@ -21,33 +21,14 @@ Returns an array of all your subscriptions.const subscriptions = supabase.getSubscriptions()```-</TabItem></Tabs>----------------## Examples### Get all subscriptions--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -59,7 +40,6 @@ const subscriptions = supabase.getSubscriptions()const subscriptions = supabase.getSubscriptions()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/gt.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/gt.mdxindex 930e32c7a54..1a8c50984eb 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/gt.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/gt.mdx@@ -1,12 +1,12 @@---id: gt-title: ".gt()"+title: '.gt()'slug: gtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than thespecified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.gt('country_id', 250)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.gt('country_id', 250)```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.gt('country_id', 250)```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.gt('country_id', 250)```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.gt('country_id', 250)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/gte.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/gte.mdxindex f3fc60960b0..fd6424389d4 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/gte.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/gte.mdx@@ -1,12 +1,12 @@---id: gte-title: ".gte()"+title: '.gte()'slug: gtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is greater than orequal to the specified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.gte('country_id', 250)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.gte('country_id', 250)```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.gte('country_id', 250)```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.gte('country_id', 250)```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.gte('country_id', 250)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/ilike.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/ilike.mdxindex 8b28c633dc8..085bd2ef9ab 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/ilike.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/ilike.mdx@@ -1,12 +1,12 @@---id: ilike-title: ".ilike()"+title: '.ilike()'slug: ilikecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied`pattern` (case insensitive).@@ -25,14 +25,12 @@ const { data, error } = await supabase.ilike('name', '%la%')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The pattern to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.ilike('name', '%la%')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.ilike('name', '%la%')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.ilike('name', '%la%')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.ilike('name', '%la%')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/in.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/in.mdxindex d393342b80a..d5e4a468107 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/in.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/in.mdx@@ -1,12 +1,12 @@---id: in-title: ".in()"+title: '.in()'slug: incustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is found on thespecified `values`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The values to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.in('name', ['Rio de Janeiro', 'San Francisco'])```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/initializing.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/initializing.mdxindex b6844ce57aa..f921020d8f0 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/initializing.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/initializing.mdx@@ -1,24 +1,20 @@---id: initializing-title: "Initializing"+title: 'Initializing'slug: initializingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'You can initialize a new Supabase client using the `createClient()` method.The Supabase client is your entrypoint to the rest of the Supabase functionalityand is the easiest way to interact with everything we offer within the Supabase ecosystem.---## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -41,7 +37,6 @@ The unique Supabase URL which is supplied when you create a new project in your</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -62,7 +57,6 @@ The unique Supabase Key which is supplied when you create a new project in your</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,7 +71,7 @@ The unique Supabase Key which is supplied when you create a new project in your</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -85,25 +79,10 @@ No description provided.</ul>-------------## Examples### createClient()--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -114,19 +93,19 @@ No description provided.```jsimport { createClient } from '@supabase/supabase-js'-// Create a single supabase client for interacting with your database-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')+// Create a single supabase client for interacting with your database+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key'+)```-</TabItem></Tabs>### With additional parameters--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -142,20 +121,21 @@ const options = {headers: { 'x-my-custom-header': 'my-app-name' },autoRefreshToken: true,persistSession: true,- detectSessionInUrl: true+ detectSessionInUrl: true,}-const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", options)+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ options+)```-</TabItem></Tabs>### API schemas--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -167,25 +147,26 @@ const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-keyimport { createClient } from '@supabase/supabase-js'// Provide a custom schema. Defaults to "public".-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {- schema: 'other_schema'-})+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ {+ schema: 'other_schema',+ }+)```-By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.+By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard.Go to `Settings > API > Schema` and add the schema which you want to expose to the API.Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema.-</TabItem></Tabs>### Custom `fetch` implementation--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -196,16 +177,19 @@ Note: each client connection can only access a single schema, so the code above```jsimport { createClient } from '@supabase/supabase-js'-const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {- fetch: fetch.bind(globalThis)-})+const supabase = createClient(+ 'https://xyzcompany.supabase.co',+ 'public-anon-key',+ {+ fetch: fetch.bind(globalThis),+ }+)```-`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,-but an alternative `fetch` implementation can be provided as an option.+`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests,+but an alternative `fetch` implementation can be provided as an option.This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers).-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/insert.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/insert.mdxindex b47c9683166..8c41fdd2d3e 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/insert.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/insert.mdx@@ -1,12 +1,12 @@---id: insert-title: "Create data: insert()"+title: 'Create data: insert()'slug: insertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an INSERT into the table.@@ -20,19 +20,15 @@ Performs an INSERT into the table.```jsconst { data, error } = await supabase.from('cities')- .insert([- { name: 'The Shire', country_id: 554 }- ])+ .insert([{ name: 'The Shire', country_id: 554 }])```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +51,6 @@ The values to insert.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -70,7 +65,7 @@ The values to insert.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -78,28 +73,16 @@ No description provided.</ul>-## Notes- By default, every time you run `insert()`, the client library will make a `select` to return the full record.-This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.-If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.---------+ This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.+ If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.## Examples### Create a record--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -110,22 +93,18 @@ If you are using Row Level Security and you are encountering problems, try setti```jsconst { data, error } = await supabase.from('cities')- .insert([- { name: 'The Shire', country_id: 554 }- ])+ .insert([{ name: 'The Shire', country_id: 554 }])```-</TabItem></Tabs>### Bulk create-When running a bulk create, the operation is handled in a single transaction. If any of the inserts fail, all other operations are+When running a bulk create, the operation is handled in a single transaction. If any of the inserts fail, all other operations arerolled back.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,28 +113,24 @@ rolled back.<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .insert([- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- ])+const { data, error } = await supabase.from('cities').insert([+ { name: 'The Shire', country_id: 554 },+ { name: 'Rohan', country_id: 555 },+])```-</TabItem></Tabs>### Upsert-For upsert, if set to true, primary key columns would need to be included-in the data parameter in order for an update to properly happen. Also, primary keys-used must be natural, not surrogate. There are however,-[workarounds](https://github.com/PostgREST/postgrest/issues/1118)+For upsert, if set to true, primary key columns would need to be included+in the data parameter in order for an update to properly happen. Also, primary keys+used must be natural, not surrogate. There are however,+[workarounds](https://github.com/PostgREST/postgrest/issues/1118)for surrogate primary keys.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -164,18 +139,16 @@ for surrogate primary keys.<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .insert(- [- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- { name: 'City by the Bay', country_id:840}- ],- { upsert: true })+const { data, error } = await supabase.from('cities').insert(+ [+ { name: 'The Shire', country_id: 554 },+ { name: 'Rohan', country_id: 555 },+ { name: 'City by the Bay', country_id: 840 },+ ],+ { upsert: true }+)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/installing.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/installing.mdxindex cb6372c7d8b..960bac4e30f 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/installing.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/installing.mdx@@ -1,34 +1,37 @@---id: installing-title: "Installing"+title: 'Installing'slug: installingcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-All JavaScript libraries are built directly by the Supabase team.+All JavaScript libraries are built directly by the Supabase team.Other languages are built by the community and supported by Supabase.## JavaScriptVia NPM+```bashnpm install @supabase/supabase-js```Via Yarn+```bashyarn add @supabase/supabase-js```-Find the source code on [GitHub](https://github.com/supabase/supabase-js).+Find the source code on [GitHub](https://github.com/supabase/supabase-js).Or via CDN+```js<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>//or<script src="https://unpkg.com/@supabase/supabase-js"></script>-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/invoke.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/invoke.mdxindex 6bf7b57b40b..b553ac81c33 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/invoke.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/invoke.mdx@@ -1,12 +1,12 @@---id: invoke-title: "invoke()"+title: 'invoke()'slug: invokecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Invokes a Supabase Function.@@ -19,7 +19,6 @@ Edge Functions are Experimental until 1 August 2022. There will breaking changesWe have released Supabase Functions to gather feedback. You're welcome to try them out and send us feedback but we strongly advise against using them for anything in production.There will be breaking changes with no notice.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -29,18 +28,16 @@ There will be breaking changes with no notice.```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -63,7 +60,6 @@ the name of the function to invoke</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -89,27 +85,15 @@ object with the following properties</ul>-## Notes- Requires an Authorization header.- Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec.---------## Examples### Basic invocation.--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -119,11 +103,10 @@ object with the following properties```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```-</TabItem></Tabs>@@ -132,7 +115,6 @@ const { data: user, error } = await supabase.functions.invoke('hello', {By default, `invoke()` will parse the response as JSON. You can parse the response in the following formats: `json`, `blob`, `text`, and `arrayBuffer`.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -143,11 +125,10 @@ By default, `invoke()` will parse the response as JSON. You can parse the respon```jsconst { data: user, error } = await supabase.functions.invoke('hello', {responseType: 'text',- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```-</TabItem></Tabs>@@ -156,7 +137,6 @@ const { data: user, error } = await supabase.functions.invoke('hello', {You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -166,14 +146,13 @@ You can pass custom headers to your function. Note: supabase-js automatically pa```jsconst { data: user, error } = await supabase.functions.invoke('hello', {- headers: {- "my-custom-header": 'my-custom-header-value'+ headers: {+ 'my-custom-header': 'my-custom-header-value',},- body: JSON.stringify({ foo: 'bar' })+ body: JSON.stringify({ foo: 'bar' }),})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/is.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/is.mdxindex 60f3890a1ab..289216e771d 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/is.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/is.mdx@@ -1,12 +1,12 @@---id: is-title: ".is()"+title: '.is()'slug: iscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'A check for exact equality (null, true, false), finds all rows whosevalue on the stated `column` exactly match the specified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.is('name', null)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.is('name', null)```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.is('name', null)```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -151,21 +127,15 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .delete()- .is('name', null)+const { data, error } = await supabase.from('cities').delete().is('name', null)```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -175,12 +145,9 @@ const { data, error } = await supabase```js// Only valid if the Postgres function returns a table type.-const { data, error } = await supabase- .rpc('echo_all_cities')- .is('name', null)+const { data, error } = await supabase.rpc('echo_all_cities').is('name', null)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/like.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/like.mdxindex fcd91547b2f..abdb43b930a 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/like.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/like.mdx@@ -1,12 +1,12 @@---id: like-title: ".like()"+title: '.like()'slug: likecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value in the stated `column` matches the supplied`pattern` (case sensitive).@@ -25,14 +25,12 @@ const { data, error } = await supabase.like('name', '%la%')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The pattern to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.like('name', '%la%')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.like('name', '%la%')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.like('name', '%la%')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.like('name', '%la%')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/limit.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/limit.mdxindex ac9c233b878..d794c6c7dbf 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/limit.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/limit.mdx@@ -1,12 +1,12 @@---id: limit-title: "limit()"+title: 'limit()'slug: limitcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result with the specified `count`.@@ -24,14 +24,12 @@ const { data, error } = await supabase.limit(1)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The maximum no. of rows to limit to.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ The maximum no. of rows to limit to.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -102,25 +99,10 @@ The foreign table to use (for foreign columns).</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -135,15 +117,12 @@ const { data, error } = await supabase.limit(1)```-</TabItem></Tabs>### With embedded resources--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -159,7 +138,6 @@ const { data, error } = await supabase.limit(1, { foreignTable: 'cities' })```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/lt.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/lt.mdxindex 9fb94bb0b37..f7273a5d7eb 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/lt.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/lt.mdx@@ -1,12 +1,12 @@---id: lt-title: ".lt()"+title: '.lt()'slug: ltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than thespecified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.lt('country_id', 250)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.lt('country_id', 250)```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.lt('country_id', 250)```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.lt('country_id', 250)```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.lt('country_id', 250)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/lte.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/lte.mdxindex 6e75cedf088..62522f0ce4f 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/lte.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/lte.mdx@@ -1,12 +1,12 @@---id: lte-title: ".lte()"+title: '.lte()'slug: ltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` is less than or equalto the specified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.lte('country_id', 250)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.lte('country_id', 250)```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.lte('country_id', 250)```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.lte('country_id', 250)```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.lte('country_id', 250)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/match.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/match.mdxindex 36021a0290f..357b6258445 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/match.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/match.mdx@@ -1,12 +1,12 @@---id: match-title: ".match()"+title: '.match()'slug: matchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose columns match the specified `query` object.@@ -21,17 +21,15 @@ Finds all rows whose columns match the specified `query` object.const { data, error } = await supabase.from('cities').select('name, country_id')- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -49,7 +47,7 @@ const { data, error } = await supabase<div class="method-list-item-description">The object to filter with, with column names as keys mapped- to their filter values.+to their filter values.</div>@@ -57,25 +55,10 @@ The object to filter with, with column names as keys mapped</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -87,18 +70,15 @@ The object to filter with, with column names as keys mappedconst { data, error } = await supabase.from('cities').select('name, country_id')- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -110,18 +90,15 @@ const { data, error } = await supabaseconst { data, error } = await supabase.from('cities').update({ name: 'Mordor' })- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -133,18 +110,15 @@ const { data, error } = await supabaseconst { data, error } = await supabase.from('cities').delete()- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -156,10 +130,9 @@ const { data, error } = await supabase// Only valid if the Postgres function returns a table type.const { data, error } = await supabase.rpc('echo_all_cities')- .match({name: 'Beijing', country_id: 156})+ .match({ name: 'Beijing', country_id: 156 })```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/maybesingle.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/maybesingle.mdxindex 68e0d4fb4dc..75b13d8d851 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/maybesingle.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/maybesingle.mdx@@ -1,12 +1,12 @@---id: maybesingle-title: "maybeSingle()"+title: 'maybeSingle()'slug: maybesinglecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves at most one row from the result. Result must be at most one row(e.g. using `eq` on a UNIQUE column), otherwise this will result in an@@ -27,33 +27,14 @@ const { data, error } = await supabase.maybeSingle()```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -69,7 +50,6 @@ const { data, error } = await supabase.maybeSingle()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/neq.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/neq.mdxindex e9ea6c02f6b..32360b88899 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/neq.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/neq.mdx@@ -1,12 +1,12 @@---id: neq-title: ".neq()"+title: '.neq()'slug: neqcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose value on the stated `column` doesn't match thespecified `value`.@@ -25,14 +25,12 @@ const { data, error } = await supabase.neq('name', 'The shire')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,7 +53,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -78,25 +75,10 @@ The value to filter with.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +93,12 @@ const { data, error } = await supabase.neq('name', 'The shire')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,15 +113,12 @@ const { data, error } = await supabase.neq('name', 'San Francisco')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,15 +133,12 @@ const { data, error } = await supabase.neq('name', 'Mordor')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,7 +153,6 @@ const { data, error } = await supabase.neq('name', 'Lagos')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/not.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/not.mdxindex 69447efbd9b..7ba6d51392a 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/not.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/not.mdx@@ -1,12 +1,12 @@---id: not-title: ".not()"+title: '.not()'slug: notcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows which doesn't satisfy the filter.@@ -24,14 +24,12 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -75,7 +72,6 @@ The operator to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -98,7 +94,6 @@ The value to filter with.</ul>-## Notes- `.not()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -111,21 +106,10 @@ The value to filter with..not('id','in',`(${arr})`) // You can insert a javascript array.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -140,15 +124,12 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -163,15 +144,12 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -186,15 +164,12 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -209,7 +184,6 @@ const { data, error } = await supabase.not('name', 'eq', 'Paris')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/or.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/or.mdxindex 2628c19c2a1..32c3dc8e7c3 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/or.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/or.mdx@@ -1,12 +1,12 @@---id: or-title: ".or()"+title: '.or()'slug: orcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows satisfying at least one of the filters.@@ -24,14 +24,12 @@ const { data, error } = await supabase.or('id.eq.20,id.eq.30')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The filters to use, separated by commas.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ The filters to use, separated by commas.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -102,7 +99,6 @@ The foreign table to use (if `column` is a foreign column).</ul>-## Notes- `.or()` expects you to use the raw [PostgREST syntax](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for the filter names and values.@@ -113,21 +109,10 @@ The foreign table to use (if `column` is a foreign column)..or(`id.in.(${arrList}),rangecol.cs.[${arrRange})`) // You can insert a javascipt array for list or range on a range column.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -142,15 +127,12 @@ const { data, error } = await supabase.or('id.eq.20,id.eq.30')```-</TabItem></Tabs>### Use `or` with `and`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -165,15 +147,12 @@ const { data, error } = await supabase.or('id.gt.20,and(name.eq.New Zealand,name.eq.France)')```-</TabItem></Tabs>### Use `or` on foreign tables--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -185,10 +164,9 @@ const { data, error } = await supabaseconst { data, error } = await supabase.from('countries').select('id, cities(*)')- .or('name.eq.Wellington,name.eq.Paris', { foreignTable: "cities" })+ .or('name.eq.Wellington,name.eq.Paris', { foreignTable: 'cities' })```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/order.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/order.mdxindex beae6f398aa..fc989769807 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/order.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/order.mdx@@ -1,12 +1,12 @@---id: order-title: "order()"+title: 'order()'slug: ordercustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Orders the result with the specified `column`.@@ -24,14 +24,12 @@ const { data, error } = await supabase.order('id', { ascending: false })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The column to order on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ The column to order on.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -96,7 +93,6 @@ If `true`, `null`s appear first.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -117,7 +113,6 @@ The foreign table to use (if `column` is a foreign column).</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -144,25 +139,10 @@ If `true`, the result will be in ascending order.</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -177,15 +157,12 @@ const { data, error } = await supabase.order('id', { ascending: false })```-</TabItem></Tabs>### With embedded resources--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -198,10 +175,9 @@ const { data, error } = await supabase.from('countries').select('name, cities(name)').eq('name', 'United States')- .order('name', {foreignTable: 'cities'})+ .order('name', { foreignTable: 'cities' })```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/overlaps.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/overlaps.mdxindex 438f41a25a6..f038122dfd7 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/overlaps.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/overlaps.mdx@@ -1,14 +1,12 @@---id: overlaps-title: ".overlaps()"+title: '.overlaps()'slug: overlapscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,15 +22,10 @@ const { data, error } = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-</TabItem></Tabs>----## Notes- `.overlaps()` can work on array columns or range columns.@@ -44,21 +37,10 @@ const { data, error } = await supabase.overlaps('rangecol',`(${arr}]`) // You can insert an array into a string.```---------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -73,15 +55,12 @@ const { data, error } = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -96,15 +75,12 @@ let countries = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -119,15 +95,12 @@ const { data, error } = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -142,7 +115,6 @@ const { data, error } = await supabase.overlaps('main_exports', ['computers', 'minerals'])```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/range.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/range.mdxindex 5a322268184..f300eb32556 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/range.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/range.mdx@@ -1,12 +1,12 @@---id: range-title: "range()"+title: 'range()'slug: rangecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Limits the result to rows within the specified range, inclusive.@@ -21,17 +21,15 @@ Limits the result to rows within the specified range, inclusive.const { data, error } = await supabase.from('cities').select('name, country_id')- .range(0,3)+ .range(0, 3)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The starting index from which to limit the result, inclusive.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -75,7 +72,6 @@ The last index to which to limit the result, inclusive.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -90,7 +86,7 @@ The last index to which to limit the result, inclusive.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -123,25 +119,10 @@ The foreign table to use (for foreign columns).</ul>-------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -153,10 +134,9 @@ The foreign table to use (for foreign columns).const { data, error } = await supabase.from('cities').select('name, country_id')- .range(0,3)+ .range(0, 3)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rangeadjacent.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rangeadjacent.mdxindex df647910118..6f68d15687c 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rangeadjacent.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rangeadjacent.mdx@@ -1,14 +1,12 @@---id: rangeadjacent-title: ".rangeAdjacent()"+title: '.rangeAdjacent()'slug: rangeadjacentcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,33 +22,14 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -65,15 +44,12 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -88,15 +64,12 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +84,12 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,7 +104,6 @@ const { data, error } = await supabase.rangeAdjacent('population_range_millions', '[70, 185]')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rangegt.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rangegt.mdxindex b9f70df095d..9bef978e44b 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rangegt.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rangegt.mdx@@ -1,14 +1,12 @@---id: rangegt-title: ".rangeGt()"+title: '.rangeGt()'slug: rangegtcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,33 +22,14 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -65,15 +44,12 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -88,15 +64,12 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +84,12 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,7 +104,6 @@ const { data, error } = await supabase.rangeGt('population_range_millions', '[150, 250]')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rangegte.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rangegte.mdxindex 08e27b1efa1..98cb11b6e64 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rangegte.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rangegte.mdx@@ -1,14 +1,12 @@---id: rangegte-title: ".rangeGte()"+title: '.rangeGte()'slug: rangegtecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,33 +22,14 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -65,15 +44,12 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -88,15 +64,12 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +84,12 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,7 +104,6 @@ const { data, error } = await supabase.rangeGte('population_range_millions', '[150, 250]')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rangelt.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rangelt.mdxindex f1652205a7e..1eb61061978 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rangelt.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rangelt.mdx@@ -1,14 +1,12 @@---id: rangelt-title: ".rangeLt()"+title: '.rangeLt()'slug: rangeltcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,33 +22,14 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -65,15 +44,12 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -88,15 +64,12 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +84,12 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,7 +104,6 @@ const { data, error } = await supabase.rangeLt('population_range_millions', '[150, 250]')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rangelte.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rangelte.mdxindex 83b4de9affe..a32add366cc 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rangelte.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rangelte.mdx@@ -1,14 +1,12 @@---id: rangelte-title: ".rangeLte()"+title: '.rangeLte()'slug: rangeltecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';--+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'<TabsdefaultValue="js"@@ -24,33 +22,14 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -65,15 +44,12 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `update()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -88,15 +64,12 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `delete()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -111,15 +84,12 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-</TabItem></Tabs>### With `rpc()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -134,7 +104,6 @@ const { data, error } = await supabase.rangeLte('population_range_millions', '[150, 250]')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/removeallsubscriptions.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/removeallsubscriptions.mdxindex daa4a31f495..c04d28c9eef 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/removeallsubscriptions.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/removeallsubscriptions.mdx@@ -1,12 +1,12 @@---id: removeallsubscriptions-title: "removeAllSubscriptions()"+title: 'removeAllSubscriptions()'slug: removeallsubscriptionscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Closes and removes all subscriptions and returns a list of removedsubscriptions and their errors.@@ -22,34 +22,18 @@ subscriptions and their errors.supabase.removeAllSubscriptions()```-</TabItem></Tabs>----## Notes- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.---------## Examples### Removes all subscriptions--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -61,7 +45,6 @@ supabase.removeAllSubscriptions()supabase.removeAllSubscriptions()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/removesubscription.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/removesubscription.mdxindex 11d9b9f876c..5fa48695e0c 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/removesubscription.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/removesubscription.mdx@@ -1,12 +1,12 @@---id: removesubscription-title: "removeSubscription()"+title: 'removeSubscription()'slug: removesubscriptioncustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Closes and removes a subscription and returns the number of open subscriptions.@@ -21,14 +21,12 @@ Closes and removes a subscription and returns the number of open subscriptions.supabase.removeSubscription(mySubscription)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -53,26 +51,14 @@ The subscription you want to close and remove.</ul>-## Notes- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.---------## Examples### Remove a subscription--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -84,7 +70,6 @@ The subscription you want to close and remove.supabase.removeSubscription(mySubscription)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/rpc.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/rpc.mdxindex abe6a0b8a09..d83c25466aa 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/rpc.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/rpc.mdx@@ -1,12 +1,12 @@---id: rpc-title: "Postgres functions: rpc()"+title: 'Postgres functions: rpc()'slug: rpccustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'You can call Postgres functions as a "Remote Procedure Call".@@ -19,7 +19,6 @@ create or replace function hello_world() returns text as $$$$ language sql;```-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -28,18 +27,15 @@ $$ language sql;<TabItem value="js">```js-const { data, error } = await supabase- .rpc('hello_world')+const { data, error } = await supabase.rpc('hello_world')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -62,7 +58,6 @@ The function name to call.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -83,7 +78,6 @@ The parameters to pass to the function call.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -98,7 +92,7 @@ The parameters to pass to the function call.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -125,7 +119,6 @@ When set to true, no data will be returned.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -152,19 +145,6 @@ Count algorithm to use to count rows in a table.</ul>-------------## Examples### Call a Postgres function@@ -179,19 +159,15 @@ This is an example of invoking a Postgres function with no parameters.<TabItem value="js">```js-const { data, error } = await supabase- .rpc('hello_world')+const { data, error } = await supabase.rpc('hello_world')```-</TabItem></Tabs>### With Parameters--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -200,11 +176,9 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error } = await supabase- .rpc('echo_city', { name: 'The Shire' })+const { data, error } = await supabase.rpc('echo_city', { name: 'The Shire' })```-</TabItem></Tabs>@@ -221,11 +195,11 @@ You can process large payloads at once using [array parameters](https://postgres<TabItem value="js">```js-const { data, error } = await postgrest- .rpc('echo_cities', { names: ['The Shire', 'Mordor'] })+const { data, error } = await postgrest.rpc('echo_cities', {+ names: ['The Shire', 'Mordor'],+})```-</TabItem></Tabs>@@ -233,10 +207,9 @@ const { data, error } = await postgrest### With filtersPostgres functions that return tables can also be combined with-[Modifiers](/docs/reference/javascript/using-modifiers) and+[Modifiers](/docs/reference/javascript/using-modifiers) and[Filters](/docs/reference/javascript/using-filters).-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -251,7 +224,6 @@ const { data, error } = await supabase.eq('name', 'The Shire')```-</TabItem></Tabs>@@ -261,7 +233,6 @@ const { data, error } = await supabaseYou can specify a count option to get the row count along with your data.Allowed values for count option are `null`, `exact`, `planned` and `estimated`.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -270,11 +241,13 @@ Allowed values for count option are `null`, `exact`, `planned` and `estimated`.<TabItem value="js">```js-const { data, error, count } = await supabase- .rpc('hello_world', {}, { count: 'exact' })+const { data, error, count } = await supabase.rpc(+ 'hello_world',+ {},+ { count: 'exact' }+)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/select.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/select.mdxindex 8b32c496df3..0ca77c8161f 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/select.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/select.mdx@@ -1,12 +1,12 @@---id: select-title: "Fetch data: select()"+title: 'Fetch data: select()'slug: selectcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs vertical filtering with SELECT.@@ -18,19 +18,15 @@ Performs vertical filtering with SELECT.<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .select()+const { data, error } = await supabase.from('cities').select()```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -53,7 +49,6 @@ The columns to retrieve, separated by commas.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +63,7 @@ The columns to retrieve, separated by commas.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -95,7 +90,6 @@ When set to true, select will void data.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -122,7 +116,6 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- By default, Supabase projects will return a maximum of 1,000 rows. This setting can be changed in Project API Settings. It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data.@@ -130,21 +123,10 @@ Count algorithm to use to count rows in a table.- `select()` can be combined with [Filters](/docs/reference/javascript/using-filters)- If using the Supabase hosted platform `apikey` is technically a reserved keyword, since the API gateway will pluck it out for authentication. [It should be avoided as a column name](https://github.com/supabase/supabase/issues/5465).---------## Examples### Getting your data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -153,12 +135,9 @@ Count algorithm to use to count rows in a table.<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .select()+const { data, error } = await supabase.from('cities').select()```-</TabItem></Tabs>@@ -175,12 +154,9 @@ You can select specific fields from your tables.<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .select('name')+const { data, error } = await supabase.from('cities').select('name')```-</TabItem></Tabs>@@ -197,9 +173,7 @@ If your database has foreign key relationships, you can query related tables too<TabItem value="js">```js-const { data, error } = await supabase- .from('countries')- .select(`+const { data, error } = await supabase.from('countries').select(`name,cities (name@@ -207,14 +181,12 @@ const { data, error } = await supabase`)```-</TabItem></Tabs>-:::note What about join tables- If you're in a situation where your tables are **NOT** directly related, but instead are joined by a _join table_,+If you're in a situation where your tables are **NOT** directly related, but instead are joined by a _join table_,you can still use the `select()` method to query the related data. The PostgREST engine detects the relationship automatically.For more details, [follow the link](https://postgrest.org/en/latest/api.html#embedding-through-join-tables).@@ -222,14 +194,13 @@ For more details, [follow the link](https://postgrest.org/en/latest/api.html#emb### Query the same foreign table multiple times-Sometimes you will need to query the same foreign table twice.-In this case, you can use the name of the joined column to identify-which join you intend to use. For convenience, you can also give an-alias for each column. For example, if we had a shop of products,-and we wanted to get the supplier and the purchaser at the same time+Sometimes you will need to query the same foreign table twice.+In this case, you can use the name of the joined column to identify+which join you intend to use. For convenience, you can also give an+alias for each column. For example, if we had a shop of products,+and we wanted to get the supplier and the purchaser at the same time(both in the users) table:-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -238,26 +209,22 @@ and we wanted to get the supplier and the purchaser at the same time<TabItem value="js">```js-const { data, error } = await supabase- .from('products')- .select(`+const { data, error } = await supabase.from('products').select(`id,supplier:supplier_id ( name ),purchaser:purchaser_id ( name )`)```-</TabItem></Tabs>### Filtering with inner joins-If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wanted+If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wantedto select all rows in a `message` table which belong to a user with the `username` "Jane":-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -272,7 +239,6 @@ const { data, error } = await supabase.eq('users.username', 'Jane')```-</TabItem></Tabs>@@ -282,7 +248,6 @@ const { data, error } = await supabaseYou can get the number of rows by using the count option.Allowed values for count option are `null`, [exact](https://postgrest.org/en/stable/api.html#exact-count), [planned](https://postgrest.org/en/stable/api.html#planned-count) and [estimated](https://postgrest.org/en/stable/api.html#estimated-count).-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -296,20 +261,18 @@ const { data, error, count } = await supabase.select('name', { count: 'exact' }) // if you don't want to return any rows, you can use { count: 'exact', head: true }```-</TabItem></Tabs>### Querying JSON data-If you have data inside of a JSONB column, you can apply select-and query filters to the data values. Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for querying JSON data. Also see+If you have data inside of a JSONB column, you can apply select+and query filters to the data values. Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for querying JSON data. Also see[PostgREST docs](http://postgrest.org/en/v7.0.0/api.html#json-columns) for more details.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -320,14 +283,15 @@ for querying JSON data. Also see```jsconst { data, error } = await supabase.from('users')- .select(`+ .select(+ `id, name,address->street- `)+ `+ ).eq('address->postcode', 90210)```-</TabItem></Tabs>@@ -336,7 +300,6 @@ const { data, error } = await supabaseBy default the data is returned in JSON format, however you can also request for it to be returned as Comma Separated Values.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -345,13 +308,9 @@ By default the data is returned in JSON format, however you can also request for<TabItem value="js">```js-const { data, error } = await supabase- .from('users')- .select()- .csv()+const { data, error } = await supabase.from('users').select().csv()```-</TabItem></Tabs>@@ -360,7 +319,6 @@ const { data, error } = await supabaseYou can use an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to abort requests. Note that `status` and `statusText` doesn't mean anything for aborted requests, since the request wasn't actually fulfilled.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -391,7 +349,6 @@ ac.abort()// }```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/single.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/single.mdxindex ac2e8fa5207..b28a0974dfe 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/single.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/single.mdx@@ -1,12 +1,12 @@---id: single-title: "single()"+title: 'single()'slug: singlecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves only one row from the result. Result must be one row (e.g. using`limit`), otherwise this will result in an error.@@ -26,33 +26,14 @@ const { data, error } = await supabase.single()```-</TabItem></Tabs>----------------## Examples### With `select()`--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -68,7 +49,6 @@ const { data, error } = await supabase.single()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-createbucket.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-createbucket.mdxindex 5ca1aa8eb3d..94677caa843 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-createbucket.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-createbucket.mdx@@ -1,12 +1,12 @@---id: storage-createbucket-title: "createBucket()"+title: 'createBucket()'slug: storage-createbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Creates a new Storage bucket@@ -18,19 +18,17 @@ Creates a new Storage bucket<TabItem value="js">```js-const { data, error } = await supabase- .storage- .createBucket('avatars', { public: false })+const { data, error } = await supabase.storage.createBucket('avatars', {+ public: false,+})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -53,7 +51,6 @@ A unique identifier for the bucket you are creating.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +65,7 @@ A unique identifier for the bucket you are creating.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -89,7 +86,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -101,28 +98,16 @@ No description provided.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `insert`+ - `buckets` permissions: `insert`- `objects` permissions: none---------## Examples### Create bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -131,12 +116,11 @@ No description provided.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .createBucket('avatars', { public: false })+const { data, error } = await supabase.storage.createBucket('avatars', {+ public: false,+})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-deletebucket.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-deletebucket.mdxindex de6d854eb84..5c88791d7c7 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-deletebucket.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-deletebucket.mdx@@ -1,12 +1,12 @@---id: storage-deletebucket-title: "deleteBucket()"+title: 'deleteBucket()'slug: storage-deletebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.You must first `empty()` the bucket.@@ -19,19 +19,15 @@ You must first `empty()` the bucket.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .deleteBucket('avatars')+const { data, error } = await supabase.storage.deleteBucket('avatars')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,28 +52,16 @@ The unique identifier of the bucket you would like to delete.</ul>-## Notes- Policy permissions required:- `buckets` permissions: `select` and `delete`- `objects` permissions: none---------## Examples### Delete bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -86,12 +70,9 @@ The unique identifier of the bucket you would like to delete.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .deleteBucket('avatars')+const { data, error } = await supabase.storage.deleteBucket('avatars')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-emptybucket.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-emptybucket.mdxindex c700f79a412..f432c74f542 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-emptybucket.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-emptybucket.mdx@@ -1,12 +1,12 @@---id: storage-emptybucket-title: "emptyBucket()"+title: 'emptyBucket()'slug: storage-emptybucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Removes all objects inside a single bucket.@@ -18,19 +18,15 @@ Removes all objects inside a single bucket.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .emptyBucket('avatars')+const { data, error } = await supabase.storage.emptyBucket('avatars')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,28 +51,16 @@ The unique identifier of the bucket you would like to empty.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: `select` and `delete`---------## Examples### Empty bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -85,12 +69,9 @@ The unique identifier of the bucket you would like to empty.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .emptyBucket('avatars')+const { data, error } = await supabase.storage.emptyBucket('avatars')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-copy.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-copy.mdxindex b7e10cef7aa..3251e509584 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-copy.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-copy.mdx@@ -1,12 +1,12 @@---id: storage-from-copy-title: "from.copy()"+title: 'from.copy()'slug: storage-from-copycustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Copies an existing file.@@ -18,20 +18,17 @@ Copies an existing file.<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').copy('public/avatar1.png', 'private/avatar2.png')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +51,6 @@ The original file path, including the current file name. For example `folder/ima</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,28 +73,16 @@ The new file path, including the new file name. For example `folder/image-copy.p</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Copy file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -107,13 +91,11 @@ The new file path, including the new file name. For example `folder/image-copy.p<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').copy('public/avatar1.png', 'private/avatar2.png')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurl.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurl.mdxindex 5b68f4ced09..f68b4484384 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurl.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurl.mdx@@ -1,12 +1,12 @@---id: storage-from-createsignedurl-title: "from.createSignedUrl()"+title: 'from.createSignedUrl()'slug: storage-from-createsignedurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Create signed URL to download file without requiring permissions. This URL can be valid for a set number of seconds.@@ -18,20 +18,17 @@ Create signed URL to download file without requiring permissions. This URL can b<TabItem value="js">```js-const { signedURL, error } = await supabase- .storage+const { signedURL, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +51,6 @@ The file path to be downloaded, including the current file name. For example `fo</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,28 +73,16 @@ The number of seconds until the signed URL expires. For example, `60` for a URL</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Create Signed URL--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -107,13 +91,11 @@ The number of seconds until the signed URL expires. For example, `60` for a URL<TabItem value="js">```js-const { signedURL, error } = await supabase- .storage+const { signedURL, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurls.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurls.mdxindex 26640d20873..f56fc180ace 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurls.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-createsignedurls.mdx@@ -1,12 +1,12 @@---id: storage-from-createsignedurls-title: "from.createSignedUrls()"+title: 'from.createSignedUrls()'slug: storage-from-createsignedurlscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Create signed URLs to download files without requiring permissions. These URLs can be valid for a set number of seconds.@@ -18,20 +18,17 @@ Create signed URLs to download files without requiring permissions. These URLs c<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +51,6 @@ The file paths to be downloaded, including the current file names. For example `</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,28 +73,16 @@ The number of seconds until the signed URLs expire. For example, `60` for URLs w</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Create Signed URLs--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -107,13 +91,11 @@ The number of seconds until the signed URLs expire. For example, `60` for URLs w<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-download.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-download.mdxindex 0d6d8916045..7e95e92396f 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-download.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-download.mdx@@ -1,12 +1,12 @@---id: storage-from-download-title: "from.download()"+title: 'from.download()'slug: storage-from-downloadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Downloads a file.@@ -18,20 +18,17 @@ Downloads a file.<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').download('folder/avatar1.png')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,28 +53,16 @@ The file path to be downloaded, including the path and file name. For example `f</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### Download file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -86,13 +71,11 @@ The file path to be downloaded, including the path and file name. For example `f<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').download('folder/avatar1.png')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-getpublicurl.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-getpublicurl.mdxindex 3697135f1b8..85de6499b3c 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-getpublicurl.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-getpublicurl.mdx@@ -1,12 +1,12 @@---id: storage-from-getpublicurl-title: "from.getPublicUrl()"+title: 'from.getPublicUrl()'slug: storage-from-getpublicurlcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieve URLs for assets in public buckets@@ -18,20 +18,17 @@ Retrieve URLs for assets in public buckets<TabItem value="js">```js-const { publicURL, error } = supabase- .storage+const { publicURL, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,29 +53,17 @@ The file path to be downloaded, including the path and file name. For example `f</ul>-## Notes- The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.com](https://app.supabase.com), clicking the overflow menu on a bucket and choosing "Make public"- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: none---------## Examples### Returns the URL for an asset in a public bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -87,13 +72,11 @@ The file path to be downloaded, including the path and file name. For example `f<TabItem value="js">```js-const { publicURL, error } = supabase- .storage+const { publicURL, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-list.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-list.mdxindex c36f90e1866..14708feb725 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-list.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-list.mdx@@ -1,12 +1,12 @@---id: storage-from-list-title: "from.list()"+title: 'from.list()'slug: storage-from-listcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Lists all the files within a bucket.@@ -18,24 +18,19 @@ Lists all the files within a bucket.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- })+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -58,7 +53,6 @@ The folder path.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,7 +73,6 @@ Search options, including `limit`, `offset`, `sortBy`, and `search`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -102,28 +95,16 @@ Fetch parameters, currently only supports `signal`, which is an AbortController'</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `select`---------## Examples### List files in a bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -132,25 +113,19 @@ Fetch parameters, currently only supports `signal`, which is an AbortController'<TabItem value="js">```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- })+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+})```-</TabItem></Tabs>### Search files in a bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -159,18 +134,14 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error } = await supabase- .storage- .from('avatars')- .list('folder', {- limit: 100,- offset: 0,- sortBy: { column: 'name', order: 'asc' },- search: 'jon'- })+const { data, error } = await supabase.storage.from('avatars').list('folder', {+ limit: 100,+ offset: 0,+ sortBy: { column: 'name', order: 'asc' },+ search: 'jon',+})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-move.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-move.mdxindex 1a2f91f3870..a1fef28d6e0 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-move.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-move.mdx@@ -1,12 +1,12 @@---id: storage-from-move-title: "from.move()"+title: 'from.move()'slug: storage-from-movecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Moves an existing file.@@ -18,20 +18,17 @@ Moves an existing file.<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').move('public/avatar1.png', 'private/avatar2.png')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +51,6 @@ The original file path, including the current file name. For example `folder/ima</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -77,28 +73,16 @@ The new file path, including the new file name. For example `folder/image-new.pn</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`---------## Examples### Move file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -107,13 +91,11 @@ The new file path, including the new file name. For example `folder/image-new.pn<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').move('public/avatar1.png', 'private/avatar2.png')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-remove.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-remove.mdxindex 6c7ed773416..47831f0e6d1 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-remove.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-remove.mdx@@ -1,12 +1,12 @@---id: storage-from-remove-title: "from.remove()"+title: 'from.remove()'slug: storage-from-removecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Deletes files within the same bucket@@ -18,20 +18,17 @@ Deletes files within the same bucket<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').remove(['folder/avatar1.png'])```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,28 +53,16 @@ An array of files to be deleted, including the path and file name. For example [</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `delete` and `select`---------## Examples### Delete file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -86,13 +71,11 @@ An array of files to be deleted, including the path and file name. For example [<TabItem value="js">```js-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').remove(['folder/avatar1.png'])```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-update.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-update.mdxindex b959a3f8da2..e05ec37c2ef 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-update.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-update.mdx@@ -1,12 +1,12 @@---id: storage-from-update-title: "from.update()"+title: 'from.update()'slug: storage-from-updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Replaces an existing file at the specified path with a new one.@@ -19,23 +19,20 @@ Replaces an existing file at the specified path with a new one.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -58,7 +55,6 @@ The relative file path. Should be of the format `folder/subfolder/filename.png`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,7 +75,6 @@ The body of the file to be stored in the bucket.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -105,29 +100,17 @@ HTTP headers.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `update` and `select`- For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.---------## Examples### Update file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -137,24 +120,20 @@ HTTP headers.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-</TabItem></Tabs>### Update file using `ArrayBuffer` from base64 file data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -163,17 +142,15 @@ const { data, error } = await supabase<TabItem value="js">```js-import {decode} from 'base64-arraybuffer'+import { decode } from 'base64-arraybuffer'-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').update('public/avatar1.png', decode('base64FileData'), {- contentType: 'image/png'+ contentType: 'image/png',})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-upload.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-upload.mdxindex 693c04a1d65..ab772372270 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-upload.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-from-upload.mdx@@ -1,12 +1,12 @@---id: storage-from-upload-title: "from.upload()"+title: 'from.upload()'slug: storage-from-uploadcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Uploads a file to an existing bucket.@@ -19,23 +19,20 @@ Uploads a file to an existing bucket.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -58,7 +55,6 @@ The relative file path. Should be of the format `folder/subfolder/filename.png`.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,7 +75,6 @@ The body of the file to be stored in the bucket.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -105,29 +100,17 @@ HTTP headers.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: none+ - `buckets` permissions: none- `objects` permissions: `insert`- For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.---------## Examples### Upload file--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -137,24 +120,20 @@ HTTP headers.```jsconst avatarFile = event.target.files[0]-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', avatarFile, {cacheControl: '3600',- upsert: false+ upsert: false,})```-</TabItem></Tabs>### Upload file using `ArrayBuffer` from base64 file data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -165,15 +144,13 @@ const { data, error } = await supabase```jsimport { decode } from 'base64-arraybuffer'-const { data, error } = await supabase- .storage+const { data, error } = await supabase.storage.from('avatars').upload('public/avatar1.png', decode('base64FileData'), {- contentType: 'image/png'+ contentType: 'image/png',})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-getbucket.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-getbucket.mdxindex 376c74f8446..cb7075fed67 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-getbucket.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-getbucket.mdx@@ -1,12 +1,12 @@---id: storage-getbucket-title: "getBucket()"+title: 'getBucket()'slug: storage-getbucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of an existing Storage bucket.@@ -18,19 +18,15 @@ Retrieves the details of an existing Storage bucket.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .getBucket('avatars')+const { data, error } = await supabase.storage.getBucket('avatars')```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -55,28 +51,16 @@ The unique identifier of the bucket you would like to retrieve.</ul>-## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### Get bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -85,12 +69,9 @@ The unique identifier of the bucket you would like to retrieve.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .getBucket('avatars')+const { data, error } = await supabase.storage.getBucket('avatars')```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-listbuckets.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-listbuckets.mdxindex 9663ab5d13f..da973fa5d6f 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-listbuckets.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-listbuckets.mdx@@ -1,12 +1,12 @@---id: storage-listbuckets-title: "listBuckets()"+title: 'listBuckets()'slug: storage-listbucketscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Retrieves the details of all Storage buckets within an existing project.@@ -18,41 +18,23 @@ Retrieves the details of all Storage buckets within an existing project.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .listBuckets()+const { data, error } = await supabase.storage.listBuckets()```-</TabItem></Tabs>----## Notes- Policy permissions required:- - `buckets` permissions: `select`+ - `buckets` permissions: `select`- `objects` permissions: none---------## Examples### List buckets--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -61,12 +43,9 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error } = await supabase- .storage- .listBuckets()+const { data, error } = await supabase.storage.listBuckets()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-updatebucket.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-updatebucket.mdxindex 07ac875c558..56b617c0d41 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/storage-updatebucket.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/storage-updatebucket.mdx@@ -1,12 +1,12 @@---id: storage-updatebucket-title: "updateBucket()"+title: 'updateBucket()'slug: storage-updatebucketcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Updates a new Storage bucket@@ -18,19 +18,17 @@ Updates a new Storage bucket<TabItem value="js">```js-const { data, error } = await supabase- .storage- .updateBucket('avatars', { public: false })+const { data, error } = await supabase.storage.updateBucket('avatars', {+ public: false,+})```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -53,7 +51,6 @@ A unique identifier for the bucket you are updating.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +65,7 @@ A unique identifier for the bucket you are updating.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -89,7 +86,7 @@ No description provided.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -101,28 +98,16 @@ No description provided.</ul>-## Notes- Policy permissions required:- `buckets` permissions: `update`- `objects` permissions: none---------## Examples### Update bucket--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -131,12 +116,11 @@ No description provided.<TabItem value="js">```js-const { data, error } = await supabase- .storage- .updateBucket('avatars', { public: false })+const { data, error } = await supabase.storage.updateBucket('avatars', {+ public: false,+})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/subscribe.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/subscribe.mdxindex 9aaabbd96ca..fea94883d1d 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/subscribe.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/subscribe.mdx@@ -1,12 +1,12 @@---id: subscribe-title: "on().subscribe()"+title: 'on().subscribe()'slug: subscribecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Subscribe to realtime changes in your database.@@ -20,20 +20,18 @@ Subscribe to realtime changes in your database.```jsconst mySubscription = supabase.from('*')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -56,7 +54,6 @@ The database event which you would like to receive updates for, or you can use t</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -79,27 +76,15 @@ A callback that will handle the payload that is sent whenever your database chan</ul>-## Notes- Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime).- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`---------## Examples### Listen to all database changes--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -110,21 +95,18 @@ A callback that will handle the payload that is sent whenever your database chan```jsconst mySubscription = supabase.from('*')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>### Listening to a specific table--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -135,21 +117,18 @@ const mySubscription = supabase```jsconst mySubscription = supabase.from('countries')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>### Listening to inserts--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -160,27 +139,25 @@ const mySubscription = supabase```jsconst mySubscription = supabase.from('countries')- .on('INSERT', payload => {+ .on('INSERT', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>### Listening to updates-By default, Supabase will send only the updated record. If you want to receive the previous values as well you can-enable full replication for the table you are listening too:+By default, Supabase will send only the updated record. If you want to receive the previous values as well you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -191,27 +168,25 @@ alter table "your_table" replica identity full;```jsconst mySubscription = supabase.from('countries')- .on('UPDATE', payload => {+ .on('UPDATE', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>### Listening to deletes-By default, Supabase does not send deleted records. If you want to receive the deleted record you can-enable full replication for the table you are listening too:+By default, Supabase does not send deleted records. If you want to receive the deleted record you can+enable full replication for the table you are listening too:```sqlalter table "your_table" replica identity full;```-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -222,13 +197,12 @@ alter table "your_table" replica identity full;```jsconst mySubscription = supabase.from('countries')- .on('DELETE', payload => {+ .on('DELETE', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem></Tabs>@@ -252,7 +226,6 @@ const mySubscription = supabase.subscribe()```-</TabItem></Tabs>@@ -275,7 +248,6 @@ const mySubscription = supabase.subscribe()```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/textsearch.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/textsearch.mdxindex 0f9003fc94d..71f0db4b27d 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/textsearch.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/textsearch.mdx@@ -1,21 +1,18 @@---id: textsearch-title: ".textSearch()"+title: '.textSearch()'slug: textsearchcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Finds all rows whose tsvector value on the stated `column` matchesto_tsquery(`query`).--## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -38,7 +35,6 @@ The column to filter on.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -59,7 +55,6 @@ The Postgres tsquery string to filter with.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -74,7 +69,7 @@ The Postgres tsquery string to filter with.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -107,25 +102,10 @@ The text search configuration to use.</ul>-------------## Examples### Text search--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -137,12 +117,11 @@ The text search configuration to use.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {- config: 'english'+ .textSearch('catchphrase', `'fat' & 'cat'`, {+ config: 'english',})```-</TabItem></Tabs>@@ -162,13 +141,12 @@ Uses PostgreSQL's `plainto_tsquery` function.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {+ .textSearch('catchphrase', `'fat' & 'cat'`, {type: 'plain',- config: 'english'+ config: 'english',})```-</TabItem></Tabs>@@ -188,21 +166,20 @@ Uses PostgreSQL's `phraseto_tsquery` function.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat' & 'cat'`, {+ .textSearch('catchphrase', `'fat' & 'cat'`, {type: 'phrase',- config: 'english'+ config: 'english',})```-</TabItem></Tabs>### Websearch-Uses PostgreSQL's `websearch_to_tsquery` function.-This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used+Uses PostgreSQL's `websearch_to_tsquery` function.+This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be usedwith advanced operators.- `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.@@ -210,7 +187,6 @@ with advanced operators.- `OR`: the word “or” will be converted to the | operator.- `-`: a dash will be converted to the ! operator.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -222,13 +198,12 @@ with advanced operators.const { data, error } = await supabase.from('quotes').select('catchphrase')- .textSearch('catchphrase', `'fat or cat'`, {+ .textSearch('catchphrase', `'fat or cat'`, {type: 'websearch',- config: 'english'+ config: 'english',})```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/update.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/update.mdxindex 81427b8e0c2..7eddcaf76e7 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/update.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/update.mdx@@ -1,12 +1,12 @@---id: update-title: "Modify data: update()"+title: 'Modify data: update()'slug: updatecustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPDATE on the table.@@ -24,14 +24,12 @@ const { data, error } = await supabase.match({ name: 'Auckland' })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -54,7 +52,6 @@ The values to update.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -69,7 +66,7 @@ The values to update.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -96,7 +93,6 @@ By default the updated record is returned. Set this to 'minimal' if you don't ne</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -123,26 +119,14 @@ Count algorithm to use to count rows in a table.</ul>-## Notes- `update()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to update.---------## Examples### Updating your data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -157,19 +141,17 @@ const { data, error } = await supabase.match({ name: 'Auckland' })```-</TabItem></Tabs>### Updating JSON data-Postgres offers a-[number of operators](https://www.postgresql.org/docs/current/functions-json.html)-for working with JSON data. Right now it is only possible to update an entire JSON document,+Postgres offers a+[number of operators](https://www.postgresql.org/docs/current/functions-json.html)+for working with JSON data. Right now it is only possible to update an entire JSON document,but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -180,16 +162,17 @@ but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465)```jsconst { data, error } = await supabase.from('users')- .update(`+ .update(+ `address: {street: 'Melrose Place',postcode: 90210}- `)+ `+ ).eq('address->postcode', 90210)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/upsert.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/upsert.mdxindex 224d2194e8f..49e535357a1 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/upsert.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/upsert.mdx@@ -1,12 +1,12 @@---id: upsert-title: "Upsert data: upsert()"+title: 'Upsert data: upsert()'slug: upsertcustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Performs an UPSERT into the table.@@ -23,14 +23,12 @@ const { data, error } = await supabase.upsert({ id: 3, message: 'foo', username: 'supabot' })```-</TabItem></Tabs>## Parameters-<ul className="method-list-group"><li className="method-list-item">@@ -53,7 +51,6 @@ The values to insert.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -68,7 +65,7 @@ The values to insert.</h4><div class="method-list-item-description">-No description provided.+No description provided.</div>@@ -95,7 +92,6 @@ By default the new record is returned. Set this to 'minimal' if you don't need t</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -116,7 +112,6 @@ By specifying the `on_conflict` query parameter, you can make UPSERT work on a c</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -137,7 +132,6 @@ Specifies if duplicate rows should be ignored and not inserted.</li>-<li className="method-list-item"><h4 className="method-list-item-label"><span className="method-list-item-label-name">@@ -164,27 +158,15 @@ Count algorithm to use to count rows in a table.</ul>-## Notes-- Primary keys should be included in the data payload in order for an update to work correctly.-- Primary keys must be natural, not surrogate. There are however, [workarounds](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.---------+- Primary keys should be included in the data payload in order for an update to work correctly.+- Primary keys must be natural, not surrogate. There are however, [workarounds](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.## Examples### Upsert your data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -198,15 +180,12 @@ const { data, error } = await supabase.upsert({ id: 3, message: 'foo', username: 'supabot' })```-</TabItem></Tabs>### Bulk Upsert your data--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -215,26 +194,22 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error } = await supabase- .from('messages')- .upsert([+const { data, error } = await supabase.from('messages').upsert([{ id: 3, message: 'foo', username: 'supabot' },- { id: 4, message: 'bar', username: 'supabot' }- ])+ { id: 4, message: 'bar', username: 'supabot' },+])```-</TabItem></Tabs>### Upserting into tables with constraints-Running the following will cause supabase to upsert data into the `users` table.-If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that row+Running the following will cause supabase to upsert data into the `users` table.+If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that rowbased on the column passed into `onConflict`.-<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -248,15 +223,12 @@ const { data, error } = await supabase.upsert({ username: 'supabot' }, { onConflict: 'username' })```-</TabItem></Tabs>### Return the exact number of rows--<TabsdefaultValue="js"groupId="reference/supabase-js"@@ -265,17 +237,18 @@ const { data, error } = await supabase<TabItem value="js">```js-const { data, error, count } = await supabase- .from('users')- .upsert({- id: 3, message: 'foo',- username: 'supabot'- }, {- count: 'exact'- })+const { data, error, count } = await supabase.from('users').upsert(+ {+ id: 3,+ message: 'foo',+ username: 'supabot',+ },+ {+ count: 'exact',+ }+)```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/using-filters.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/using-filters.mdxindex 68e34cd1698..b52a0f5ae45 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/using-filters.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/using-filters.mdx@@ -1,14 +1,14 @@---id: using-filters-title: "Using Filters"+title: 'Using Filters'slug: using-filterscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Filters can be used on `select()`, `update()`, and `delete()` queries.+Filters can be used on `select()`, `update()`, and `delete()` queries.If a Postgres function returns a table response, you can also apply filters.@@ -20,11 +20,11 @@ You must apply your filters to the end of your query. For example:const { data, error } = await supabase.from('cities').select('name, country_id')- .eq('name', 'The Shire') // Correct+ .eq('name', 'The Shire') // Correctconst { data, error } = await supabase.from('cities')- .eq('name', 'The Shire') // Incorrect+ .eq('name', 'The Shire') // Incorrect.select('name, country_id')```@@ -49,13 +49,17 @@ const filterByName = nullconst filterPopLow = 1000const filterPopHigh = 10000-let query = supabase- .from('cities')- .select('name, country_id')--if (filterByName) { query = query.eq('name', filterByName) }-if (filterPopLow) { query = query.gte('population', filterPopLow) }-if (filterPopHigh) { query = query.lt('population', filterPopHigh) }+let query = supabase.from('cities').select('name, country_id')++if (filterByName) {+ query = query.eq('name', filterByName)+}+if (filterPopLow) {+ query = query.gte('population', filterPopLow)+}+if (filterPopHigh) {+ query = query.lt('population', filterPopHigh)+}const { data, error } = await query-```\ No newline at end of file+```diff --git a/apps/reference/_supabase_js_versioned_docs/version-v1/using-modifiers.mdx b/apps/reference/_supabase_js_versioned_docs/version-v1/using-modifiers.mdxindex e6d4aa4f8a0..4848aec4cea 100644--- a/apps/reference/_supabase_js_versioned_docs/version-v1/using-modifiers.mdx+++ b/apps/reference/_supabase_js_versioned_docs/version-v1/using-modifiers.mdx@@ -1,13 +1,13 @@---id: using-modifiers-title: "Using Modifiers"+title: 'Using Modifiers'slug: using-modifierscustom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-Modifiers can be used on `select()` queries.+Modifiers can be used on `select()` queries.-If a Postgres function returns a table response, you can also apply modifiers to the `rpc()` function.\ No newline at end of file+If a Postgres function returns a table response, you can also apply modifiers to the `rpc()` function.diff --git a/apps/reference/docs/architecture.mdx b/apps/reference/docs/architecture.mdxindex c65037a76f0..9e32fda5401 100755--- a/apps/reference/docs/architecture.mdx+++ b/apps/reference/docs/architecture.mdx@@ -5,7 +5,7 @@ description: 'Supabase design and architecture'# hide_table_of_contents: true----Supabase is open source. Wherever possible, we use and support existing tools rather than developing from scratch.+Supabase is open source. Wherever possible, we use and support existing tools rather than developing from scratch.We choose open source tools which are scalable and we make them simple to use.diff --git a/apps/reference/docs/guides/api.mdx b/apps/reference/docs/guides/api.mdxindex b2b8a0a4be2..7f7ee4335bf 100644--- a/apps/reference/docs/guides/api.mdx+++ b/apps/reference/docs/guides/api.mdx@@ -215,7 +215,7 @@ curl '<SUPABASE_URL>/rest/v1/todos' \</TabItem></Tabs>-JS Reference: [select()](../reference/javascript/select),+JS Reference: [select()](../reference/javascript/select),[insert()](../reference/javascript/insert),[update()](../reference/javascript/update),[upsert()](../reference/javascript/upsert),diff --git a/apps/reference/docs/guides/api/generating-types.mdx b/apps/reference/docs/guides/api/generating-types.mdxindex db7882f66d0..21ce6c15340 100644--- a/apps/reference/docs/guides/api/generating-types.mdx+++ b/apps/reference/docs/guides/api/generating-types.mdx@@ -1,6 +1,6 @@---id: generating-types-title: "Generating Types"+title: 'Generating Types'description: How to generate types for your API and Supabase libraries.---@@ -31,9 +31,9 @@ Important notes:After you have generated your types, you can use them in your TypeScript projects:```ts-import { NextApiRequest, NextApiResponse } from "next"-import { createClient } from "@supabase/supabase-js"-import { definitions } from "../../types/supabase"+import { NextApiRequest, NextApiResponse } from 'next'+import { createClient } from '@supabase/supabase-js'+import { definitions } from '../../types/supabase'const supabase = createClient(process.env.NEXT_PUBLIC_SUPABASE_URL,@@ -42,11 +42,11 @@ const supabase = createClient(export default async (req: NextApiRequest, res: NextApiResponse) => {const allOnlineUsers = await supabase- .from<definitions["users"]>("users")- .select("*")- .eq("status", "ONLINE")+ .from<definitions['users']>('users')+ .select('*')+ .eq('status', 'ONLINE')res.status(200).json(allOnlineUsers)-};+}```For more advance type-support, check out [`postgrest-js-tools`](https://github.com/mzalevski/postgrest-js-tools).@@ -56,6 +56,7 @@ For more advance type-support, check out [`postgrest-js-tools`](https://github.cOne way to keep your type definitions in sync with your database is to set up a GitHub action that runs on a schedule.The following script can be run in your terminal to produce the file `types/database/index.ts`.+```npx openapi-typescript https://your-project.supabase.co/rest/v1/?apikey=your-anon-key --output types/database/index.ts```@@ -67,7 +68,7 @@ You can add this script to your `package.json` and run it using `npm run update-```You can use GitHub actions to generate this file automatically. This script will commit the change to your repo every night.-Create a file `.github/workflows/update-types.yml` and add the following snippet into this file to define the action along with the environment variables.+Create a file `.github/workflows/update-types.yml` and add the following snippet into this file to define the action along with the environment variables.```ymlname: Update database types@@ -115,4 +116,4 @@ Alternatively, you can use a community-supported GitHub action: [generate-supaba## Resources-- [Generating Supabase types with GitHub Actions](https://blog.esteetey.dev/how-to-create-and-test-a-github-action-that-generates-types-from-supabase-database)\ No newline at end of file+- [Generating Supabase types with GitHub Actions](https://blog.esteetey.dev/how-to-create-and-test-a-github-action-that-generates-types-from-supabase-database)diff --git a/apps/reference/docs/guides/auth.mdx b/apps/reference/docs/guides/auth.mdxindex 6efba7332ff..e5072554909 100644--- a/apps/reference/docs/guides/auth.mdx+++ b/apps/reference/docs/guides/auth.mdx@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'import providers from '@site/src/data/authProviders'<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="480"src="https://www.youtube-nocookie.com/embed/6ow_jW4epf8"@@ -27,7 +27,7 @@ There are two parts to every Auth system:- **Authentication:** should this person be allowed in? If yes, who are they?- **Authorization:** once they are in, what are they allowed to do?-Supabase Auth is designed to work either as a standalone product, or deeply integrated with the other Supabase products.+Supabase Auth is designed to work either as a standalone product, or deeply integrated with the other Supabase products.Postgres is at the heart of everything we do, and the Auth system follows this principle. We leverage Postgres' built-in Auth functionality wherever possible.## Authentication@@ -39,7 +39,7 @@ You can authenticate your users in several ways:- Social providers.- Phone logins.-### Providers+### ProvidersWe provide a suite of Providers and login methods.@@ -49,25 +49,46 @@ We provide a suite of Providers and login methods.<div key={x.name} class="col col--6"><Link class="card" to={x.href}><div class="card__body">- <div class="" style={{ display: 'flex', justifyContent: 'space-between', gap: 10 }}>+ <div+ class=""+ style={{+ display: 'flex',+ justifyContent: 'space-between',+ gap: 10,+ }}+ >{x.logo && <img src={x.logo} alt={x.name} width="20" />}<p>{x.name}</p><p>- {x.official ? <span class={`badge badge--official`}>- Official- </span>:- <span class={`badge badge--unofficial`}>- Unofficial- </span>- }+ {x.official ? (+ <span class={`badge badge--official`}>Official</span>+ ) : (+ <span class={`badge badge--unofficial`}>Unofficial</span>+ )}</p></div><div style={{ display: 'flex', flexDirection: 'column', gap: 5 }}>- <div class="code-block" style={{ width: '100%', display: 'flex', justifyContent: 'space-between', fontSize: '0.7rem' }}>+ <div+ class="code-block"+ style={{+ width: '100%',+ display: 'flex',+ justifyContent: 'space-between',+ fontSize: '0.7rem',+ }}+ ><span>Platform:</span><span>{x.platform.toString()}</span></div>- <div class="code-block" style={{ width: '100%', display: 'flex', justifyContent: 'space-between', fontSize: '0.7rem' }}>+ <div+ class="code-block"+ style={{+ width: '100%',+ display: 'flex',+ justifyContent: 'space-between',+ fontSize: '0.7rem',+ }}+ ><span>Self-Hosted:</span><span>{x.selfHosted.toString()}</span></div>@@ -79,24 +100,20 @@ We provide a suite of Providers and login methods.</div></div>-### Simple interfaceYou can enable third-providers with the click of a button by navigating to Authentication > Settings > External OAuth Providers and inputting your `Client ID` and `Secret` for each.-## Authorization-When you need granular authorization rules, nothing beats PostgreSQL's Row Level Security (RLS).Policies are PostgreSQL's rule engine. They are incredibly powerful and flexible, allowing you to write complex SQL rules which fit your unique business needs.Get started with our [Row Level Security Guides](/docs/guides/auth/row-level-security).-### Row Level SecurityAuthentication only gets you so far. When you need granular authorization rules, nothing beats PostgreSQL's [Row Level Security (RLS)](https://www.postgresql.org/docs/current/ddl-rowsecurity.html). Supabase makes it simple to turn RLS on and off.@@ -110,7 +127,12 @@ Authentication only gets you so far. When you need granular authorization rules,[Policies](https://www.postgresql.org/docs/current/sql-createpolicy.html) are PostgreSQL's rule engine. They are incredibly powerful and flexible, allowing you to write complex SQL rules which fit your unique business needs.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/policies-zoom2.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/policies-zoom2.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>With policies, your database becomes the rules engine. Instead of repetitively filtering your queries, like this ...@@ -135,7 +157,6 @@ let { data, error } = await supabase.from('users').select('user_id, name')// Still => { id: 'd0714948', name: 'Jane' }```-### How It Works1. A user signs up. Supabase creates a new user in the `auth.users` table.@@ -146,14 +167,17 @@ let { data, error } = await supabase.from('users').select('user_id, name')Supabase provides a special function in Postgres, `auth.uid()`, which extracts the user's UID from the JWT. This is especially useful when creating policies.--## User ManagementSupabase makes it simple to manage your users.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/auth-zoom2.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/auth-zoom2.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>When users sign up, Supabase assigns them a unique ID. You can reference this ID anywhere in your database. For example, you might create a `profiles` table referencing `id` in the `auth.users` table using a `user_id` field.@@ -161,7 +185,6 @@ When users sign up, Supabase assigns them a unique ID. You can reference this IDSupabase provides the routes to [sign up](/docs/reference/javascript/auth-signup), [log in](/docs/reference/javascript/auth-signin),[log out](/docs/reference/javascript/auth-signout), and manage users in your apps and websites.-## Next Steps- Sign in: [app.supabase.com](https://app.supabase.com)diff --git a/apps/reference/docs/guides/auth/auth-apple.mdx b/apps/reference/docs/guides/auth/auth-apple.mdxindex fc3f776eca1..653ebcd527b 100644--- a/apps/reference/docs/guides/auth/auth-apple.mdx+++ b/apps/reference/docs/guides/auth/auth-apple.mdx@@ -71,7 +71,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Configure your Services IDdiff --git a/apps/reference/docs/guides/auth/auth-azure.mdx b/apps/reference/docs/guides/auth/auth-azure.mdxindex 9b8b0e0ccf1..4123c627219 100644--- a/apps/reference/docs/guides/auth/auth-azure.mdx+++ b/apps/reference/docs/guides/auth/auth-azure.mdx@@ -40,7 +40,7 @@ Azure OAuth consists of four broad steps:This will serve as the `client_id` when you make API calls to authenticate the user.-- Once your app has been registered, the client id can be found under the [list of app registrations](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) under the column titled "Application (client) ID".+- Once your app has been registered, the client id can be found under the [list of app registrations](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) under the column titled "Application (client) ID".@@ -52,7 +52,7 @@ This will serve as the `client_secret` when you make API calls to authenticate t- Under "Essentials", click on "Client credentials".- Navigate to the "Client secrets" tab and select "New client secret".- Enter a description and choose your preferred expiry for the secret.-- Once the secret is generated, save the `value` (not the secret ID).+- Once the secret is generated, save the `value` (not the secret ID).@@ -79,11 +79,14 @@ Add a function which you can call from a button, link, or UI element.```jsasync function signInWithAzure() {- const { user, session, error } = await supabase.auth.signIn({- provider: 'azure',- }, {+ const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'azure',+ },+ {scopes: 'email',- })+ }+ )}```diff --git a/apps/reference/docs/guides/auth/auth-bitbucket.mdx b/apps/reference/docs/guides/auth/auth-bitbucket.mdxindex 774cd32c91d..6b1f4e96a9a 100644--- a/apps/reference/docs/guides/auth/auth-bitbucket.mdx+++ b/apps/reference/docs/guides/auth/auth-bitbucket.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Bitbucket OAuth appdiff --git a/apps/reference/docs/guides/auth/auth-discord.mdx b/apps/reference/docs/guides/auth/auth-discord.mdxindex 05ea31a6eea..8591a232d16 100644--- a/apps/reference/docs/guides/auth/auth-discord.mdx+++ b/apps/reference/docs/guides/auth/auth-discord.mdx@@ -43,7 +43,12 @@ In the next step you require a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Discord Applicationdiff --git a/apps/reference/docs/guides/auth/auth-email.mdx b/apps/reference/docs/guides/auth/auth-email.mdxindex 8edcca138e2..d776dc8e6af 100644--- a/apps/reference/docs/guides/auth/auth-email.mdx+++ b/apps/reference/docs/guides/auth/auth-email.mdx@@ -96,7 +96,7 @@ async function signInWithEmail() {```dartFuture<void> signInWithEmail() async {await supabase.auth.signIn(- email: '[email protected]',+ email: '[email protected]',password: 'example-password');}diff --git a/apps/reference/docs/guides/auth/auth-facebook.mdx b/apps/reference/docs/guides/auth/auth-facebook.mdxindex d3fcccb5c06..c7a76ef1902 100644--- a/apps/reference/docs/guides/auth/auth-facebook.mdx+++ b/apps/reference/docs/guides/auth/auth-facebook.mdx@@ -47,7 +47,12 @@ The next step requires a callback URI, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Set up FaceBook Login for your Facebook Appdiff --git a/apps/reference/docs/guides/auth/auth-github.mdx b/apps/reference/docs/guides/auth/auth-github.mdxindex c2d43ba9108..d171495bafb 100644--- a/apps/reference/docs/guides/auth/auth-github.mdx+++ b/apps/reference/docs/guides/auth/auth-github.mdx@@ -48,7 +48,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Register a new OAuth applicationdiff --git a/apps/reference/docs/guides/auth/auth-gitlab.mdx b/apps/reference/docs/guides/auth/auth-gitlab.mdxindex 5bcd2971232..adf4287ff03 100644--- a/apps/reference/docs/guides/auth/auth-gitlab.mdx+++ b/apps/reference/docs/guides/auth/auth-gitlab.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create your GitLab Applicationdiff --git a/apps/reference/docs/guides/auth/auth-google.mdx b/apps/reference/docs/guides/auth/auth-google.mdxindex aeb92d43f12..ad0eef20f80 100644--- a/apps/reference/docs/guides/auth/auth-google.mdx+++ b/apps/reference/docs/guides/auth/auth-google.mdx@@ -62,7 +62,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create your credentialsdiff --git a/apps/reference/docs/guides/auth/auth-keycloak.mdx b/apps/reference/docs/guides/auth/auth-keycloak.mdxindex 03834670c77..39d1eb96196 100644--- a/apps/reference/docs/guides/auth/auth-keycloak.mdx+++ b/apps/reference/docs/guides/auth/auth-keycloak.mdx@@ -11,7 +11,7 @@ To enable Keycloak Auth for your project, you need to set up an Keycloak OAuth a## Overview-To get started with Keycloak, you can run it in a docker container with: `docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 jboss/keycloak:latest`+To get started with Keycloak, you can run it in a docker container with: `docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 jboss/keycloak:latest`This guide will be assuming that you are running keycloak in a docker container as described in the command above.@@ -28,12 +28,12 @@ Keycloak OAuth consists of five broad steps:### Access your Keycloak Admin console-- Login by visiting [`http://localhost:8080`](http://localhost:8080) and clicking on "Administration Console".+- Login by visiting [`http://localhost:8080`](http://localhost:8080) and clicking on "Administration Console".### Create a Keycloak Realm- Once you've logged in to the Keycloak console, you can add a realm from the side panel. The default realm should be named "Master".-- After you've added a new realm, you can retrieve the `issuer` from the "OpenID Endpoint Configuration" endpoint. The `issuer` will be used as the `Keycloak URL`.+- After you've added a new realm, you can retrieve the `issuer` from the "OpenID Endpoint Configuration" endpoint. The `issuer` will be used as the `Keycloak URL`.- You can find this endpoint from the realm settings under the "General Tab" or visit [`http://localhost:8080/realms/my_realm_name/.well-known/openid-configuration`](http://localhost:8080/realms/my_realm_name/.well-known/openid-configuration)@@ -47,6 +47,7 @@ The "Client ID" of the created client will serve as the `client_id` when you mak### Client SettingsAfter you've created the client successfully, ensure that you set the following settings:+1. The "Client Protocol" should be set to "openid-connect".2. The "Access Type" should be set to "confidential".3. The "Valid Redirect URIs" should be set to: `https://<project-ref>.supabase.co/auth/v1/callback`.@@ -57,7 +58,7 @@ After you've created the client successfully, ensure that you set the following### Obtain the Client SecretThis will serve as the `client_secret` when you make API calls to authenticate the user.-Under the "Credentials" tab, the `Secret` value will be used as the `client secret`.+Under the "Credentials" tab, the `Secret` value will be used as the `client secret`.@@ -89,7 +90,7 @@ async function signout() {}```-## Resources+## Resources- You can find the keycloak openid endpoint configuration under the realm settings.-+ diff --git a/apps/reference/docs/guides/auth/auth-linkedin.mdx b/apps/reference/docs/guides/auth/auth-linkedin.mdxindex b7031776217..caf7eb602d1 100644--- a/apps/reference/docs/guides/auth/auth-linkedin.mdx+++ b/apps/reference/docs/guides/auth/auth-linkedin.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a LinkedIn OAuth appdiff --git a/apps/reference/docs/guides/auth/auth-messagebird.mdx b/apps/reference/docs/guides/auth/auth-messagebird.mdxindex dd806ecb6b7..b67591f0b73 100644--- a/apps/reference/docs/guides/auth/auth-messagebird.mdx+++ b/apps/reference/docs/guides/auth/auth-messagebird.mdx@@ -40,7 +40,7 @@ This is the number that will be receiving the SMS OTPs.-Navigate to the [dashboard settings](https://dashboard.messagebird.com/en/settings/sms) to set the default originator. The messagebird originator is the name or number from which the message is sent.+Navigate to the [dashboard settings](https://dashboard.messagebird.com/en/settings/sms) to set the default originator. The messagebird originator is the name or number from which the message is sent.For more information, you can refer to the messagebird article on choosing an originator [here](https://support.messagebird.com/hc/en-us/articles/115002628665-Choosing-an-originator)@@ -59,9 +59,10 @@ You should see an option to enable Phone Signup.Toggle it on, and copy the 2 values over from the messagebird dashboard. Click save.Note: If you use the Test API Key, the OTP will not be delivered to the mobile number specified but messagebird will log the response in the dashboard.-If the Live API Key is used instead, the OTP will be delivered and there will be a deduction in your free credits.+If the Live API Key is used instead, the OTP will be delivered and there will be a deduction in your free credits.<!-- TODO: Add screenshot of UI -->+Plugin MessageBird credentialsNow the backend should be setup, we can proceed to add our client-side code!diff --git a/apps/reference/docs/guides/auth/auth-notion.mdx b/apps/reference/docs/guides/auth/auth-notion.mdxindex 44a6464c03d..1f615f76bbd 100644--- a/apps/reference/docs/guides/auth/auth-notion.mdx+++ b/apps/reference/docs/guides/auth/auth-notion.mdx@@ -34,6 +34,7 @@ Setting up Notion logins for your application consists of 3 parts:### Add the redirect uri+- After selecting "Public integration", you should see an option to add "Redirect URIs".@@ -49,7 +50,12 @@ You can retrieve the redirect uri with the following steps:Your redirect uri should look like the following: `https://<project-ref>.supabase.co/auth/v1/callback`<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Add your Notion credentials into your Supabase Projectdiff --git a/apps/reference/docs/guides/auth/auth-slack.mdx b/apps/reference/docs/guides/auth/auth-slack.mdxindex fd60e76a8b1..c9568eaa593 100644--- a/apps/reference/docs/guides/auth/auth-slack.mdx+++ b/apps/reference/docs/guides/auth/auth-slack.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Slack OAuth appdiff --git a/apps/reference/docs/guides/auth/auth-spotify.mdx b/apps/reference/docs/guides/auth/auth-spotify.mdxindex 760eaf85d04..c617021e79b 100644--- a/apps/reference/docs/guides/auth/auth-spotify.mdx+++ b/apps/reference/docs/guides/auth/auth-spotify.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Spotify OAuth appdiff --git a/apps/reference/docs/guides/auth/auth-twilio.mdx b/apps/reference/docs/guides/auth/auth-twilio.mdxindex ba9ac6fec27..f086a3ab027 100644--- a/apps/reference/docs/guides/auth/auth-twilio.mdx+++ b/apps/reference/docs/guides/auth/auth-twilio.mdx@@ -31,7 +31,7 @@ What you'll need:## Video<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/akScoPO01bc"@@ -89,7 +89,7 @@ The SMS message sent to a phone containing an OTP code can be customized. This iGo to Auth > Templates page in the Supabase dashboard (https://app.supabase.com/project/YOUR-PROJECT-REF/auth/templates).-Use the variable `.Code` in the template to display the OTP code. Here's an example in the SMS template.+Use the variable `.Code` in the template to display the OTP code. Here's an example in the SMS template.diff --git a/apps/reference/docs/guides/auth/auth-twitch.mdx b/apps/reference/docs/guides/auth/auth-twitch.mdxindex 4c5b5519598..ef76d915913 100644--- a/apps/reference/docs/guides/auth/auth-twitch.mdx+++ b/apps/reference/docs/guides/auth/auth-twitch.mdx@@ -44,7 +44,12 @@ In the next step you require a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Twitch Applicationdiff --git a/apps/reference/docs/guides/auth/auth-twitter.mdx b/apps/reference/docs/guides/auth/auth-twitter.mdxindex 537137ea5ab..d5f5726d756 100644--- a/apps/reference/docs/guides/auth/auth-twitter.mdx+++ b/apps/reference/docs/guides/auth/auth-twitter.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Twitter OAuth appdiff --git a/apps/reference/docs/guides/auth/auth-vonage.mdx b/apps/reference/docs/guides/auth/auth-vonage.mdxindex 109101c6cb5..d1a71db6c2b 100644--- a/apps/reference/docs/guides/auth/auth-vonage.mdx+++ b/apps/reference/docs/guides/auth/auth-vonage.mdx@@ -271,4 +271,4 @@ The user does not have a password therefore will need to sign in via this method- [Vonage Signup](https://dashboard.nexmo.com/sign-up)- [Supabase Dashboard](https://app.supabase.com)-- [Supabase Row Level Security](/docs/guides/auth#row-level-security)\ No newline at end of file+- [Supabase Row Level Security](/docs/guides/auth#row-level-security)diff --git a/apps/reference/docs/guides/auth/auth-workos.mdx b/apps/reference/docs/guides/auth/auth-workos.mdxindex 5a4b1abb306..9e2ef7c79e7 100644--- a/apps/reference/docs/guides/auth/auth-workos.mdx+++ b/apps/reference/docs/guides/auth/auth-workos.mdx@@ -58,34 +58,38 @@ You can pick between any one of the many identity providers that WorkOS supports- Enter the `Client ID`, `Secret`, and `WorkOS URL` saved in the previous steps. The ``WorkOS URL` setting should be set to https://api.workos.com/- Click `Save`--### Add login code to your client appThe JavaScript client code is documented in the [Supabase OAuth Reference](/docs/reference/javascript/auth-signin#sign-in-using-third-party-providers). Note that you only need to include one of the three parameters: `connection`, `organization`, and `provider`.You can refer to the [WorkOS Documentation](https://workos.com/docs/reference/sso/authorize/) to learn more about the different methods.```js-const { user, session, error } = await supabase.auth.signIn({- provider: 'workos',-}, {- connection: "<your_connection>",- organization: "<your_organization",- provider: "<your_provider>"-})+const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'workos',+ },+ {+ connection: '<your_connection>',+ organization: '<your_organization',+ provider: '<your_provider>',+ }+)```Add a function which you can call from a button, link, or UI element.```jsasync function signInWithWorkOS() {- const { user, session, error } = await supabase.auth.signIn({- provider: 'workos',- }, {- connection: "<your_connection>",- organization: "<your_organization",- provider: "<your_provider>"- })+ const { user, session, error } = await supabase.auth.signIn(+ {+ provider: 'workos',+ },+ {+ connection: '<your_connection>',+ organization: '<your_organization',+ provider: '<your_provider>',+ }+ )}```diff --git a/apps/reference/docs/guides/auth/auth-zoom.mdx b/apps/reference/docs/guides/auth/auth-zoom.mdxindex 3d2e3b7b478..cab2ad3e6f5 100644--- a/apps/reference/docs/guides/auth/auth-zoom.mdx+++ b/apps/reference/docs/guides/auth/auth-zoom.mdx@@ -39,7 +39,12 @@ The next step requires a callback URL, which looks like this:- Now just add `/auth/v1/callback` to the end of that to get your full `OAuth Redirect URI`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### Create a Zoom Oauth Appdiff --git a/apps/reference/docs/guides/auth/managing-user-data.mdx b/apps/reference/docs/guides/auth/managing-user-data.mdxindex d0affd2a189..ee6461042f6 100644--- a/apps/reference/docs/guides/auth/managing-user-data.mdx+++ b/apps/reference/docs/guides/auth/managing-user-data.mdx@@ -4,7 +4,7 @@ title: Managing User Datadescription: Securing your user data with Row Level Security.----For security purposes, the `auth` schema is not exposed on the auto-generated API.+For security purposes, the `auth` schema is not exposed on the auto-generated API.Even though Supabase provides an `auth.users` table, it can be helpful to create tables in the `public` schema for storing user data that you want to access via the API.@@ -26,10 +26,9 @@ create table public.profiles (alter table public.profiles enable row level security;```-## Public access-Since Row Level Security is enabled, this table is accessible via the API but no data will be returned unless we set up some Policies.+Since Row Level Security is enabled, this table is accessible via the API but no data will be returned unless we set up some Policies.If we wanted the data to be _readable_ by everyone but only allow logged-in users to update their own data, the Policies would look like this:```sql@@ -64,7 +63,7 @@ const { data } = await supabase.from('profiles').select('id, username, avatar_url, website')-// After the user is logged in, this will only return+// After the user is logged in, this will only return// the logged-in user's data - in this case a single rowconst { error } = await supabase.auth.signIn({ email })const { data: profile } = await supabase@@ -72,27 +71,26 @@ const { data: profile } = await supabase.select('id, username, avatar_url, website')```-## Bypassing Row Level Security+## Bypassing Row Level Security-If you need to fetch a full list of user profiles, we supply a `service_key` which you can use with your API and Client Libraries to bypass Row Level Security.+If you need to fetch a full list of user profiles, we supply a `service_key` which you can use with your API and Client Libraries to bypass Row Level Security.Make sure you _NEVER_ expose this publicly. But it can be used on the server-side to fetch all of the profiles.-## Advanced techniques### Using triggers-If you want to add a row to your `public.profiles` table every time a user signs up, you can use triggers.+If you want to add a row to your `public.profiles` table every time a user signs up, you can use triggers.If the trigger fails however, it could block the user sign ups - so make sure that the code is well-tested.For example:```sql-- inserts a row into public.users-create function public.handle_new_user()-returns trigger-language plpgsql+create function public.handle_new_user()+returns trigger+language plpgsqlsecurity definer set search_path = publicas $$begindiff --git a/apps/reference/docs/guides/auth/row-level-security.mdx b/apps/reference/docs/guides/auth/row-level-security.mdxindex 88d91d049c8..4628992b032 100644--- a/apps/reference/docs/guides/auth/row-level-security.mdx+++ b/apps/reference/docs/guides/auth/row-level-security.mdx@@ -54,7 +54,7 @@ Returns the JWT of the user making the request.:::caution-Deprecated+Deprecated:::diff --git a/apps/reference/docs/guides/client-libraries.mdx b/apps/reference/docs/guides/client-libraries.mdxindex 54db0f94a72..b9959d2f87f 100755--- a/apps/reference/docs/guides/client-libraries.mdx+++ b/apps/reference/docs/guides/client-libraries.mdx@@ -4,16 +4,13 @@ title: Client Librariesdescription: 'Supabase provides client libraries in several languages.'---+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';---The [Supabase Client](/docs/reference/javascript/installing) makes it simple for developers to build secure and scalable products.+The [Supabase Client](/docs/reference/javascript/installing) makes it simple for developers to build secure and scalable products.## Auth-Create new users using [`signUp()`](/docs/reference/javascript/auth-signup). By default, the user will need to verify their email address before logging in.<br/>If confirmations are disabled the response will contain an access token and also a confirmed_at value, otherwise it will just contain a confirmation_sent_at attribute.@@ -31,7 +28,6 @@ const { error, data } = await supabase.auth.signUp({})```-</TabItem><TabItem value="py">@@ -48,7 +44,6 @@ user = supabase.auth.sign_up()```-</TabItem><TabItem value="dart">@@ -70,8 +65,6 @@ void main() async {</Tabs>--Existing users can log in using [`signIn()`](/docs/reference/javascript/auth-signin).<Tabs@@ -84,11 +77,10 @@ Existing users can log in using [`signIn()`](/docs/reference/javascript/auth-sig```jsconst { error, data } = await supabase.auth.signIn({email: '[email protected]',- password: 'example-password'+ password: 'example-password',})```-</TabItem><TabItem value="py">@@ -105,7 +97,6 @@ user = supabase.auth.sign_in()```-</TabItem><TabItem value="dart">@@ -127,7 +118,6 @@ void main() async {</Tabs>-If there is an email, but no password passed to [`signIn()`](/docs/reference/javascript/auth-signin), the user will receive a magic link.<Tabs@@ -139,11 +129,10 @@ If there is an email, but no password passed to [`signIn()`](/docs/reference/jav```jsconst { error, data } = await supabase.auth.signIn({- email: '[email protected]'+ email: '[email protected]',})```-</TabItem><TabItem value="py">@@ -159,7 +148,6 @@ user = supabase.auth.sign_in()```-</TabItem><TabItem value="dart">@@ -181,10 +169,8 @@ void main() async {</Tabs>-Third party logins are also handled through [`signIn()`](/docs/reference/javascript/auth-signin).-<TabsgroupId="libraries"defaultValue="js"@@ -195,11 +181,10 @@ Third party logins are also handled through [`signIn()`](/docs/reference/javascr```jsconst { user, error } = await supabase.auth.signIn({// provider can be 'github', 'google', 'gitlab', or 'bitbucket'- provider: 'github'+ provider: 'github',})```-</TabItem><TabItem value="py">@@ -207,7 +192,6 @@ const { user, error } = await supabase.auth.signIn({# Not yet implemented```-</TabItem><TabItem value="dart">@@ -232,7 +216,6 @@ void main() async {Since Postgres is a Relational database, the client makes it simple to query tables and fetch related data in one round-trip, using [`select()`](/docs/reference/javascript/select).-<TabsgroupId="libraries"defaultValue="js"@@ -241,9 +224,7 @@ Since Postgres is a Relational database, the client makes it simple to query tab<TabItem value="js">```js-const { data, error } = await supabase- .from('countries')- .select(`+const { data, error } = await supabase.from('countries').select(`name,cities (name@@ -251,7 +232,6 @@ const { data, error } = await supabase`)```-</TabItem><TabItem value="py">@@ -266,7 +246,6 @@ supabase: Client = create_client(url, key)data = supabase.table('countries').select('name').execute()```-</TabItem><TabItem value="dart">@@ -289,10 +268,8 @@ void main() async {</Tabs>-You can do advanced [filtering](/docs/reference/javascript/using-filters) to extract only the data that you need.-<TabsgroupId="libraries"defaultValue="js"@@ -308,7 +285,6 @@ const { data, error } = await supabase.limit(10)```-</TabItem><TabItem value="py">@@ -318,7 +294,6 @@ data = supabase.table('cities').select('name, country_id').eq('name', 'Germany')assert len(data.get("data", [])) > 0```-</TabItem><TabItem value="dart">@@ -343,11 +318,8 @@ void main() async {</Tabs>-You can create data easily using [`insert()`](/docs/reference/javascript/insert).--<TabsgroupId="libraries"defaultValue="js"@@ -356,15 +328,12 @@ You can create data easily using [`insert()`](/docs/reference/javascript/insert)<TabItem value="js">```js-const { data, error } = await supabase- .from('cities')- .insert([- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- ])+const { data, error } = await supabase.from('cities').insert([+ { name: 'The Shire', country_id: 554 },+ { name: 'Rohan', country_id: 555 },+])```-</TabItem><TabItem value="py">@@ -373,7 +342,7 @@ data = supabase.table('cities').insert({'name': 'Gotham', 'country_id': 556 }).e# assert if insert response is a successassert data.get("status_code") in (200, 201)-# bulk insert+# bulk insertdata = supabase.table('cities').insert([{'name': 'Gotham', 'country_id': 556 },{'name': 'The Shire', 'country_id': 557 }@@ -381,7 +350,6 @@ data = supabase.table('cities').insert([```-</TabItem><TabItem value="dart">@@ -407,12 +375,10 @@ void main() async {</Tabs>-## Realtime ChangesThe Supabase client makes it simple to listen to realtime database changes, using [`subscribe()`](/docs/reference/javascript/subscribe).-<TabsgroupId="libraries"defaultValue="js"@@ -423,13 +389,12 @@ The Supabase client makes it simple to listen to realtime database changes, usin```jsconst mySubscription = supabase.from('countries')- .on('*', payload => {+ .on('*', (payload) => {console.log('Change received!', payload)}).subscribe()```-</TabItem><TabItem value="py">@@ -437,7 +402,6 @@ const mySubscription = supabase# Not yet implemented```-</TabItem><TabItem value="dart">@@ -464,10 +428,8 @@ void main() async {</Tabs>-You can even [listen to Row Level changes](/docs/reference/javascript/subscribe#listening-to-row-level-changes).-<TabsgroupId="libraries"defaultValue="js"@@ -482,7 +444,6 @@ const mySubscription = supabase.subscribe()```-</TabItem><TabItem value="py">@@ -490,7 +451,6 @@ const mySubscription = supabase# Not yet implemented```-</TabItem><TabItem value="dart">@@ -517,8 +477,6 @@ void main() async {</Tabs>--## Next steps- View the [Client Docs](/docs/reference/javascript/installing)diff --git a/apps/reference/docs/guides/database.mdx b/apps/reference/docs/guides/database.mdxindex 2ee6736a54c..04ec661421f 100644--- a/apps/reference/docs/guides/database.mdx+++ b/apps/reference/docs/guides/database.mdx@@ -40,7 +40,12 @@ Dig into the relationships within your data.You can duplicate your tables, just like you would inside a spreadsheet.<video width="99%" muted playsInline controls={true}>- <source src="/docs/videos/duplicate-tables.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/duplicate-tables.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>### The SQL Editor@@ -66,7 +71,12 @@ To expand the functionality of your Postgres database, you can use extensions.You can enable Postgres extensions with the click of a button within the Supabase dashboard.<video width="99%" muted playsInline controls={true}>- <source src="/docs/videos/toggle-extensions.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/toggle-extensions.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>[Learn more](/docs/guides/database/extensions) about all the extensions provided on Supabase.@@ -145,15 +155,27 @@ const NEW_PROJECT_URL = 'https://yyy.supabase.co'const NEW_PROJECT_SERVICE_KEY = 'new-project-service-key-yyy';(async () => {- const oldSupabaseRestClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY, {- schema: 'storage',- })- const oldSupabaseClient = createClient(OLD_PROJECT_URL, OLD_PROJECT_SERVICE_KEY)- const newSupabaseClient = createClient(NEW_PROJECT_URL, NEW_PROJECT_SERVICE_KEY)+ const oldSupabaseRestClient = createClient(+ OLD_PROJECT_URL,+ OLD_PROJECT_SERVICE_KEY,+ {+ schema: 'storage',+ }+ )+ const oldSupabaseClient = createClient(+ OLD_PROJECT_URL,+ OLD_PROJECT_SERVICE_KEY+ )+ const newSupabaseClient = createClient(+ NEW_PROJECT_URL,+ NEW_PROJECT_SERVICE_KEY+ )// make sure you update max_rows in postgrest settings if you have a lot of objects// or paginate here- const { data: oldObjects, error } = await oldSupabaseRestClient.from('objects').select()+ const { data: oldObjects, error } = await oldSupabaseRestClient+ .from('objects')+ .select()if (error) {console.log('error getting objects from old bucket')throw error@@ -162,9 +184,10 @@ const NEW_PROJECT_SERVICE_KEY = 'new-project-service-key-yyy'for (const objectData of oldObjects) {console.log(`moving ${objectData.id}`)try {- const { data, error: downloadObjectError } = await oldSupabaseClient.storage- .from(objectData.bucket_id)- .download(objectData.name)+ const { data, error: downloadObjectError } =+ await oldSupabaseClient.storage+ .from(objectData.bucket_id)+ .download(objectData.name)if (downloadObjectError) {throw downloadObjectError}diff --git a/apps/reference/docs/guides/database/arrays.mdx b/apps/reference/docs/guides/database/arrays.mdxindex 63c5a12716d..51d7f7474fd 100644--- a/apps/reference/docs/guides/database/arrays.mdx+++ b/apps/reference/docs/guides/database/arrays.mdx@@ -158,7 +158,7 @@ console.log(JSON.stringify(data, null, 2))returns:```js-[+;[{textarray: ['Harry', 'Larry', 'Moe'],},diff --git a/apps/reference/docs/guides/database/connecting-to-postgres.mdx b/apps/reference/docs/guides/database/connecting-to-postgres.mdxindex 183c12580d4..e50ce5725bb 100644--- a/apps/reference/docs/guides/database/connecting-to-postgres.mdx+++ b/apps/reference/docs/guides/database/connecting-to-postgres.mdx@@ -43,7 +43,12 @@ You cannot manage the database schema via the API (for security reasons). To doYou can find the API URL and Keys in the [Dashboard](https://app.supabase.com/project/_/settings/api).<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Direct connections@@ -57,7 +62,12 @@ Every Supabase project provides a full Postgres database. You can connect to the3. Find your Connection Info and Connection String. Direct connections are on port `5432`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/postgres-connection.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/postgres-connection.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Connection Pool@@ -102,7 +112,12 @@ This is the most granular option. Connections are returned to the pool after eve3. Find your Connection Info and Connection String. Connection pooling is on port `6543`.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/postgres-connection.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/postgres-connection.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Connecting with SSLdiff --git a/apps/reference/docs/guides/database/extensions.mdx b/apps/reference/docs/guides/database/extensions.mdxindex fceef7106e5..6a4bb750105 100644--- a/apps/reference/docs/guides/database/extensions.mdx+++ b/apps/reference/docs/guides/database/extensions.mdx@@ -5,13 +5,12 @@ description: Using Postgres extensions.---import ExtensionsComponent from '@site/src/components/Extensions'-import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Extensions are exactly as they sound - they "extend" the database with functionality which isn't part of the Postgres core.Supabase has pre-installed some of the most useful open source extensions.-### Enable and disable extensions<Tabs@@ -28,7 +27,12 @@ Supabase has pre-installed some of the most useful open source extensions.3. Enable or disable an extension.<video width="99%" muted playsInline controls={true}>-<source src="/docs/videos/toggle-extensions.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/toggle-extensions.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -39,11 +43,11 @@ Supabase has pre-installed some of the most useful open source extensions.-- Example: enable the "pgtap" extension and ensure it is installedcreate extension pgtap with schema extensions;--- Example: disable the "pgtap" extension+-- Example: disable the "pgtap" extensiondrop extension pgtap;```-Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".+Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".To disable an extension call `drop extension`.:::caution@@ -54,7 +58,6 @@ Enabling some extensions with `create extension <extension-name> with schema ext</Tabs>-### Full list of extensionsSupabase is pre-configured with over 50 extensions. You can also install your own SQL extensions directly in the database through our SQL editor.diff --git a/apps/reference/docs/guides/database/extensions/http.mdx b/apps/reference/docs/guides/database/extensions/http.mdxindex 3ae3da1b654..6f003cf0714 100644--- a/apps/reference/docs/guides/database/extensions/http.mdx+++ b/apps/reference/docs/guides/database/extensions/http.mdx@@ -1,18 +1,18 @@---id: http-title: "http: RESTful Client"+title: 'http: RESTful Client'description: An HTTP Client for PostgreSQL Functions.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'The `http` extension allows you to call RESTful endpoints within Postgres.## Quick demo<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/rARgrELRCwY"@@ -36,7 +36,6 @@ You can use the `http` extension to make these network requests from Postgres.## Usage-### Enable the extension<Tabs@@ -56,14 +55,14 @@ You can use the `http` extension to make these network requests from Postgres.<TabItem value="sql">```sql--- Example: enable the "http" extension+-- Example: enable the "http" extensioncreate extension http with schema extensions;--- Example: disable the "http" extension+-- Example: disable the "http" extensiondrop extension if exists http;```-Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".+Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".To disable an extension, call `drop extension`.It's good practice to create the extension within a separate schema (like `extensions`) to keep your database clean.@@ -80,11 +79,11 @@ While the main usage is simply `http('http_request')`, there are 5 wrapper funct- `http_post()`- `http_put()`- `http_delete()`-- `http_head()`+- `http_head()`-### Returned values+### Returned values-A successful call to a web URL from the `http` extension returns a record with the following fields:+A successful call to a web URL from the `http` extension returns a record with the following fields:- `status`: integer- `content_type`: character varying@@ -96,19 +95,18 @@ A successful call to a web URL from the `http` extension returns a record with t### Simple `GET` example```sql-select+select"status", "content"::jsonb-from+fromhttp_get('https://jsonplaceholder.typicode.com/todos/1');```-### Simple `POST` example```sql-select+select"status", "content"::jsonb-from+fromhttp_post('https://jsonplaceholder.typicode.com/posts','{ "title": "foo", "body": "bar", "userId": 1 }',@@ -116,7 +114,6 @@ from);```--## Resources+## Resources- Official [`http` GitHub Repository](https://github.com/pramsey/pgsql-http)diff --git a/apps/reference/docs/guides/database/extensions/pgtap.mdx b/apps/reference/docs/guides/database/extensions/pgtap.mdxindex 484a50f7afd..17e82c5f200 100644--- a/apps/reference/docs/guides/database/extensions/pgtap.mdx+++ b/apps/reference/docs/guides/database/extensions/pgtap.mdx@@ -1,20 +1,20 @@---id: pgtap-title: "pgTAP: Unit Testing"+title: 'pgTAP: Unit Testing'description: Unit testing in PostgreSQL.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-`pgTAP` is a unit testing extension for PostgreSQL.+`pgTAP` is a unit testing extension for PostgreSQL.## OverviewLet's cover some basic concepts:- Unit tests: allow you to test small parts of a system (like a database table!).-- TAP: stands for [Test Anything Protocol](http://testanything.org/). It is an framework which aims to simplify the error reporting during testing.+- TAP: stands for [Test Anything Protocol](http://testanything.org/). It is an framework which aims to simplify the error reporting during testing.## Usage@@ -34,21 +34,26 @@ Let's cover some basic concepts:3. Search for "pgtap" and enable the extension.<video width="99%" muted playsInline controls={true}>-<source src="/docs/videos/toggle-extensions.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/toggle-extensions.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem><TabItem value="sql">```sql--- Enable the "pgtap" extension+-- Enable the "pgtap" extensioncreate extension pgtap with schema extensions;--- Disable the "pgtap" extension+-- Disable the "pgtap" extensiondrop extension if exists pgtap;```-Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".+Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".To disable an extension you can call `drop extension`.It's good practice to create the extension within a separate schema (like `extensions`) to keep your database clean.@@ -57,7 +62,7 @@ It's good practice to create the extension within a separate schema (like `exten</Tabs>-### Managing tests+### Managing testsIt's a good practice to keep all your tests in a separate schema.@@ -65,8 +70,7 @@ It's a good practice to keep all your tests in a separate schema.create schema tests;```-### Creating a test-+### Creating a test@TODO@@ -74,20 +78,16 @@ create schema tests;- We should come up with a recommendation on how to run the tests. Via a function? External scripts?- Eventually this can be done via our CLI+### Running a test-### Running a test--@TODO-+@TODO-## Examples+## ExamplesLet's look at a few different tests which could be helpful in your project.-### Testing tables-```sqlbegin;select plan( 1 );@@ -102,7 +102,6 @@ API:- [`has_table()`](https://pgtap.org/documentation.html#has_table)-### Testing columns```sql@@ -121,6 +120,6 @@ API:- [`has_column()`](https://pgtap.org/documentation.html#has_column)- [`col_is_pk()`](https://pgtap.org/documentation.html#col_is_pk)-## Resources+## Resources- Official [`pgTAP` documentation](https://pgtap.org/)diff --git a/apps/reference/docs/guides/database/extensions/plv8.mdx b/apps/reference/docs/guides/database/extensions/plv8.mdxindex 1eed5c92bac..927199f8464 100644--- a/apps/reference/docs/guides/database/extensions/plv8.mdx+++ b/apps/reference/docs/guides/database/extensions/plv8.mdx@@ -1,17 +1,17 @@---id: plv8-title: "plv8: JavaScript Language"+title: 'plv8: JavaScript Language'description: JavaScript language for PostgreSQL.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-The `plv8` extension allows you use JavaScript within Postgres.+The `plv8` extension allows you use JavaScript within Postgres.## Overview-While Postgres natively runs SQL, it can also run other "procedural languages".+While Postgres natively runs SQL, it can also run other "procedural languages".`plv8` allows you to run JavaScript code - specifically any code that runs on the [V8 JavaScript engine](https://v8.dev).It can be used for database functions, triggers, queries and more.@@ -37,14 +37,14 @@ It can be used for database functions, triggers, queries and more.<TabItem value="sql">```sql--- Example: enable the "plv8" extension+-- Example: enable the "plv8" extensioncreate extension plv8;--- Example: disable the "plv8" extension+-- Example: disable the "plv8" extensiondrop extension if exists plv8;```-Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".+Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".To disable an extension, call `drop extension`.Procedural languages are automatically installed within `pg_catalog`, so you don't need to specify a schema.@@ -58,7 +58,7 @@ Functions written in `plv8` are written just like any other PostgreSQL functionswith the `language` identifier set to `plv8`.```sql-create or replace function function_name()+create or replace function function_name()returns void as $$// V8 JavaScript// code@@ -66,7 +66,7 @@ returns void as $$$$ language plv8;```-You can call `plv8` functions like any other Postgres function:+You can call `plv8` functions like any other Postgres function:<TabsdefaultValue="sql"@@ -98,7 +98,7 @@ const { data, error } = supabase.rpc('function_name')A [scalar function](https://plv8.github.io/#scalar-function-calls) is anything that takes in some user input and returns a single result.```sql-create or replace function hello_world(name text)+create or replace function hello_world(name text)returns text as $$let output = `Hello, ${name}!`;@@ -107,16 +107,16 @@ returns text as $$$$ language plv8;```-### Executing SQL+### Executing SQLYou can execute SQL within `plv8` code using the [`plv8.execute` function](https://plv8.github.io/#plv8-execute).```sql-create or replace function update_user(id bigint, first_name text)+create or replace function update_user(id bigint, first_name text)returns smallint as $$var num_affected = plv8.execute(- 'update profiles set first_name = $1 where id = $2',+ 'update profiles set first_name = $1 where id = $2',[first_name, id]);@@ -129,7 +129,7 @@ $$ language plv8;A [set-returning function](https://plv8.github.io/#set-returning-function-calls) is anything that returns a full set of results - for example, rows in a table.```sql-create or replace function get_messages()+create or replace function get_messages()returns setof messages as $$var json_result = plv8.execute(@@ -140,7 +140,7 @@ returns setof messages as $$$$ language plv8;```-## Resources+## Resources- Official [`plv8` documentation](https://plv8.github.io/)- [plv8 GitHub Repository](https://github.com/plv8/plv8)diff --git a/apps/reference/docs/guides/database/extensions/uuid-ossp.mdx b/apps/reference/docs/guides/database/extensions/uuid-ossp.mdxindex 0fdb296c6b7..2fe759a5cb6 100644--- a/apps/reference/docs/guides/database/extensions/uuid-ossp.mdx+++ b/apps/reference/docs/guides/database/extensions/uuid-ossp.mdx@@ -1,18 +1,17 @@---id: uuid-ossp-title: "uuid-ossp: Unique Identifiers"+title: 'uuid-ossp: Unique Identifiers'description: A UUID generator for PostgreSQL.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'The `uuid-ossp` extension can be used to generate a `UUID`.-## Overview-A `UUID` is a "Universally Unique Identifer" and it is, for practical purposes, unique.+A `UUID` is a "Universally Unique Identifer" and it is, for practical purposes, unique.This makes them particularly well suited as Primary Keys. It is occasionally referred to as a `GUID`, which stands for "Globally Unique Identifer".## Usage@@ -39,14 +38,14 @@ Currently `uuid-ossp` extension is enabled by default and cannot be disabled.<TabItem value="sql">```sql--- Example: enable the "uuid-ossp" extension+-- Example: enable the "uuid-ossp" extensioncreate extension "uuid-ossp" with schema extensions;--- Example: disable the "uuid-ossp" extension+-- Example: disable the "uuid-ossp" extensiondrop extension if exists "uuid-ossp";```-Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".+Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".To disable an extension, call `drop extension`.It's good practice to create the extension within a separate schema (like `extensions`) to keep your database clean.@@ -58,7 +57,7 @@ Currently `uuid-ossp` extension is enabled by default and cannot be disabled.</Tabs>-### The `uuid` type+### The `uuid` typeOnce the extension is enabled, you now have access to a `uuid` type.@@ -66,7 +65,7 @@ Once the extension is enabled, you now have access to a `uuid` type.Creates a UUID value based on the combination of computer’s MAC address, current timestamp, and a random value.-### `uuid_generate_v4()`+### `uuid_generate_v4()`Creates UUID values based solely on random numbers.@@ -92,7 +91,6 @@ create table contacts ();```--## Resources+## Resources- [The Basics Of PostgreSQL `UUID` Data Type](https://www.postgresqltutorial.com/postgresql-uuid/)diff --git a/apps/reference/docs/guides/database/full-text-search.mdx b/apps/reference/docs/guides/database/full-text-search.mdxindex 53698afc5d3..83ddd87afd1 100644--- a/apps/reference/docs/guides/database/full-text-search.mdx+++ b/apps/reference/docs/guides/database/full-text-search.mdx@@ -1,21 +1,18 @@---id: full-text-search-title: "Full Text Search"+title: 'Full Text Search'description: How to use full text search in PostgreSQL.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';-+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Postgres has built-in functions to handle `Full Text Search` queries. This is like a "search engine" within Postgres.-## PreparationFor this guide we'll use the following example data:-<TabsdefaultValue="Data"values={[@@ -33,8 +30,8 @@ create table books (description text);-insert into books (title, author, description)-values+insert into books (title, author, description)+values('The Poky Little Puppy','Janette Sebring Lowrey','Puppy is slower than other, bigger animals.'),('The Tale of Peter Rabbit','Beatrix Potter','Rabbit eats some vegetables.'),('Tootle','Gertrude Crampton','Little toy train has big dreams.'),@@ -45,13 +42,13 @@ values</TabItem><TabItem value="Data">-| id | title | author | description |-| ---- | ---- | ---- | ----------- |-| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |-| 2 | The Tale of Peter Rabbit | Beatrix Potter | Rabbit eats some vegetables. |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |-| 4 | Green Eggs and Ham | Dr. Seuss | Sam has changing food preferences and eats unusually colored food. |-| 5 | Harry Potter and the Goblet of Fire | J.K. Rowling | Fourth year of school starts, big drama ensues. |+| id | title | author | description |+| --- | ----------------------------------- | ---------------------- | ------------------------------------------------------------------ |+| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |+| 2 | The Tale of Peter Rabbit | Beatrix Potter | Rabbit eats some vegetables. |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |+| 4 | Green Eggs and Ham | Dr. Seuss | Sam has changing food preferences and eats unusually colored food. |+| 5 | Harry Potter and the Goblet of Fire | J.K. Rowling | Fourth year of school starts, big drama ensues. |</TabItem>@@ -69,7 +66,7 @@ Converts your data into searchable "tokens". `to_tsvector()` stands for "to textselect to_tsvector('green eggs and ham')-- Returns 'egg':2 'green':1 'ham':4-```+```Collectively these tokens are called a "document" which Postgres can use for comparisons.@@ -77,10 +74,9 @@ Collectively these tokens are called a "document" which Postgres can use for comConverts a query string into "tokens" to match. `to_tsquery()` stands for "to text search query".-This conversion step is important because we will want to "fuzzy match" on keywords.+This conversion step is important because we will want to "fuzzy match" on keywords.For example if a user searches for "eggs", and a column has the value "egg", we probably still want to return a match.-### Match: `@@`The `@@` symbol is the "match" symbol for Full Text Search. It returns any matches between a `to_tsvector` result and a `to_tsquery` result.@@ -97,8 +93,8 @@ values={[<TabItem value="SQL">```sql-select *-from books+select *+from bookswhere title = 'Harry';```@@ -127,8 +123,7 @@ final result = await client</TabItem></Tabs>--The equality symbol above (`=`) is very "strict" on what it matches. In a full text search context, we might want to find all "Harry Potter" books and so we can rewrite the+The equality symbol above (`=`) is very "strict" on what it matches. In a full text search context, we might want to find all "Harry Potter" books and so we can rewrite theexample above:<Tabs@@ -141,8 +136,8 @@ values={[<TabItem value="SQL">```sql-select *-from books+select *+from bookswhere to_tsvector(title) @@ to_tsquery('Harry');```@@ -187,12 +182,12 @@ values={[<TabItem value="SQL">```sql-select- *-from+select+ *+frombooks-where- to_tsvector(description)+where+ to_tsvector(description)@@ to_tsquery('big');```@@ -220,10 +215,10 @@ final result = await client</TabItem><TabItem value="Data">-| id | title | author | description |-| -- | ----------------------------------- | ----------------- | ----------------------------------------------- |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |-| 5 | Harry Potter and the Goblet of Fire | J.K. Rowling | Fourth year of school starts, big drama ensues. |+| id | title | author | description |+| --- | ----------------------------------- | ----------------- | ----------------------------------------------- |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |+| 5 | Harry Potter and the Goblet of Fire | J.K. Rowling | Fourth year of school starts, big drama ensues. |</TabItem></Tabs>@@ -241,11 +236,11 @@ values={[<TabItem value="SQL">```sql-select- *-from+select+ *+frombooks-where+whereto_tsvector(description || ' ' || title) -- concat columns, but be sure to include a space to separate them!@@ to_tsquery('little');```@@ -253,17 +248,17 @@ where</TabItem><TabItem value="Data">-| id | title | author | description |-| -- | --------------------- | ---------------------- | ------------------------------------------- |-| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |+| id | title | author | description |+| --- | --------------------- | ---------------------- | ------------------------------------------- |+| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |</TabItem></Tabs>### Match all search words-To find all `books` where `description` contains BOTH of the words `little` and `big`, we can use the `&` symbol:+To find all `books` where `description` contains BOTH of the words `little` and `big`, we can use the `&` symbol:<TabsdefaultValue="SQL"@@ -276,11 +271,11 @@ values={[<TabItem value="SQL">```sql-select- *-from+select+ *+frombooks-where+whereto_tsvector(description)@@ to_tsquery('little & big'); -- use & for AND in the search query```@@ -309,9 +304,9 @@ final result = await client</TabItem><TabItem value="Data">-| id | title | author | description |-| -- | ------ | ----------------- | -------------------------------- |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |+| id | title | author | description |+| --- | ------ | ----------------- | -------------------------------- |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |</TabItem></Tabs>@@ -331,12 +326,12 @@ values={[<TabItem value="SQL">```sql-select- *-from+select+ *+frombooks-where- to_tsvector(description)+where+ to_tsvector(description)@@ to_tsquery('little | big'); -- use | for OR in the search query```@@ -364,10 +359,10 @@ final result = await client</TabItem><TabItem value="Data">-| id | title | author | description |-| -- | --------------------- | ---------------------- | ------------------------------------------- |-| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |+| id | title | author | description |+| --- | --------------------- | ---------------------- | ------------------------------------------- |+| 1 | The Poky Little Puppy | Janette Sebring Lowrey | Puppy is slower than other, bigger animals. |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. |</TabItem></Tabs>@@ -376,15 +371,15 @@ Notice how searching for `big` includes results with the word `bigger` (or `bigg## Creating Indexes-Now that we have Full Text Search working, let's create an `index`. This will allow Postgres to "build" the documents pre-emptively so that they+Now that we have Full Text Search working, let's create an `index`. This will allow Postgres to "build" the documents pre-emptively so that theydon't need to be created at the time we execute the query. This will make our queries much faster.### Searchable columns-Let's create a new column `fts` inside the `books` table to store the searchable index of the `title` and `description` columns.+Let's create a new column `fts` inside the `books` table to store the searchable index of the `title` and `description` columns.-We can use a special feature of Postgres called-[Generated Columns](https://www.postgresql.org/docs/current/ddl-generated-columns.html)+We can use a special feature of Postgres called+[Generated Columns](https://www.postgresql.org/docs/current/ddl-generated-columns.html)to ensure that the index is updated any time the values in the `title` and `description` columns change.<Tabs@@ -396,27 +391,27 @@ values={[<TabItem value="SQL">```sql-alter table- books-add column+alter table+ books+add columnfts tsvector generated always as (to_tsvector('english', description || ' ' || title)) stored;-+create index books_fts on books using gin (fts); -- generate the index-select id, fts+select id, ftsfrom books;```</TabItem><TabItem value="Data">-| id | fts |-| -- | --------------------------------------------------------------------------------------------------------------- |-| 1 | 'anim':7 'bigger':6 'littl':10 'poki':9 'puppi':1,11 'slower':3 |-| 2 | 'eat':2 'peter':8 'rabbit':1,9 'tale':6 'veget':4 |-| 3 | 'big':5 'dream':6 'littl':1 'tootl':7 'toy':2 'train':3 |-| 4 | 'chang':3 'color':9 'eat':7 'egg':12 'food':4,10 'green':11 'ham':14 'prefer':5 'sam':1 'unus':8 |-| 5 | 'big':6 'drama':7 'ensu':8 'fire':15 'fourth':1 'goblet':13 'harri':9 'potter':10 'school':4 'start':5 'year':2 |+| id | fts |+| --- | --------------------------------------------------------------------------------------------------------------- |+| 1 | 'anim':7 'bigger':6 'littl':10 'poki':9 'puppi':1,11 'slower':3 |+| 2 | 'eat':2 'peter':8 'rabbit':1,9 'tale':6 'veget':4 |+| 3 | 'big':5 'dream':6 'littl':1 'tootl':7 'toy':2 'train':3 |+| 4 | 'chang':3 'color':9 'eat':7 'egg':12 'food':4,10 'green':11 'ham':14 'prefer':5 'sam':1 'unus':8 |+| 5 | 'big':6 'drama':7 'ensu':8 'fire':15 'fourth':1 'goblet':13 'harri':9 'potter':10 'school':4 'start':5 'year':2 |</TabItem></Tabs>@@ -436,11 +431,11 @@ values={[<TabItem value="SQL">```sql-select- *-from+select+ *+frombooks-where+wherefts @@ to_tsquery('little & big');```@@ -468,9 +463,9 @@ final result = await client</TabItem><TabItem value="Data">-| id | title | author | description | fts |-| -- | ------ | ----------------- | -------------------------------- | ------------------------------------------------------- |-| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. | 'big':5 'dream':6 'littl':1 'tootl':7 'toy':2 'train':3 |+| id | title | author | description | fts |+| --- | ------ | ----------------- | -------------------------------- | ------------------------------------------------------- |+| 3 | Tootle | Gertrude Crampton | Little toy train has big dreams. | 'big':5 'dream':6 'littl':1 'tootl':7 'toy':2 'train':3 |</TabItem></Tabs>@@ -485,7 +480,6 @@ to learn about additional query operators you can use to do more advanced `fullThe proximity symbol is useful for searching for terms that are a certain "distance" apart.For example, to find the phrase `big dreams`, where the a match for "big" is followed immediately by a match for "dreams":-<TabsdefaultValue="SQL"values={[@@ -496,11 +490,11 @@ values={[<TabItem value="SQL">```sql-select+select*-from+frombooks-where+whereto_tsvector(description) @@ to_tsquery('big <-> dreams');```@@ -528,7 +522,6 @@ final result = await client</TabItem></Tabs>-We can also use the `<->` to find words within a certain distance of eachother. For example to find `year` and `school` within 2 words of each other:<Tabs@@ -541,11 +534,11 @@ values={[<TabItem value="SQL">```sql-select+select*-from+frombooks-where+whereto_tsvector(description) @@ to_tsquery('year <2> school');```@@ -573,7 +566,6 @@ final result = await client</TabItem></Tabs>-### Negation: `!`The negation symbol can be used to find phrases which _don't_ contain a search term.@@ -589,11 +581,11 @@ values={[<TabItem value="SQL">```sql-select+select*-from+frombooks-where+whereto_tsvector(description) @@ to_tsquery('big & !little');```@@ -621,10 +613,6 @@ final result = await client</TabItem></Tabs>-## Resources-* [PostgreSQL: Text Search Functions and Operators](https://www.postgresql.org/docs/12/functions-textsearch.html)---+- [PostgreSQL: Text Search Functions and Operators](https://www.postgresql.org/docs/12/functions-textsearch.html)diff --git a/apps/reference/docs/guides/database/functions.mdx b/apps/reference/docs/guides/database/functions.mdxindex 507643e7a31..d5d210d4df9 100644--- a/apps/reference/docs/guides/database/functions.mdx+++ b/apps/reference/docs/guides/database/functions.mdx@@ -4,17 +4,16 @@ title: Database Functionsdescription: Creating and using Postgres functions.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'--Postgres has built-in support for [SQL functions](https://www.postgresql.org/docs/current/sql-createfunction.html).+Postgres has built-in support for [SQL functions](https://www.postgresql.org/docs/current/sql-createfunction.html).These functions live inside your database, and they can be [used with the API](/docs/reference/javascript/rpc).## Quick demo<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/MJZCCpCYEqk"@@ -25,17 +24,15 @@ These functions live inside your database, and they can be [used with the API](/## Getting started-Supabase provides several options for creating database functions. You can use the Dashboard or create them directly using SQL.-We provide a SQL editor within the Dashboard, or you can [connect](/docs/guides/database/connecting/connecting-to-postgres) to your database+Supabase provides several options for creating database functions. You can use the Dashboard or create them directly using SQL.+We provide a SQL editor within the Dashboard, or you can [connect](/docs/guides/database/connecting/connecting-to-postgres) to your databaseand run the SQL queries yourself.-1. Go to the "SQL editor" section.2. Click "New Query".3. Enter the SQL to create or replace your Database function.4. Click "Run" or cmd+enter (ctrl+enter).-## Simple FunctionsLet's create a basic Database Function which returns a string "hello world".@@ -56,7 +53,7 @@ $$; --6At it's most basic a function has the following parts:1. `create or replace function hello_world()`: The function declaration, where `hello_world` is the name of the function. You can use either `create` when creating a new function or `replace` when replacing an existing function. Or you can use `create or replace` together to handle either.-2. `returns text`: The type of data that the function returns. If it returns nothing, you can `returns void`.+2. `returns text`: The type of data that the function returns. If it returns nothing, you can `returns void`.3. `language sql`: The language used inside the function body. This can also be a procedural language: `plpgsql`, `plv8`, `plpython`, etc.4. `as $$`: The function wrapper. Anything enclosed inside the `$$` symbols will be part of the function body.5. `select 'hello world';`: A simple function body. The final `select` statement inside a function body will be returned if there are no statements following it.@@ -85,9 +82,8 @@ select hello_world();</TabItem><TabItem value="JS">-```js-const { data, error } = await supabase- .rpc('hello_world')+```js+const { data, error } = await supabase.rpc('hello_world')```Reference: [rpc()](/docs/reference/javascript/rpc)@@ -95,7 +91,7 @@ Reference: [rpc()](/docs/reference/javascript/rpc)</TabItem><TabItem value="Dart">-```dart+```dartfinal res = await supabase.rpc('hello_world').execute();@@ -107,7 +103,6 @@ Reference: [rpc()](/docs/reference/dart/rpc)</Tabs>-## Returning data setsDatabase Functions can also return data sets from [Tables](/docs/guides/database/tables) or Views.@@ -129,8 +124,8 @@ create table planets (name text);-insert into planets (id, name)-values+insert into planets (id, name)+values(1, 'Tattoine'),(2, 'Alderaan'),(3, 'Kashyyyk');@@ -141,8 +136,8 @@ create table people (planet_id bigint references planets);-insert into people (id, name, planet_id)-values+insert into people (id, name, planet_id)+values(1, 'Anakin Skywalker', 1),(2, 'Luke Skywalker', 1),(3, 'Princess Leia', 2),@@ -154,30 +149,29 @@ values<h4>Planets</h4>-| id | name |-| ---- | ---- |-| 1 | Tattoine |-| 2 | Alderaan |-| 3 | Kashyyyk |+| id | name |+| --- | -------- |+| 1 | Tattoine |+| 2 | Alderaan |+| 3 | Kashyyyk |<h4>People</h4>-| id | name | planet_id |-| ---- | ---- | ---- |-| 1 | Anakin Skywalker | 1 |-| 2 | Luke Skywalker | 1 |-| 3 | Princess Leia | 2 |-| 4 | Chewbacca | 3 |+| id | name | planet_id |+| --- | ---------------- | --------- |+| 1 | Anakin Skywalker | 1 |+| 2 | Luke Skywalker | 1 |+| 3 | Princess Leia | 2 |+| 4 | Chewbacca | 3 |</TabItem></Tabs>-We could create a function which returns all the planets:```sql-create or replace function get_planets()+create or replace function get_planets()returns setof planetslanguage sqlas $$@@ -206,16 +200,14 @@ where id = 1;</TabItem><TabItem value="JS">-```js-const { data, error } = supabase- .rpc('get_planets')- .eq('id', 1)+```js+const { data, error } = supabase.rpc('get_planets').eq('id', 1)```</TabItem><TabItem value="Dart">-```dart+```dartfinal res = await supabase.rpc('get_planets').eq('id', 1)@@ -226,17 +218,16 @@ final res = await supabase</Tabs>-## Passing parametersLet's create a Function to insert a new planet into the `planets` table and return the new ID. Note that this time we're using the `plpgsql` language.```sql-create or replace function add_planet(name text)+create or replace function add_planet(name text)returns bigintlanguage plpgsqlas $$-declare+declarenew_row bigint;begininsert into planets(name)@@ -267,16 +258,14 @@ select * from add_planet('Jakku');</TabItem><TabItem value="JS">-```js-const { data, error } = await supabase- .rpc('add_planet', { name: 'Jakku' })+```js+const { data, error } = await supabase.rpc('add_planet', { name: 'Jakku' })```-</TabItem><TabItem value="Dart">-```dart+```dartfinal res = await supabase.rpc('add_planet', params: { 'name': 'Jakku' }).execute();@@ -286,7 +275,6 @@ final res = await supabase</Tabs>-## Suggestions### Database Functions vs Edge Functions@@ -301,9 +289,9 @@ For use-cases which require low-latency we recommend [Edge Functions](/docs/guidPostgres allows you to specify whether you want the function to be executed as the user _calling_ the function (`invoker`), or as the _creator_ of the function (`definer`). For example:```sql-create function hello_world()-returns text-language plpgsql+create function hello_world()+returns text+language plpgsqlsecurity definer set search_path = publicas $$begin@@ -312,23 +300,22 @@ end;$$;```-It is best practice to use `security invoker` (which is also the default). If you ever use `security definer`, you _must_ set the `search_path`.+It is best practice to use `security invoker` (which is also the default). If you ever use `security definer`, you _must_ set the `search_path`.This limits the potential damage if you allow access to schemas which the user executing the function should not have.## Resources-- Official Client libraries: [JavaScript](/docs/reference/javascript/rpc) and [Dart](/docs/reference/dart/rpc)- Community client libraries: [github.com/supabase-community](https://github.com/supabase-community)- PostgreSQL Official Docs: [Chapter 9. Functions and Operators](https://www.postgresql.org/docs/current/functions.html)- PostgreSQL Reference: [CREATE FUNCTION](https://www.postgresql.org/docs/9.1/sql-createfunction.html)-## Deep Dive+## Deep Dive### Create Database Functions<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/MJZCCpCYEqk"@@ -340,7 +327,7 @@ This limits the potential damage if you allow access to schemas which the user e### Call Database Functions using JavaScript<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/I6nnp9AINJk"@@ -352,7 +339,7 @@ This limits the potential damage if you allow access to schemas which the user e### Using Database Functions to call an external API<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/rARgrELRCwY"diff --git a/apps/reference/docs/guides/database/json.mdx b/apps/reference/docs/guides/database/json.mdxindex 0af74c68906..e65429d53de 100644--- a/apps/reference/docs/guides/database/json.mdx+++ b/apps/reference/docs/guides/database/json.mdx@@ -137,18 +137,27 @@ const { data, error } = await supabase.from('books').insert([{title: 'The Tale of Peter Rabbit',author: 'Beatrix Potter',- metadata: { description: 'Rabbit eats some vegetables.', price: 4.49, ages: [2, 5] },+ metadata: {+ description: 'Rabbit eats some vegetables.',+ price: 4.49,+ ages: [2, 5],+ },},{title: 'Tootle',author: 'Gertrude Crampton',- metadata: { description: 'Little toy train has big dreams.', price: 3.99, ages: [2, 5] },+ metadata: {+ description: 'Little toy train has big dreams.',+ price: 3.99,+ ages: [2, 5],+ },},{title: 'Green Eggs and Ham',author: 'Dr. Seuss',metadata: {- description: 'Sam has changing food preferences and eats unusually colored food.',+ description:+ 'Sam has changing food preferences and eats unusually colored food.',price: 7.49,ages: [4, 8],},diff --git a/apps/reference/docs/guides/database/managing-passwords.mdx b/apps/reference/docs/guides/database/managing-passwords.mdxindex 2d878632b43..b7cba2b6354 100644--- a/apps/reference/docs/guides/database/managing-passwords.mdx+++ b/apps/reference/docs/guides/database/managing-passwords.mdx@@ -1,17 +1,16 @@---id: managing-passwords-title: "Passwords"+title: 'Passwords'description: How to change your PostgreSQL database password.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Your PostgreSQL database is the core of your Supabase project, so it's important that it has a strong, secure password at all times.If you use special symbols in your postgres password, you must remember to [percent-encode](https://en.wikipedia.org/wiki/Percent-encoding) your password later if using the postgres connection string e.g. `postgresql://postgres:p%[email protected]:5432/postgres`-### Changing your project passwordWhen you created your project you were also asked to enter a password. This is actually the password for your database, specifically for the `postgres` user.@@ -29,4 +28,3 @@ It's absolutely critical that you store your customers' data safely. Here are so## Resources- [PostgreSQL `ALTER USER` Documentation](https://www.postgresql.org/docs/12/sql-alteruser.html)-diff --git a/apps/reference/docs/guides/database/managing-timezones.mdx b/apps/reference/docs/guides/database/managing-timezones.mdxindex 6092dd779b0..8a2f67d9c7b 100644--- a/apps/reference/docs/guides/database/managing-timezones.mdx+++ b/apps/reference/docs/guides/database/managing-timezones.mdx@@ -1,22 +1,18 @@---id: managing-timezones-title: "Timezones"+title: 'Timezones'slug: managing-timezonesdescription: How to change your database timezone.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';-+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Every Supabase database is set to UTC timezone by default. We strongly recommend keeping it this way, even if your users are in a different location.This is because it makes it much easier to calculate differences between timezones if you adopt the mental model that "everything in my database is in UTC time".-### Change timezone--<TabsdefaultValue="sql"groupId="reference/postgres"@@ -25,11 +21,10 @@ This is because it makes it much easier to calculate differences between timezon<TabItem value="sql">```sql-alter database postgres+alter database postgresset timezone to 'America/New_York';```-</TabItem></Tabs>@@ -43,7 +38,6 @@ Get a full list of timezones supported by your database. This will return the fo- `utc_offset`: Offset from UTC (positive means east of Greenwich)- `is_dst`: True if currently observing daylight savings-<TabsdefaultValue="sql"groupId="reference/postgres"@@ -53,11 +47,10 @@ Get a full list of timezones supported by your database. This will return the fo```sqlselect name, abbrev, utc_offset, is_dst-from pg_timezone_names()+from pg_timezone_names()order by name;```-</TabItem></Tabs>@@ -74,12 +67,11 @@ Use `ilike` (case insensitive search) to find specific timezones.<TabItem value="sql">```sql-select *-from pg_timezone_names()+select *+from pg_timezone_names()where name ilike '%york%';```-</TabItem>-</Tabs>\ No newline at end of file+</Tabs>diff --git a/apps/reference/docs/guides/database/replication.mdx b/apps/reference/docs/guides/database/replication.mdxindex 1ed979fa4a2..e78ec795f81 100644--- a/apps/reference/docs/guides/database/replication.mdx+++ b/apps/reference/docs/guides/database/replication.mdx@@ -1,12 +1,11 @@---id: replication-title: "Replication"+title: 'Replication'slug: replication----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';-+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Replication is a technique for copying the data from one database to another. Supabase uses replication functionality to provide a real-time API. Replication is useful for:@@ -23,7 +22,12 @@ Replication is done through _publications_, a method of choosing which changes t4. Control which tables broadcast changes by selecting **Source** and toggling each table.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/api/api-realtime.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-realtime.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Create a publication@@ -31,28 +35,28 @@ Replication is done through _publications_, a method of choosing which changes tThis publication contains changes to all tables.```sql-create publication publication_name+create publication publication_namefor all tables;```## Create a publication to listen to individual tables```sql-create publication publication_name+create publication publication_namefor table table_one, table_two;```## Add tables to an existing publication```sql-alter publication publication_name+alter publication publication_nameadd table table_name;```## Listen to `insert````sql-create publication publication_name+create publication publication_namefor all tableswith (publish = 'insert');```@@ -60,7 +64,7 @@ with (publish = 'insert');## Listen to `update````sql-create publication publication_name+create publication publication_namefor all tableswith (publish = 'update');```@@ -68,7 +72,7 @@ with (publish = 'update');## Listen to `delete````sql-create publication publication_name+create publication publication_namefor all tableswith (publish = 'delete');```@@ -84,11 +88,11 @@ drop publication if exists publication_name;If you're recreating a publication, it's best to do it in a transaction to ensure the operation succeeds.```sql-begin;+begin;-- remove the realtime publication- drop publication if exists publication_name;+ drop publication if exists publication_name;-- re-create the publication but don't enable it for any tables- create publication publication_name;+ create publication publication_name;commit;```diff --git a/apps/reference/docs/guides/database/sql-to-api.mdx b/apps/reference/docs/guides/database/sql-to-api.mdxindex 4a07440ae3a..298ece3417d 100644--- a/apps/reference/docs/guides/database/sql-to-api.mdx+++ b/apps/reference/docs/guides/database/sql-to-api.mdx@@ -78,6 +78,6 @@ const { data, error } = await supabase- [Supabase Account - Free Tier OK](https://supabase.com)- [Postgrest Operators](https://postgrest.org/en/stable/api.html#operators)-- [Supabase API: JavaScript select](/docs/reference/javascript/select)-- [Supabase API: JavaScript modifiers](/docs/reference/javascript/using-modifiers)-- [Supabase API: JavaScript filters](/docs/reference/javascript/using-filters)+- [Supabase API: JavaScript select](/docs/reference/javascript/select)+- [Supabase API: JavaScript modifiers](/docs/reference/javascript/using-modifiers)+- [Supabase API: JavaScript filters](/docs/reference/javascript/using-filters)diff --git a/apps/reference/docs/guides/database/tables.mdx b/apps/reference/docs/guides/database/tables.mdxindex f04015df257..34550cc87c3 100644--- a/apps/reference/docs/guides/database/tables.mdx+++ b/apps/reference/docs/guides/database/tables.mdx@@ -44,7 +44,12 @@ and run the SQL queries yourself.<TabItem value="dashboard"><video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-create-table-sm.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-create-table-sm.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>1. Go to the [Table Editor](https://app.supabase.com/project/_/editor) page in the Dashboard.@@ -394,7 +399,7 @@ create view transcripts asfrom gradesleft join students on grades.student_id = students.idleft join courses on grades.course_id = courses.id;-+alter view transcripts owner to authenticated;```diff --git a/apps/reference/docs/guides/examples.mdx b/apps/reference/docs/guides/examples.mdxindex 70035bdfdb3..95bda6146b6 100644--- a/apps/reference/docs/guides/examples.mdx+++ b/apps/reference/docs/guides/examples.mdx@@ -6,15 +6,14 @@ description: 'Examples you can use to get started with Supabase'We have a [set of examples](https://github.com/supabase/supabase/tree/master/examples) in our [main repository](https://github.com/supabase/supabase) to help you get started.-## Featured+## Featured--### Supabase Crash Course+### Supabase Crash CourseBy [Traversy Media](https://www.youtube.com/watch?v=7uKQBl9uZ00).<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="480"src="https://www.youtube-nocookie.com/embed/7uKQBl9uZ00"@@ -28,7 +27,7 @@ By [Traversy Media](https://www.youtube.com/watch?v=7uKQBl9uZ00).By [@jlengstorf](https://twitter.com/jlengstorf) and [@jonmeyers_io](https://twitter.com/jonmeyers_io).<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="480"src="https://www.youtube-nocookie.com/embed/8vqY1KT4TLU"@@ -37,13 +36,12 @@ By [@jlengstorf](https://twitter.com/jlengstorf) and [@jonmeyers_io](https://twiallowFullScreen></iframe>-### Is Supabase LegitBy [Fireship](https://www.youtube.com/watch?v=WiwfiVdfRIc).<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="480"src="https://www.youtube-nocookie.com/embed/WiwfiVdfRIc"@@ -52,7 +50,7 @@ By [Fireship](https://www.youtube.com/watch?v=WiwfiVdfRIc).allowFullScreen></iframe>-## Official Examples+## Official Examples### Todo List@@ -155,5 +153,3 @@ Build a basic Todo List with Supabase and your favorite frontend framework:- [Heavy Bit](https://www.heavybit.com/library/podcasts/jamstack-radio/ep-71-open-source-firebase-alternative-with-paul-copplestone-of-supabase/)- [Log Rocket](https://podrocket.logrocket.com/9)- [FS Jam](https://fsjam.org/episodes/episode-33-supabase-with-paul-copplestone)--diff --git a/apps/reference/docs/guides/functions.mdx b/apps/reference/docs/guides/functions.mdxindex c2294657e3b..5d021eaf1a9 100644--- a/apps/reference/docs/guides/functions.mdx+++ b/apps/reference/docs/guides/functions.mdx@@ -43,7 +43,7 @@ Edge Functions are developed using [Deno](https://deno.com), which offers a fewLearn how to develop Edge Functions in less than 7 minutes:<iframe- className="w-full video-with-border"+ className="video-with-border w-full"width="640"height="385"src="https://www.youtube-nocookie.com/embed/rzglqRdZUQE"@@ -262,7 +262,6 @@ and can be called remotely using the [REST and GraphQL API](/docs/guides/api).For use-cases which require low-latency we recommend [Edge Functions](/docs/guides/functions), which are globally-distributed and can be written in Typescript.-### Organizing your Edge FunctionsWe recommend developing “fat functions”. This means that you should develop few large functions, rather than many small functions. One common pattern when developing Functions is that you need to share code between two or more Functions. To do this, you can store any shared code in a folder prefixed with an underscore (`_`). We recommend this folder structure:diff --git a/apps/reference/docs/guides/hosting/docker.mdx b/apps/reference/docs/guides/hosting/docker.mdxindex 798d5e02999..dd6aa625f11 100644--- a/apps/reference/docs/guides/hosting/docker.mdx+++ b/apps/reference/docs/guides/hosting/docker.mdx@@ -36,7 +36,6 @@ docker-compose upNow visit [http://localhost:3000](http://localhost:3000) to start using Supabase Studio.-## Securing your setupWhile we provided you with some example secrets for getting started, you should NEVER deploy your Supabase setup using the defaults we have provided.@@ -49,7 +48,7 @@ Use your `JWT_SECRET` to generate a `anon` and `service` API keys using the [JWTReplace the values in these files:-- `.env`:+- `.env`:- `ANON_KEY` - replace with an `anon` key- `SERVICE_ROLE_KEY` - replace with a `service` key- `volumes/api/kong.yml`@@ -60,15 +59,14 @@ Replace the values in these files:Update the `.env` file with your own secrets. In particular, these are required:-- `POSTGRES_PASSWORD`: the password for the `postgres` role.+- `POSTGRES_PASSWORD`: the password for the `postgres` role.- `JWT_SECRET`: used by PostgREST and GoTrue, among others.- `SITE_URL`: the base URL of your site.- `SMTP_*`: mail server credentials. You can use any SMTP server.-### Securing the Dashboard-The Docker setup doesn't include a management database for managing users and logins. If you plan to deploy the Studio to the web we suggest you put it behind a web proxy with Basic Auth or hide it behind a VPN.+The Docker setup doesn't include a management database for managing users and logins. If you plan to deploy the Studio to the web we suggest you put it behind a web proxy with Basic Auth or hide it behind a VPN.## Configuration@@ -97,7 +95,6 @@ POSTGRES_PORT=5432Once you have done this, you can safely comment out the `db` section of the `docker-compose` file, and remove any instances where the services `depends_on` the `db` image.-## DeployingSee the following guides to deploy Docker Compose setup using your preferred tool and platform:@@ -106,7 +103,6 @@ See the following guides to deploy Docker Compose setup using your preferred too- [AWS Fargate](https://aws.amazon.com/blogs/containers/deploy-applications-on-amazon-ecs-using-docker-compose/)- [Using Kompose for Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/translate-compose-kubernetes/)-## Next steps- Got a question? [Ask here](https://github.com/supabase/supabase/discussions).diff --git a/apps/reference/docs/guides/hosting/overview.mdx b/apps/reference/docs/guides/hosting/overview.mdxindex db903c65d9c..fe8fd3e3690 100644--- a/apps/reference/docs/guides/hosting/overview.mdx+++ b/apps/reference/docs/guides/hosting/overview.mdx@@ -9,16 +9,16 @@ import JwtGenerator from '@site/src/components/JwtGenerator'There are several ways to use Supabase:-- [Supabase Cloud](https://app.supabase.com): you don't need to deploy anything. We will manage and scale your infrastructure.+- [Supabase Cloud](https://app.supabase.com): you don't need to deploy anything. We will manage and scale your infrastructure.- [Docker](/docs/guides/hosting/docker): deploy to your own infrastructure.- Kubernetes: coming soon.## Architecture-Supabase is a combination of open source tools, each specifically chosen for Enterprise-readiness.+Supabase is a combination of open source tools, each specifically chosen for Enterprise-readiness.-If the tools and communities already exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool.-If the tool doesn't exist, we build and open source it ourselves.+If the tools and communities already exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool.+If the tool doesn't exist, we build and open source it ourselves.@@ -30,10 +30,6 @@ If the tool doesn't exist, we build and open source it ourselves.- [postgres-meta](https://github.com/supabase/postgres-meta) is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.- [PostgreSQL](https://www.postgresql.org/) is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.----## ConfigurationEach system has a number of configuration options which can be found in the relevant product documentation.@@ -52,11 +48,10 @@ The "middleware" is everything except Postgres, and it should work with any Post### Database Extensions-Supabase requires some Postgres extensions to be enabled by default for the API and Auth system to work. You can find the extensions inside the+Supabase requires some Postgres extensions to be enabled by default for the API and Auth system to work. You can find the extensions inside the[schema initialization script](https://github.com/supabase/supabase/blob/master/docker/volumes/db/init/00-initial-schema.sql).--We recommend installing all extensions into an `extensions` schema. This will keep your API clean,+We recommend installing all extensions into an `extensions` schema. This will keep your API clean,since all tables in the `public` schema are exposed via the API.```sql@@ -70,20 +65,18 @@ create extension if not exists pgjwt with schema extensions;For UUID functions, required for PostgreSQL <13.-##### `pgcrypto` and `pgjwt`-For working with JWT and Auth functions.### Database Roles-Supabase creates several default roles in your Postgres database. To restore defaults at any time you can run the commands inside the+Supabase creates several default roles in your Postgres database. To restore defaults at any time you can run the commands inside the[schema initialization script](https://github.com/supabase/supabase/blob/master/docker/volumes/db/init/00-initial-schema.sql).##### `postgres`-The default PostgreSQL role. This has admin privileges.+The default PostgreSQL role. This has admin privileges.##### `anon`@@ -91,7 +84,7 @@ For "anonymous access". This is the role which the API (PostgREST) will use when##### `authenticator`-A special role for the API (PostgREST). It has very limited access, and is used to validate a JWT and then+A special role for the API (PostgREST). It has very limited access, and is used to validate a JWT and then"change into" another role determined by the JWT verification.##### `authenticated`@@ -116,22 +109,22 @@ For running commands via the Supabase UI.##### `supabase_admin`-Supabase Administrative role for maintaining your database.+Supabase Administrative role for maintaining your database.-## API Keys+## API Keys-The API Gateway (Kong) uses JWT to authenticate access through to the database. The JWT should correspond to a relevant Postgres Role,+The API Gateway (Kong) uses JWT to authenticate access through to the database. The JWT should correspond to a relevant Postgres Role,and Supabase is designed to work with 2 roles: an `ANON_KEY` for unauthenticated access and a `SERVICE_KEY` for elevated access.Use this tool to generate keys:<JwtGenerator />-## Managing your secrets+## Managing your secretsMany components inside Supabase use secure secrets and passwords. These are listed in the self-hosting-[env file](https://github.com/supabase/supabase/blob/master/docker/.env.example), but we strongly recommend using a-secrets manager when deploying to production. Plain text files like dotenv lead to accidental costly leaks.+[env file](https://github.com/supabase/supabase/blob/master/docker/.env.example), but we strongly recommend using a+secrets manager when deploying to production. Plain text files like dotenv lead to accidental costly leaks.Some suggested systems include:@@ -148,7 +141,7 @@ Supabase is evolving fast, and we'll continue to improve the migration strategyWe realize that database migrations are difficult, and this is one of the problems we plan to make easy for developers.-## Deployment options+## Deployment optionsWhile Supabase officially supports Docker, we have several other deployment strategies managed by the community:diff --git a/apps/reference/docs/guides/integrations/appsmith.mdx b/apps/reference/docs/guides/integrations/appsmith.mdxindex ff9d330752a..47357c345ea 100644--- a/apps/reference/docs/guides/integrations/appsmith.mdx+++ b/apps/reference/docs/guides/integrations/appsmith.mdx@@ -23,7 +23,7 @@ Let’s get started!-The database is now set up.+The database is now set up.## Step 2: Connect the database to Appsmith@@ -37,7 +37,7 @@ The database is now set up.-- Fill out the form to connect to your Supabase instance. Click **Test** to test connection and then **Save** to save the datasource+- Fill out the form to connect to your Supabase instance. Click **Test** to test connection and then **Save** to save the datasource@@ -69,7 +69,7 @@ The database is now set up.```jsxINSERT INTO PUBLIC."tickets"("id","createdAt","user","updatedAt","description","status","priority","category","assignedTo")-VALUES('{{appsmith.store.ticket.id}}','{{moment().format('yyyy-mm-ddHH:MM:ss')}}','{{c_user.text}}',+VALUES('{{appsmith.store.ticket.id}}','{{moment().format('yyyy-mm-ddHH:MM:ss')}}','{{c_user.text}}','{{moment().format('yyyy-mm-ddHH:MM:ss')}}','{{c_description.text}}','{{c_status.selectedOptionValue}}','{{c_property.selectedOptionValue}}','{{c_category.selectedOptionValue}}','{{c_assignee.selectedOptionValue}}');@@ -78,7 +78,7 @@ VALUES('{{appsmith.store.ticket.id}}','{{moment().format('yyyy-mm-ddHH:MM:ss')}}- Click the **Confirm** button on the modal and under **Events**, set the **onClick** property to execute the create_new_ticket query.- Create a second query named **get_tickets** that will list all the tickets.- ****+ ***```jsxSELECT * FROM public."tickets";@@ -87,19 +87,33 @@ SELECT * FROM public."tickets";- Drag and drop a table widget under the **Assigned To Me** tab. Open the property pane and add the following snippet under **Table Data** to bind the query results.```jsx-{{get_tickets.data.filter(t => t.assignedTo === '[email protected]' && t.status !== 'closed')}}+{+ {+ get_tickets.data.filter(+ (t) => t.assignedTo === '[email protected]' && t.status !== 'closed'+ )+ }+}```- Drag and drop a table widget under the **Resolved** tab. Open the property pane and add the following snippet under **Table Data** to bind the query results.```jsx-{{get_tickets.data.filter(t => t.status === 'open')}}+{+ {+ get_tickets.data.filter((t) => t.status === 'open')+ }+}```- Drag and drop a table widget under the **Closed** tab. Open the property pane and add the following snippet under **Table Data** to bind the query results.```jsx-{{get_tickets.data.filter(t => t.status === 'closed')}}+{+ {+ get_tickets.data.filter((t) => t.status === 'closed')+ }+}```## Step 5: Creating Charts in Appsmith@@ -146,6 +160,7 @@ SELECT * FROM public."tickets";```## Resources+- [Appsmith](https://www.appsmith.com/) official website.- [Appsmith GitHub](https://github.com/appsmithorg).-- [Appsmith](https://docs.appsmith.com/) documentation.\ No newline at end of file+- [Appsmith](https://docs.appsmith.com/) documentation.diff --git a/apps/reference/docs/guides/integrations/auth0.mdx b/apps/reference/docs/guides/integrations/auth0.mdxindex 03dc5270dff..91e989b40d4 100644--- a/apps/reference/docs/guides/integrations/auth0.mdx+++ b/apps/reference/docs/guides/integrations/auth0.mdx@@ -239,7 +239,10 @@ const afterCallback = async (req, res, session) => {exp: Math.floor(Date.now() / 1000) + 60 * 60,}- session.user.accessToken = jwt.sign(payload, process.env.SUPABASE_SIGNING_SECRET)+ session.user.accessToken = jwt.sign(+ payload,+ process.env.SUPABASE_SIGNING_SECRET+ )return session}diff --git a/apps/reference/docs/guides/integrations/clerk.mdx b/apps/reference/docs/guides/integrations/clerk.mdxindex 8e625843f9f..8e39d8011d5 100644--- a/apps/reference/docs/guides/integrations/clerk.mdx+++ b/apps/reference/docs/guides/integrations/clerk.mdx@@ -79,13 +79,13 @@ Initialize the Supabase client by passing it the environment variables.This can be saved to a common file, for example as `lib/supabaseClient.js````jsx-import { createClient } from '@supabase/supabase-js';+import { createClient } from '@supabase/supabase-js'-const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;-const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_KEY;+const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL+const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_KEY-export const supabase = createClient(supabaseUrl, supabaseKey);-export default supabase;+export const supabase = createClient(supabaseUrl, supabaseKey)+export default supabase```## Step 4: Set up Clerk Provider@@ -103,17 +103,17 @@ After the package is installed, wrap your application with the `<ClerkProvider /In a Next.js application, this is typically done in `pages/_app.js`:```jsx-import { ClerkProvider } from '@clerk/nextjs';+import { ClerkProvider } from '@clerk/nextjs'function MyApp({ Component, pageProps }) {return (<ClerkProvider><Component {...pageProps} /></ClerkProvider>- );+ )}-export default MyApp;+export default MyApp```## Step 5: Set auth token with Supabase@@ -125,29 +125,29 @@ In order to access the custom JWT, you can use the `getToken` function returnedCall `supabase.auth.setAuth(token)` to override the JWT on the current client. The JWT will then be sent to Supabase with all subsequent network requests.```jsx-import { useAuth } from '@clerk/nextjs';-import supabase from '../lib/supabaseClient';+import { useAuth } from '@clerk/nextjs'+import supabase from '../lib/supabaseClient'export default function Home() {- const { getToken } = useAuth();+ const { getToken } = useAuth()const fetchData = async () => {// TODO #1: Replace with your JWT template name- const token = await getToken({ template: 'supabase' });+ const token = await getToken({ template: 'supabase' })- supabase.auth.setAuth(token);+ supabase.auth.setAuth(token)// TODO #2: Replace with your database table name- const { data, error } = await supabase.from('your_table').select();+ const { data, error } = await supabase.from('your_table').select()// TODO #3: Handle the response- };+ }return (<button type="button" onClick={fetchData}>Fetch data</button>- );+ )}```diff --git a/apps/reference/docs/guides/integrations/dashibase.mdx b/apps/reference/docs/guides/integrations/dashibase.mdxindex 6383dc02a7e..e5824f5be30 100644--- a/apps/reference/docs/guides/integrations/dashibase.mdx+++ b/apps/reference/docs/guides/integrations/dashibase.mdx@@ -15,7 +15,7 @@ This guide walks you through how to build a CRM for superheroes using Supabase o## Step 1. Write down your idea-Let’s say we want to build a CRM for Marvel Cinematic Universe. With the multiverse, the superheroes would need a CRM to stay in touch.+Let’s say we want to build a CRM for Marvel Cinematic Universe. With the multiverse, the superheroes would need a CRM to stay in touch.Here is the information we want our users to store in our app:@@ -24,8 +24,8 @@ Here is the information we want our users to store in our app:3. Email4. Last contacted date5. Relationship: Never met, Acquaintance, Close-6. Can he/she fly?-7. History+6. Can he/she fly?+7. History## Step 2. Set up your Supabase project@@ -34,15 +34,19 @@ First, sign up for a Supabase account and create a new project. We are naming ou<ThemedImagealt="Create Supabase project"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/create-supabase-project-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/create-supabase-project-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/create-supabase-project-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/create-supabase-project-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Next, set up the table for our data. Our table is called ‘contacts'.-To store the various information we want, we need to set up the following columns:+To store the various information we want, we need to set up the following columns:1. Name (text)2. Universe (int4)@@ -57,49 +61,65 @@ We also need a `user` column, which is a [foreign key](https://supabase.com/docs<ThemedImagealt="Create user column in Supabase"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/supabase-user-column-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/supabase-user-column-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-user-column-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-user-column-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>-This is what the columns should look like:+This is what the columns should look like:<ThemedImagealt="Columns in our table in Supabase"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/supabase-columns-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/supabase-columns-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-columns-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-columns-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>-Congrats! You have set up the backend of your app.+Congrats! You have set up the backend of your app.## Step 3. Set up your frontend with Dashibase-Let’s hop over to [Dashibase](https://dashibase.com/).+Let’s hop over to [Dashibase](https://dashibase.com/).When you log in to your new account, you will see an empty dashboard.<ThemedImagealt="New Dashibase account"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-empty-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-empty-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-empty-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-empty-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>-The first things to do are to name our app, pick a URL, and connect our Supabase project. You can find your Supabase URL and Anon Key in your Supabase project > Settings > API.+The first things to do are to name our app, pick a URL, and connect our Supabase project. You can find your Supabase URL and Anon Key in your Supabase project > Settings > API.<ThemedImagealt="Set your dashibase settings"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-settings-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-settings-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-settings-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-settings-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Connecting your Supabase project to Dashibase is as simple as that.@@ -119,10 +139,14 @@ Here are the settings we use for our Contacts page:<ThemedImagealt="Set your page settings"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-page-settings-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-page-settings-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-page-settings-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-page-settings-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Then, we will add the attributes for each contact so that our users can view or edit them:@@ -138,22 +162,29 @@ Then, we will add the attributes for each contact so that our users can view or<ThemedImagealt="Add your attributes"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>-When you use the 'Single Select' type, you will get to add the options you want.<ThemedImagealt="Add your Single Select options"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-options-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-options-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-options-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-options-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Let’s customize our contacts a little. We will set Name, Universe, and Email as required fields.@@ -161,10 +192,14 @@ Let’s customize our contacts a little. We will set Name, Universe, and Email a<ThemedImagealt="Set attributes as required"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-required-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-required-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-required-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-required-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Then, we will hide History from the list because it can get too long. Our users will still be able to view a contact’s history by clicking on the contact in the dashboard.@@ -172,10 +207,14 @@ Then, we will hide History from the list because it can get too long. Our users<ThemedImagealt="Hide certain attributes"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-hide-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-attributes-hide-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-hide-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-attributes-hide-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Finally, we will try the card display (under the page settings).@@ -183,51 +222,67 @@ Finally, we will try the card display (under the page settings).<ThemedImagealt="Set display as card"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-display-card-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-display-card-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-display-card-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-display-card-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>The cards look pretty good in the preview. We will use that for now.**Once done, just hit “Save” and “Deploy”. Your app is now live!**-One quick thing: You want to add your app URL to your Supabase project > Settings > Authentication > Additional redirect URLs. This redirects your users to your app when they sign up.+One quick thing: You want to add your app URL to your Supabase project > Settings > Authentication > Additional redirect URLs. This redirects your users to your app when they sign up.<ThemedImagealt="Add app URL to Supabase redirect URLs"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/supabase-redirect-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/supabase-redirect-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-redirect-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/supabase-redirect-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>## Step 4: Share your app-Your app comes with signup and login pages right out of the box. You don’t have to spend time building that at all.+Your app comes with signup and login pages right out of the box. You don’t have to spend time building that at all.<ThemedImagealt="Your dashboard login page"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-login-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-login-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-login-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-login-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>-When you are ready, share your app with your family, friends, and followers!+When you are ready, share your app with your family, friends, and followers!P.S. You can check out our app at [https://multiversecrm.app.dashibase.com](https://multiversecrm.app.dashibase.com/). You can add new contacts and edit or delete existing contacts. You can also filter or sort to look for certain contacts.<ThemedImagealt="Our MultiverseCRM"sources={{- light: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-light.png'),- dark: useBaseUrl('/img/guides/integrations/dashibase/dashibase-dashboard-dark.png'),+ light: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-light.png'+ ),+ dark: useBaseUrl(+ '/img/guides/integrations/dashibase/dashibase-dashboard-dark.png'+ ),}}- style={{marginBottom:20}}+ style={{ marginBottom: 20 }}/>Fun fact: Both Dashibase and apps created with Dashibase have light and dark modes out of the box. Toggle the light/dark mode for this page to see them!@@ -236,4 +291,4 @@ Fun fact: Both Dashibase and apps created with Dashibase have light and dark mod- [Dashibase website](https://dashibase.com/)- [Dashibase open-source repo](https://github.com/dashibase/dashibase)-- [Dashibase Twitter](https://twitter.com/dashibase)\ No newline at end of file+- [Dashibase Twitter](https://twitter.com/dashibase)diff --git a/apps/reference/docs/guides/integrations/directus.mdx b/apps/reference/docs/guides/integrations/directus.mdxindex ef9a8855a5c..6bbedc8501d 100644--- a/apps/reference/docs/guides/integrations/directus.mdx+++ b/apps/reference/docs/guides/integrations/directus.mdx@@ -1,7 +1,7 @@---id: directustitle: 'Directus'-description: "In this guide, we will show you how to create a Supabase project, install the Directus platform locally and configure the two to connect."+description: 'In this guide, we will show you how to create a Supabase project, install the Directus platform locally and configure the two to connect.'---In this guide, we will demonstrate how to create a new Supabase project, install a fresh instance of the Directus platform, then configure the two to work together seamlessly. If you're unfamiliar with either of these systems, don’t worry! We’ll start off with an overview of each platform and explain how they complement each other, noting any overlap in capabilities.@@ -24,13 +24,13 @@ When these two systems are brought together, you get a scalable datastore, limitThe two platforms share an overlap of capabilities that deepens their integration and offers developers the freedom of choice across a broader spectrum of connectivity. Key areas of intersection include:-The ability to generate *powerful* APIs dynamically to connect data+The ability to generate _powerful_ APIs dynamically to connect dataUser management and fine-grained access controlDigital asset storage and management.More importantly, Directus and Supabase share a common vision for your data, making them quite symbiotic. Both solutions are completely open-source, with self-hosted and cloud deployment options available. They are unopinionated in their approach, with vendor-agnostic data storage, and they both focus on providing a polished developer experience along with comprehensive documentation.-By linking the Supabase database with your Directus Project, *you get a superset of data tools.* You'll benefit from Supabase's Postgres database and its *dev-centric* admin app with the raw power to run SQL queries, ***as well as*** the Directus no-code app, which enables intuitive permissions-based data access for the whole team.+By linking the Supabase database with your Directus Project, _you get a superset of data tools._ You'll benefit from Supabase's Postgres database and its _dev-centric_ admin app with the raw power to run SQL queries, **_as well as_** the Directus no-code app, which enables intuitive permissions-based data access for the whole team.Let’s dive into how we actually set up and link these two platforms to create a modern data stack powerhouse.@@ -102,6 +102,7 @@ The configuration can be found in <file-path>/example-project/.envcd example-projectnpx directus start```+**Please note:** To prevent public accessibility when using the supabase-js library,turn on row level security (RLS) on all these tables inside of the Supabase Dashboard. By default when RLS is turned on these tables cannot be read from or written to with the supabase-js library.That’s it! Your project is now up and running locally. You can access the Directus Studio in the browser via the URL displayed, and log in with the Directus admin credentials you entered above:@@ -119,10 +120,12 @@ From here, the sky's the limit on what you can build. You’ll probably want toBelow are some additional resources to dive in and start exploring these two platforms:**Directus**+- See the [Directus guides](https://directus.io/guides/).- Join the Directus community on [Discord](https://directus.chat/).- Check out the source code on the official [Directus GitHub Repo](https://github.com/directus/directus).**Supabase**+- Explore the [Supabase documentation](https://supabase.com/docs)- Join the Supabase community on [Discord](https://discord.supabase.com/)diff --git a/apps/reference/docs/guides/integrations/fezto.mdx b/apps/reference/docs/guides/integrations/fezto.mdxindex 42d79402524..c889acc2dec 100644--- a/apps/reference/docs/guides/integrations/fezto.mdx+++ b/apps/reference/docs/guides/integrations/fezto.mdx@@ -18,10 +18,11 @@ description: 'Create an app automatically from your Supabase Postgres using Open# Setup-In the [Supabase control panel](https://app.supabase.com/), open your project and click the Settings cog icon, and then "API".+In the [Supabase control panel](https://app.supabase.com/), open your project and click the Settings cog icon, and then "API".You will need:-1. From the Project URL copy the project ID from https://your-project-id.supabase.co-2. From the "Project API keys" section copy the "anon" "public" API Key into the++1. From the Project URL copy the project ID from https://your-project-id.supabase.co+2. From the "Project API keys" section copy the "anon" "public" API Key into thePaste both into the [FEZTO Supabase setup page](https://www.fezto.xyz/#/supabase) and click Launch.You can now share and bookmark the browser URL which includes the projectID and anon key with others to launch the same app.diff --git a/apps/reference/docs/guides/integrations/pgmustard.mdx b/apps/reference/docs/guides/integrations/pgmustard.mdxindex 6efbb242ef4..a0470a79293 100644--- a/apps/reference/docs/guides/integrations/pgmustard.mdx+++ b/apps/reference/docs/guides/integrations/pgmustard.mdx@@ -14,13 +14,13 @@ Use `explain analyze` to get a query plan from Postgres. This will run the querypgMustard requires plans to be in json format, and the buffers, verbose, and settings parameters allow it to give better tips.-So a good prefix for your query would be:+So a good prefix for your query would be:```jsxexplain (analyze, format json, buffers, verbose, settings)```-Run the query, and copy the output.+Run the query, and copy the output.@@ -40,11 +40,11 @@ Review the top tips in pgMustard. These are scored on a scale of 0 to 5 stars, b-Click one of the tips, or one of the operations, to see more information.+Click one of the tips, or one of the operations, to see more information.-## Step 4: Consider your options+## Step 4: Consider your optionsIf you get some promising suggestions, you may wish to explore them.@@ -58,8 +58,9 @@ Going through Steps 1-3 again, we now get an efficient index scan, that will sca-We could look into why Postgres isn’t choosing to do an index-only scan here, but pgMustard is letting us know that it doesn’t think we’ll gain much by doing so, by scoring the tip 0.3 out of 5.+We could look into why Postgres isn’t choosing to do an index-only scan here, but pgMustard is letting us know that it doesn’t think we’ll gain much by doing so, by scoring the tip 0.3 out of 5.## Resources+- [pgMustard](https://www.pgmustard.com) official website.- [pgMustard explain glossary](https://www.pgmustard.com/docs/explain).diff --git a/apps/reference/docs/guides/integrations/plasmic.mdx b/apps/reference/docs/guides/integrations/plasmic.mdxindex ac2e6f20b05..3af93d722ef 100644--- a/apps/reference/docs/guides/integrations/plasmic.mdx+++ b/apps/reference/docs/guides/integrations/plasmic.mdx@@ -25,18 +25,17 @@ At a high level,## Step 1: Set up your Backend on Supabase- On the [Supabase dashboard](https://app.supabase.com/), click `New project` and set the name of the project.-By default, Supabase will already be set up for user signups with email, with users being stored in a `users` table.+ By default, Supabase will already be set up for user signups with email, with users being stored in a `users` table.- Navigate to the `Table Editor` on the left side navigation bar. Here we can create a `New table` to store our Pokemon entries. Make sure you are in the `schema public` view. Create a new table called `entries`, with 6 columns:- - `id`: is a unique ID for the entry. This column should be generated automatically as the primary column.- - `user_id`: Create a relation to the `user` table by clicking on the link icon next to the column name. Here, you can select the `id` column of the `user` table.- - `name`, `description`, `imageUrl`: This will store the name, description, and imageUrl for each Pokemon.- - `inserted_at` : This will be an automatically populated column, set to when the row was first inserted.+ - `id`: is a unique ID for the entry. This column should be generated automatically as the primary column.+ - `user_id`: Create a relation to the `user` table by clicking on the link icon next to the column name. Here, you can select the `id` column of the `user` table.+ - `name`, `description`, `imageUrl`: This will store the name, description, and imageUrl for each Pokemon.+ - `inserted_at` : This will be an automatically populated column, set to when the row was first inserted.> Note: In this tutorial we’ve turned off “[Row Level Security (RLS)](https://supabase.com/docs/guides/auth/row-level-security)”. In practice, you will want to create policies that restrict who gets to create, edit, and delete posts. By turning this off, any user can modify the database without restrictions.->@@ -46,10 +45,9 @@ For your convenience, feel free to import the following CSV into Supabase to pre## Step 2: Set up your codebase-We have a working code example for you [here](https://github.com/plasmicapp/plasmic/tree/master/examples/supabase-demo). This starter comes with all of the code components you need to get started querying Supabase through Plasmic Studio.+We have a working code example for you [here](https://github.com/plasmicapp/plasmic/tree/master/examples/supabase-demo). This starter comes with all of the code components you need to get started querying Supabase through Plasmic Studio.> Code components are React components defined in your code base that we import into Plasmic Studio for use. Your project will be configured to look for these at `http://localhost:3000/plasmic-host` You can use these components in your design, as well as style them. Check out `supabase-demo/plasmic-init.ts` to see how they are registered with Plasmic.->First, clone the repo to your development machine and install the dependencies.@@ -79,7 +77,7 @@ If you pre-populated the database in Step 1. you should see the following homepaNow let’s try to make some additions! The code base is currently configured to a read-only copy of the Plasmic project. Let’s make an editable copy first.-Open the default starter Plasmic project here:+Open the default starter Plasmic project here:[https://studio.plasmic.app/projects/66RKaSPCwKxYjCfXWHCxn6](https://studio.plasmic.app/projects/66RKaSPCwKxYjCfXWHCxn6)@@ -95,7 +93,7 @@ The API token can be found by clicking the `Code` button in the top bar.-Now go back to `.env.local` and update the corresponding project ID and token fields.+Now go back to `.env.local` and update the corresponding project ID and token fields.### Step 4b: Configure your Plasmic project app host@@ -104,25 +102,34 @@ To tell Plasmic to look for your code components on your dev server, you’ll ne> Note: At this point, you’ll need to keep your dev server running at `http://localhost:3000`for the project to load.<video width="99%" autoPlay="autoplay" muted playsInline controls={true}>- <source src="/docs/videos/guides/integrations/plasmic/configure-app-host-plasmic-05.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/guides/integrations/plasmic/configure-app-host-plasmic-05.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>After restarting the dev server and Plasmic Studio, you should now be able to make edits across Plasmic Studio and your codebase.## Step 5: Create a new page for our Pokedex gallery-Let’s make a visual gallery for our Pokemon by using the code components from the code base.+Let’s make a visual gallery for our Pokemon by using the code components from the code base.Create a new page called `Gallery`, and set a path for this page (`/gallery`).<video width="99%" autoPlay="autoplay" muted playsInline controls={true}>- <source src="/docs/videos/guides/integrations/plasmic/create-gallery-page-plasmic-06.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/guides/integrations/plasmic/create-gallery-page-plasmic-06.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>Insert a `SupabaseGrid` by searching the AddDrawer (by clicking the blue + button)> For source see `components/CodeComponents/DatabaseComponents.tsx`->@@ -145,7 +152,12 @@ Now customize the repeated content by inserting instances of `SupabaseField`. SeFor your convenience, the following video shows you how to create the page end-to-end.<video width="99%" autoPlay="autoplay" muted playsInline controls={true}>- <source src="/docs/videos/guides/integrations/plasmic/end-to-end-plasmic-10.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/guides/integrations/plasmic/end-to-end-plasmic-10.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Step 6: Check your dev server@@ -253,28 +265,38 @@ Note that this code component is defined in your codebase. Feel free to augment// supabase-demo/components/CodeComponents/DisplayCollections.tsxexport function SupabaseGridCollection(props: SupabaseGridCollectionProps) {- const supabaseQuery = React.useContext(SupabaseQueryContext);- const { children, columns, columnGap, rowGap, count, className, loading, testLoading } = props;-- const result = supabaseQuery;+ const supabaseQuery = React.useContext(SupabaseQueryContext)+ const {+ children,+ columns,+ columnGap,+ rowGap,+ count,+ className,+ loading,+ testLoading,+ } = props++ const result = supabaseQueryif (!result || testLoading) {- return loading;+ return loading}return (- <div style={{- display: "grid",- gridTemplateColumns: `repeat(${columns}, 1fr)`,- columnGap: `${columnGap}px`,- rowGap: `${rowGap}px`,- }}+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: `repeat(${columns}, 1fr)`,+ columnGap: `${columnGap}px`,+ rowGap: `${rowGap}px`,+ }}className={className}>- {result.slice(0, count).map((row: any, i: any) =>+ {result.slice(0, count).map((row: any, i: any) => (<RowContext.Provider value={row} key={row.id}><div key={row.id}>{repeatedElement(i === 0, children)}</div></RowContext.Provider>- )}+ ))}</div>)}@@ -287,12 +309,18 @@ export function SupabaseGridCollection(props: SupabaseGridCollectionProps) {```tsx// supabase-demo/components/CodeComponents/DisplayCollections.tsx-export function SupabaseTextField({ name, className }: { name?: string; className?: string }) {- const contexts = useAllContexts();+export function SupabaseTextField({+ name,+ className,+}: {+ name?: string+ className?: string+}) {+ const contexts = useAllContexts()if (!name) {return <p>You need to set the name prop</p>}- return <div className={className}>{getPropValue(name, contexts)}</div>;+ return <div className={className}>{getPropValue(name, contexts)}</div>}```diff --git a/apps/reference/docs/guides/integrations/stytch.mdx b/apps/reference/docs/guides/integrations/stytch.mdxindex 20a68ddb093..b804c594682 100644--- a/apps/reference/docs/guides/integrations/stytch.mdx+++ b/apps/reference/docs/guides/integrations/stytch.mdx@@ -266,7 +266,10 @@ const loadStytch = () => {client = new stytch.Client({project_id: process.env.STYTCH_PROJECT_ID,secret: process.env.STYTCH_SECRET,- env: process.env.STYTCH_PROJECT_ENV === 'live' ? stytch.envs.live : stytch.envs.test,+ env:+ process.env.STYTCH_PROJECT_ENV === 'live'+ ? stytch.envs.live+ : stytch.envs.test,})}diff --git a/apps/reference/docs/guides/integrations/supertokens.mdx b/apps/reference/docs/guides/integrations/supertokens.mdxindex 61e34821798..c532f3b0d14 100644--- a/apps/reference/docs/guides/integrations/supertokens.mdx+++ b/apps/reference/docs/guides/integrations/supertokens.mdx@@ -261,8 +261,8 @@ import React, { useState, useEffect } from 'react'import Head from 'next/head'import styles from '../styles/Home.module.css'import ThirdPartyEmailPassword, {- ThirdPartyEmailPasswordAuth,-} from "supertokens-auth-react/recipe/thirdpartyemailpassword";+ ThirdPartyEmailPasswordAuth,+} from 'supertokens-auth-react/recipe/thirdpartyemailpassword'import dynamic from 'next/dynamic'import { useSessionContext } from 'supertokens-auth-react/recipe/session'import { getSupabase } from '../utils/supabase'@@ -283,7 +283,7 @@ function ProtectedPage() {const { accessTokenPayload, userId } = useSessionContext()if (sessionContext.loading === true) {- return null;+ return null}const [userEmail, setEmail] = useState('')@@ -294,7 +294,10 @@ function ProtectedPage() {const supabase = getSupabase(accessTokenPayload.supabase_token)// retrieve the user's name from the users table whose email matches the email in the JWT- const { data } = await supabase.from('users').select('email').eq('user_id', userId)+ const { data } = await supabase+ .from('users')+ .select('email')+ .eq('user_id', userId)if (data.length > 0) {setEmail(data[0].email)diff --git a/apps/reference/docs/guides/local-development.mdx b/apps/reference/docs/guides/local-development.mdxindex 114c5f8cfcf..2ae23f927d7 100644--- a/apps/reference/docs/guides/local-development.mdx+++ b/apps/reference/docs/guides/local-development.mdx@@ -4,8 +4,8 @@ title: Local Developmentdescription: How to use Supabase on your local development machine.----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'Supabase provides a CLI so that you can develop your application locally, with the ability to deploy your application to the Supabase platform.@@ -31,7 +31,7 @@ This is a one-time operation. After you have logged in the CLI will have permiss## Getting started-### Initialize your project+### Initialize your projectLet's create a new folder on your local machine:@@ -66,7 +66,7 @@ This command will create a `supabase` folder which holds all the configuration fsupabase start```-The [start](/docs/reference/cli/supabase-start) command uses Docker to start the open source [services](/docs/#how-it-works) of Supabase.+The [start](/docs/reference/cli/supabase-start) command uses Docker to start the open source [services](/docs/#how-it-works) of Supabase.This command may take a while to run if this is the first time using the CLI.Once all of the Supabase services are running, you'll see an output that contains your local Supabase credentials.@@ -123,21 +123,19 @@ http://localhost:54321/auth/v1/ # Auth (GoTrue)</TabItem></Tabs>-### Database Migrations-Database changes are managed through "migrations". Database migrations are a common way of tracking changes to your database over time.-+Database changes are managed through "migrations". Database migrations are a common way of tracking changes to your database over time.#### Making database changes-For this guide, let's create a table called `employees`, using the "Supabase Studio" link provided.+For this guide, let's create a table called `employees`, using the "Supabase Studio" link provided.-:::note+:::note-If you're familiar with databases, you can also execute any SQL using the `DB URL` shown by `supabase start`.+If you're familiar with databases, you can also execute any SQL using the `DB URL` shown by `supabase start`.-:::+:::Open the Studio, navigate to the "SQL Editor" section, and run the following SQL command:@@ -155,15 +153,15 @@ supabase db commit create_employees```This creates a new migration named `supabase/migrations/<timestamp>_create_employees.sql`, representing any changes we've made to the local database since `supabase start`.-+#### Adding sample data-Let's add some sample data into the table. We can use the seed script in `supabase/seed.sql` (which gets created when you run `supabase init`).+Let's add some sample data into the table. We can use the seed script in `supabase/seed.sql` (which gets created when you run `supabase init`).```sql-- in supabase/seed.sqlinsert into public.employees (name)-values+values('Erlich Backman'),('Richard Hendricks'),('Monica Hall');@@ -175,7 +173,7 @@ Now run the following to rerun the migration scripts and the seed script:supabase db reset```-If you look again within Studio, you should now see the contents of `employees`.+If you look again within Studio, you should now see the contents of `employees`.#### Resetting database changes@@ -183,7 +181,7 @@ If you run any SQL on the local database that you want to revert, you can use th```sql-- run on local database to make a change-alter table employees+alter table employeesadd department text default 'Hooli';```@@ -195,24 +193,23 @@ supabase db resetAnd the local database will be reset.-## Deploying+## DeployingNow that you've developed an application locally, head over to [app.supabase.com](https://app.supabase.com) and create a project where we can deploy the changes.-### Linking your project+### Linking your project-:::note+:::noteThere are a few commands required to link your project. We are in the process of consolidating these commands into a single command. Bear with us!-:::+:::Let's associate your project with your remote project using [supabase link](/docs/guides/local-development) and [db remote set](/docs/reference/cli/supabase-db-remote-set)-```bash-supabase link+supabase link# Use "supabase link --project-ref your-project-ref" to link your project in one step.supabase db remote set 'postgresql://postgres:<your_password>@db.<your_project_ref>.supabase.co:5432/postgres'@@ -222,10 +219,9 @@ supabase db remote commit# capture any changes that you have made to your database before setting up the CLI```-You'll notice that `supabase/migrations` is now populated with a migration in `..._remote_commit.sql`.+You'll notice that `supabase/migrations` is now populated with a migration in `..._remote_commit.sql`.This migration captures any changes required for your local database to match the schema of your remote Supabase project.-### Deploying Database changesYou can deploy any local database migrations using [`db push`](/docs/reference/cli/supabase-db-push):@@ -243,14 +239,14 @@ supabase functions deploy <function_name>```## Limitations-+The local development environment is not as feature-complete as the Platform. Here are some of the differences:-+- The Storage interface is coming soon.- The Functions interface is coming soon.- Logs are not supported through the interface (however you can accesss them via the docker containers).- You cannot update your project settings via the Dashboard - this can be done using the CLI instead.-+## Next steps- Got a question? [Ask in our Discussions](https://github.com/supabase/supabase/discussions).diff --git a/apps/reference/docs/guides/platform/logs.mdx b/apps/reference/docs/guides/platform/logs.mdxindex 5fcf33ff1b1..250bae3507f 100644--- a/apps/reference/docs/guides/platform/logs.mdx+++ b/apps/reference/docs/guides/platform/logs.mdx@@ -8,7 +8,7 @@ The Supabase Platform provides a log explorer that allows log tracing and debugg:::note-The features discussed in this article are only available through the Supabase Platform and are not available on self-hosted.+The features discussed in this article are only available through the Supabase Platform and are not available on self-hosted.:::@@ -16,7 +16,7 @@ The features discussed in this article are only available through the Supabase PAs well as a Log Explorer, Supabase provides a logging interface specific to each product.-### API Logs+### API Logs@@ -28,15 +28,14 @@ The API Logs can be found under `Database > API Logs`. These show all network reThe Postgres Logs can be found under `Database > Postgres Logs`. These show all queries and activity for your [Database](/docs/guides/database).-## Log ExplorerThe log browser can be accessed in the sidebar under **Logs Explorer**. The **Logs Explorer** is for querying and aggregating project logs across products using SQL `SELECT` queries.-### Example+For example, you may enter the following into the SQL editor to query for each user's IP address:```sql@@ -50,12 +49,11 @@ WHERE h.x_real_ip IS NOT NULL-The list of supported product sources can be found under the **Sources** dropdown.### Unnesting Arrays-To query the metadata in the above example, you can unnest the field and "join" the unnested data. Clicking on the log row shows that log metadata is stored as an array of objects.+To query the metadata in the above example, you can unnest the field and "join" the unnested data. Clicking on the log row shows that log metadata is stored as an array of objects.In order to query any value that is an array, we would need to `UNNEST()` that field and add it to the query as a join, thereby allowing us to reference the nested fields within the array.@@ -66,8 +64,7 @@ Large projects may run into a `Resources Exceeded` memory limit error when selec### Functions-You may have also noticed from the above examples that we are able to use certain SQL functions within our queries. The querying engine currently supported is BigQuery, hence you may use [any valid BigQuery function](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators) within your query.-+You may have also noticed from the above examples that we are able to use certain SQL functions within our queries. The querying engine currently supported is BigQuery, hence you may use [any valid BigQuery function](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators) within your query.#### Timestamp Behavior@@ -81,4 +78,4 @@ In the Log Explorer, timestamps are rendered as unix microsecond timestamps. SQL## Templates-Templates are available to help craft you log queries. Templates are available under the **Templates** tab, or under the **Templates** Dropdown in the **Query** tab.\ No newline at end of file+Templates are available to help craft you log queries. Templates are available under the **Templates** tab, or under the **Templates** Dropdown in the **Query** tab.diff --git a/apps/reference/docs/guides/platform/performance.mdx b/apps/reference/docs/guides/platform/performance.mdxindex 3194054dff8..f5eb883eb81 100644--- a/apps/reference/docs/guides/platform/performance.mdx+++ b/apps/reference/docs/guides/platform/performance.mdx@@ -6,12 +6,12 @@ description: Getting the best results out of your Supabase projectThe Supabase platform automatically optimizes your Postgres database to take advantage of the compute resources of the tier your project is on. However, these optimizations are based on assumptions about the type of workflow the project is being utilized for, and it is likely that better results can be obtained by tuning the database for your particular workflow.-## Optimizing the number of connections+## Optimizing the number of connectionsBy default, the number of connections allowed to Postgres and PgBouncer is configured based on the resources available to the database.| Compute Add-on | Postgresql connections | PGBouncer connections |-|----------------|------------------------|-----------------------|+| -------------- | ---------------------- | --------------------- || None | 60 | 200 || Small | 90 | 200 || Medium | 120 | 200 |@@ -55,6 +55,7 @@ Configuring the number of PgBouncer connections is not supported at this time.Every Supabase project has [the pg_stat_statements extension](https://www.postgresql.org/docs/14/pgstatstatements.html) enabled by default. This extension records query execution performance details and is the best way to find queries that take the most time to execute. This information can be combined with the Postgres query plan analyzer to develop more efficient queries.Obtaining information from pg_stat_statements:+```sqlselect mean_exec_time + stddev_exec_time, * from pg_stat_statements order by 1 desc;```@@ -74,5 +75,4 @@ Using the query plan analyzer to optimize your queries is a large topic, with a- [Postgres Wiki.](https://wiki.postgresql.org/wiki/Using_EXPLAIN)- [Enterprise DB.](https://www.enterprisedb.com/blog/postgresql-query-optimization-performance-tuning-with-explain-analyze)-You can pair the information available from `pg_stat_statements` with the detailed system metrics available [via your metrics endpoint](/docs/guides/platform/metrics) to better understand the behavior of your DB and the queries you're executing against it.diff --git a/apps/reference/docs/guides/storage.mdx b/apps/reference/docs/guides/storage.mdxindex 8caca04659a..70a735d13f2 100644--- a/apps/reference/docs/guides/storage.mdx+++ b/apps/reference/docs/guides/storage.mdx@@ -34,7 +34,7 @@ This is a quick guide that shows the basic functionality of Supabase Storage. Fi[example application in GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-ts-user-management),which you can deploy yourself.-**Note before begin** : File, Folder, and Bucket names **must follow** [AWS Safe Characters naming guideline](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html) and avoid use of any other characters+**Note before begin** : File, Folder, and Bucket names **must follow** [AWS Safe Characters naming guideline](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html) and avoid use of any other characters[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Fnextjs-ts-user-management&project-name=supabase-user-management&repository-name=supabase-user-management&demo-title=Supabase%20User%20Management&demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js&demo-url=https%3A%2F%2Fsupabase-nextjs-ts-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management)@@ -60,7 +60,12 @@ client libraries. Here we create a bucket called "avatars":3. Click **Create Bucket**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/storage/create.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/storage/create.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -122,7 +127,12 @@ You can upload a file from the Dashboard, or within a browser using our JS libra4. Select the file you want to upload.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/storage/upload.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/storage/upload.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -177,7 +187,12 @@ You can download a file from the Dashboard, or within a browser using our JS lib4. Click **Download**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/storage/download.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/storage/download.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -186,7 +201,9 @@ You can download a file from the Dashboard, or within a browser using our JS lib```js// Use the JS library to create a bucket.-const { data, error } = await supabase.storage.from('avatars').download('public/avatar1.png')+const { data, error } = await supabase.storage+ .from('avatars')+ .download('public/avatar1.png')```[Reference.](/docs/reference/javascript/storage-from-download)@@ -229,7 +246,12 @@ To restrict access to your files you can use either the Dashboard or SQL.6. Write the policy using SQL.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/storage/policies.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/storage/policies.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -300,20 +322,18 @@ For example, if your file is stored in `public/subfolder/avatar.png` it would re## Accessing objects--For private buckets, you can access objects via the [download](/docs/reference/javascript/storage-from-download) method. This corresponds to `/object/auth/` API endpoint.-Alternatively, you can create a publicly shareable URL with an expiry date using the [createSignedUrl](/docs/reference/javascript/storage-from-createsignedurl) method+For private buckets, you can access objects via the [download](/docs/reference/javascript/storage-from-download) method. This corresponds to `/object/auth/` API endpoint.+Alternatively, you can create a publicly shareable URL with an expiry date using the [createSignedUrl](/docs/reference/javascript/storage-from-createsignedurl) methodwhich calls the `/object/sign/` API.-For public buckets, you can access the assets directly without a token or an Authorisation header. The [getPublicUrl](/docs/reference/javascript/storage-from-getpublicurl)+For public buckets, you can access the assets directly without a token or an Authorisation header. The [getPublicUrl](/docs/reference/javascript/storage-from-getpublicurl)helper method returns the full public URL for an asset. This calls the `/object/public/` API endpoint internally.-<details><summary>Advanced: reverse proxy</summary>-The URLs returned are proxied through the API Proxy. They are prefixed by <code>/storage/v1</code>.+The URLs returned are proxied through the API Proxy. They are prefixed by <code>/storage/v1</code>.-For example, on the hosted Platform they will be+For example, on the hosted Platform they will be<code>https://[project_ref].supabase.co/storage/v1/object/public/[id]</code>@@ -321,7 +341,6 @@ You can access the storage API directly with the same endpoint. See the <a href=</details>----## Securitydiff --git a/apps/reference/docs/guides/storage/storage-sample.mdx b/apps/reference/docs/guides/storage/storage-sample.mdxindex cd9ec88a3b4..2e7cc678245 100644--- a/apps/reference/docs/guides/storage/storage-sample.mdx+++ b/apps/reference/docs/guides/storage/storage-sample.mdx@@ -1,12 +1,12 @@---id: storage-sample-title: "Storage Sample Doc"+title: 'Storage Sample Doc'description: Storage Sample Doc----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Description-Sample...\ No newline at end of file+Sample...diff --git a/apps/reference/docs/guides/with-angular.mdx b/apps/reference/docs/guides/with-angular.mdxindex 58b7444c70c..93389bfc2df 100644--- a/apps/reference/docs/guides/with-angular.mdx+++ b/apps/reference/docs/guides/with-angular.mdx@@ -1,12 +1,12 @@---id: with-angular-title: "Quickstart: Angular"+title: 'Quickstart: Angular'description: Learn how to use Supabase in your Angular App.sidebar_label: Angular----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Intro@@ -47,7 +47,6 @@ and then creating a "schema" inside the database.1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schemaNow we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,@@ -66,7 +65,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -123,7 +127,6 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>-### Get the API KeysNow that you've created some database tables, you are ready to insert data using the auto-generated API.@@ -134,7 +137,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -161,44 +169,51 @@ And finally we want to save the environment variables in the `environment.ts` fiAll we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).These variables will be exposed on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.-```ts title="environment.ts"export const environment = {production: false,- supabaseUrl: "YOUR_SUPABASE_URL",- supabaseKey: "YOUR_SUPABASE_KEY"-};+ supabaseUrl: 'YOUR_SUPABASE_URL',+ supabaseKey: 'YOUR_SUPABASE_KEY',+}```Now that we have the API credentials in place, let's create a **SupabaseService** with `ng g s supabase` to initialize the Supabase client and implement functions to communicate with the Supabase API.```ts title="src/app/supabase.service.ts"-import { Injectable } from '@angular/core';-import {AuthChangeEvent, createClient, Session, SupabaseClient} from '@supabase/supabase-js';-import {environment} from "../environments/environment";+import { Injectable } from '@angular/core'+import {+ AuthChangeEvent,+ createClient,+ Session,+ SupabaseClient,+} from '@supabase/supabase-js'+import { environment } from '../environments/environment'export interface Profile {- username: string;- website: string;- avatar_url: string;+ username: string+ website: string+ avatar_url: string}@Injectable({- providedIn: 'root'+ providedIn: 'root',})export class SupabaseService {- private supabase: SupabaseClient;+ private supabase: SupabaseClientconstructor() {- this.supabase = createClient(environment.supabaseUrl, environment.supabaseKey);+ this.supabase = createClient(+ environment.supabaseUrl,+ environment.supabaseKey+ )}get user() {- return this.supabase.auth.user();+ return this.supabase.auth.user()}get session() {- return this.supabase.auth.session();+ return this.supabase.auth.session()}get profile() {@@ -206,44 +221,43 @@ export class SupabaseService {.from('profiles').select(`username, website, avatar_url`).eq('id', this.user?.id)- .single();+ .single()}- authChanges(callback: (event: AuthChangeEvent, session: Session | null) => void) {- return this.supabase.auth.onAuthStateChange(callback);+ authChanges(+ callback: (event: AuthChangeEvent, session: Session | null) => void+ ) {+ return this.supabase.auth.onAuthStateChange(callback)}signIn(email: string) {- return this.supabase.auth.signIn({email});+ return this.supabase.auth.signIn({ email })}signOut() {- return this.supabase.auth.signOut();+ return this.supabase.auth.signOut()}updateProfile(profile: Profile) {const update = {...profile,id: this.user?.id,- updated_at: new Date()+ updated_at: new Date(),}return this.supabase.from('profiles').upsert(update, {returning: 'minimal', // Don't return the value after inserting- });+ })}downLoadImage(path: string) {- return this.supabase.storage.from('avatars').download(path);+ return this.supabase.storage.from('avatars').download(path)}uploadAvatar(filePath: string, file: File) {- return this.supabase.storage- .from('avatars')- .upload(filePath, file);+ return this.supabase.storage.from('avatars').upload(filePath, file)}}-```And one optional step is to update the CSS file `src/index.css` to make the app look nice.@@ -255,13 +269,13 @@ Let's set up an Angular component to manage logins and sign ups. We'll use MagicCreate an **AuthComponent** with `ng g c auth` Angular CLI command.```ts title="src/app/auth.component.ts"-import { Component } from '@angular/core';-import {SupabaseService} from "./supabase.service";+import { Component } from '@angular/core'+import { SupabaseService } from './supabase.service'@Component({selector: 'app-auth',template: `- <div class="row flex flex-center">+ <div class="row flex-center flex"><form class="col-6 form-widget"><h1 class="header">Supabase + Angular</h1><p class="description">Sign in via magic link with your email below</p>@@ -277,10 +291,10 @@ import {SupabaseService} from "./supabase.service";<buttontype="submit"(click)="handleLogin(input.value)"- class="button block"- [disabled]="loading"+ class="button block"+ [disabled]="loading">- {{loading ? 'Loading' : 'Send magic link'}}+ {{ loading ? 'Loading' : 'Send magic link' }}</button></div></form>@@ -288,19 +302,19 @@ import {SupabaseService} from "./supabase.service";`,})export class AuthComponent {- loading = false;+ loading = false- constructor(private readonly supabase: SupabaseService) { }+ constructor(private readonly supabase: SupabaseService) {}async handleLogin(input: string) {try {- this.loading = true;- await this.supabase.signIn(input);- alert('Check your email for the login link!');+ this.loading = true+ await this.supabase.signIn(input)+ alert('Check your email for the login link!')} catch (error) {alert(error.error_description || error.message)} finally {- this.loading = false;+ this.loading = false}}}@@ -312,9 +326,9 @@ After a user is signed in we can allow them to edit their profile details and maCreate an **AccountComponent** with `ng g c account` Angular CLI command.```ts title="src/app/account.component.ts"-import {Component, Input, OnInit} from '@angular/core';-import {Profile, SupabaseService} from "./supabase.service";-import {Session} from "@supabase/supabase-js";+import { Component, Input, OnInit } from '@angular/core'+import { Profile, SupabaseService } from './supabase.service'+import { Session } from '@supabase/supabase-js'@Component({selector: 'app-account',@@ -322,7 +336,7 @@ import {Session} from "@supabase/supabase-js";<div class="form-widget"><div><label for="email">Email</label>- <input id="email" type="text" [value]="session?.user?.email" disabled/>+ <input id="email" type="text" [value]="session?.user?.email" disabled /></div><div><label for="username">Name</label>@@ -345,98 +359,98 @@ import {Session} from "@supabase/supabase-js";<div><button- class="button block primary"+ class="button primary block"(click)="updateProfile(username.value, website.value)"[disabled]="loading">- {{loading ? 'Loading ...' : 'Update'}}+ {{ loading ? 'Loading ...' : 'Update' }}</button></div><div>- <button class="button block" (click)="signOut()">- Sign Out- </button>+ <button class="button block" (click)="signOut()">Sign Out</button></div></div>- `+ `,})export class AccountComponent implements OnInit {- loading = false;- profile: Profile | undefined;+ loading = false+ profile: Profile | undefined- @Input() session: Session | undefined;+ @Input() session: Session | undefined- constructor(private readonly supabase: SupabaseService) { }+ constructor(private readonly supabase: SupabaseService) {}ngOnInit() {- this.getProfile();+ this.getProfile()}async getProfile() {try {- this.loading = true;- let {data: profile, error, status} = await this.supabase.profile;+ this.loading = true+ let { data: profile, error, status } = await this.supabase.profileif (error && status !== 406) {- throw error;+ throw error}if (profile) {- this.profile = profile;+ this.profile = profile}} catch (error) {alert(error.message)} finally {- this.loading = false;+ this.loading = false}}- async updateProfile(username: string, website: string, avatar_url: string = '') {+ async updateProfile(+ username: string,+ website: string,+ avatar_url: string = ''+ ) {try {- this.loading = true;- await this.supabase.updateProfile({username, website, avatar_url});+ this.loading = true+ await this.supabase.updateProfile({ username, website, avatar_url })} catch (error) {- alert(error.message);+ alert(error.message)} finally {- this.loading = false;+ this.loading = false}}async signOut() {- await this.supabase.signOut();+ await this.supabase.signOut()}}```--### Launch!Now that we have all the components in place, let's update **AppComponent**:```ts title="src/app/app.component.ts"-import {Component, OnInit} from '@angular/core';-import {SupabaseService} from "./supabase.service";+import { Component, OnInit } from '@angular/core'+import { SupabaseService } from './supabase.service'@Component({selector: 'app-root',template: `- <div class="container" style="padding: 50px 0 100px 0">- <app-account *ngIf="session; else auth" [session]="session"></app-account>- <ng-template #auth>- <app-auth></app-auth>- </ng-template>- </div>- `+ <div class="container" style="padding: 50px 0 100px 0">+ <app-account *ngIf="session; else auth" [session]="session"></app-account>+ <ng-template #auth>+ <app-auth></app-auth>+ </ng-template>+ </div>+ `,})export class AppComponent implements OnInit {- session = this.supabase.session;+ session = this.supabase.session- constructor(private readonly supabase: SupabaseService) { }+ constructor(private readonly supabase: SupabaseService) {}ngOnInit() {- this.supabase.authChanges((_, session) => this.session = session);+ this.supabase.authChanges((_, session) => (this.session = session))}}```@@ -449,7 +463,6 @@ npm run startAnd then open the browser to [localhost:4200](http://localhost:4200) and you should see the completed app.-## Bonus: Profile photos@@ -462,9 +475,9 @@ Let's create an avatar for the user so that they can upload a profile photo.Create an **AvatarComponent** with `ng g c avatar` Angular CLI command.```ts title="src/app/avatar.component.ts"-import {Component, EventEmitter, Input, Output} from '@angular/core';-import {SupabaseService} from "./supabase.service";-import {DomSanitizer, SafeResourceUrl} from "@angular/platform-browser";+import { Component, EventEmitter, Input, Output } from '@angular/core'+import { SupabaseService } from './supabase.service'+import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'@Component({selector: 'app-avatar',@@ -476,11 +489,16 @@ import {DomSanitizer, SafeResourceUrl} from "@angular/platform-browser";alt="Avatar"class="avatar image"style="height: 150px; width: 150px"- ></div>- <div *ngIf="!_avatarUrl" class="avatar no-image" style="height: 150px; width: 150px"></div>+ />+ </div>+ <div+ *ngIf="!_avatarUrl"+ class="avatar no-image"+ style="height: 150px; width: 150px"+ ></div><div style="width: 150px"><label class="button primary block" for="single">- {{uploading ? 'Uploading ...' : 'Upload'}}+ {{ uploading ? 'Uploading ...' : 'Upload' }}</label><inputstyle="visibility: hidden;position: absolute"@@ -494,60 +512,59 @@ import {DomSanitizer, SafeResourceUrl} from "@angular/platform-browser";`,})export class AvatarComponent {- _avatarUrl: SafeResourceUrl | undefined;- uploading = false;+ _avatarUrl: SafeResourceUrl | undefined+ uploading = false@Input()set avatarUrl(url: string | undefined) {if (url) {- this.downloadImage(url);+ this.downloadImage(url)}- };+ }- @Output() upload = new EventEmitter<string>();+ @Output() upload = new EventEmitter<string>()constructor(private readonly supabase: SupabaseService,private readonly dom: DomSanitizer- ) { }+ ) {}async downloadImage(path: string) {try {- const {data} = await this.supabase.downLoadImage(path);- if (data instanceof Blob) {+ const { data } = await this.supabase.downLoadImage(path)+ if (data instanceof Blob) {this._avatarUrl = this.dom.bypassSecurityTrustResourceUrl(URL.createObjectURL(data)- );+ )}} catch (error) {- console.error('Error downloading image: ', error.message);+ console.error('Error downloading image: ', error.message)}}async uploadAvatar(event: any) {try {- this.uploading = true;+ this.uploading = trueif (!event.target.files || event.target.files.length === 0) {- throw new Error('You must select an image to upload.');+ throw new Error('You must select an image to upload.')}- const file = event.target.files[0];- const fileExt = file.name.split('.').pop();- const fileName = `${Math.random()}.${fileExt}`;- const filePath = `${fileName}`;+ const file = event.target.files[0]+ const fileExt = file.name.split('.').pop()+ const fileName = `${Math.random()}.${fileExt}`+ const filePath = `${fileName}`- await this.supabase.uploadAvatar(filePath, file);- this.upload.emit(filePath);+ await this.supabase.uploadAvatar(filePath, file)+ this.upload.emit(filePath)} catch (error) {- alert(error.message);+ alert(error.message)} finally {- this.uploading = false;+ this.uploading = false}}}```-### Add the new widgetAnd then we can add the widget on top of the **AccountComponent** html template:diff --git a/apps/reference/docs/guides/with-expo.mdx b/apps/reference/docs/guides/with-expo.mdxindex 2406ed70c74..830963dd484 100644--- a/apps/reference/docs/guides/with-expo.mdx+++ b/apps/reference/docs/guides/with-expo.mdx@@ -50,7 +50,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -118,7 +123,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -229,10 +239,18 @@ export default function Auth() {/></View><View style={[styles.verticallySpaced, styles.mt20]}>- <Button title="Sign in" disabled={loading} onPress={() => signInWithEmail()} />+ <Button+ title="Sign in"+ disabled={loading}+ onPress={() => signInWithEmail()}+ /></View><View style={styles.verticallySpaced}>- <Button title="Sign up" disabled={loading} onPress={() => signUpWithEmail()} />+ <Button+ title="Sign up"+ disabled={loading}+ onPress={() => signUpWithEmail()}+ /></View></View>)@@ -405,7 +423,7 @@ import { View } from 'react-native'import { Session } from '@supabase/supabase-js'export default function App() {- const [session, setSession] = useState<Session | null>(null)+ const [session, setSession] = (useState < Session) | (null > null)useEffect(() => {setSession(supabase.auth.session())@@ -417,7 +435,11 @@ export default function App() {return (<View>- {session && session.user ? <Account key={session.user.id} session={session} /> : <Auth />}+ {session && session.user ? (+ <Account key={session.user.id} session={session} />+ ) : (+ <Auth />+ )}</View>)}@@ -457,7 +479,9 @@ export default function Avatar({ url, size, onUpload }) {async function downloadImage(path) {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) {throw error}@@ -481,7 +505,9 @@ export default function Avatar({ url, size, onUpload }) {const fileName = `${Math.random()}.${fileExt}`const filePath = `${fileName}`- let { error: uploadError } = await supabase.storage.from('avatars').upload(filePath, file)+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)if (uploadError) {throw uploadErrordiff --git a/apps/reference/docs/guides/with-flutter.mdx b/apps/reference/docs/guides/with-flutter.mdxindex 7c67760c7cf..296557d3419 100644--- a/apps/reference/docs/guides/with-flutter.mdx+++ b/apps/reference/docs/guides/with-flutter.mdx@@ -56,7 +56,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -120,7 +125,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the Appdiff --git a/apps/reference/docs/guides/with-ionic-angular.mdx b/apps/reference/docs/guides/with-ionic-angular.mdxindex f702e262edc..81acd5113f1 100644--- a/apps/reference/docs/guides/with-ionic-angular.mdx+++ b/apps/reference/docs/guides/with-ionic-angular.mdx@@ -1,12 +1,12 @@---id: with-ionic-angular-title: "Quickstart: Ionic Angular"+title: 'Quickstart: Ionic Angular'description: Learn how to use Supabase in your Ionic Angular App.sidebar_label: Ionic Angular----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Intro@@ -47,7 +47,6 @@ and then creating a "schema" inside the database.1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schemaNow we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,@@ -66,7 +65,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -123,7 +127,6 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>-### Get the API KeysNow that you've created some database tables, you are ready to insert data using the auto-generated API.@@ -134,7 +137,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -162,53 +170,55 @@ And finally we want to save the environment variables in the `environment.ts` fiAll we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).These variables will be exposed on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.-```ts title="environment.ts"export const environment = {production: false,- supabaseUrl: "YOUR_SUPABASE_URL",- supabaseKey: "YOUR_SUPABASE_KEY"-};+ supabaseUrl: 'YOUR_SUPABASE_URL',+ supabaseKey: 'YOUR_SUPABASE_KEY',+}```Now that we have the API credentials in place, let's create a **SupabaseService** with `ionic g s supabase` to initialize the Supabase client and implement functions to communicate with the Supabase API.```ts title="src/app/supabase.service.ts"-import { Injectable } from '@angular/core';-import { LoadingController, ToastController } from '@ionic/angular';+import { Injectable } from '@angular/core'+import { LoadingController, ToastController } from '@ionic/angular'import {AuthChangeEvent,createClient,Session,SupabaseClient,-} from '@supabase/supabase-js';-import { environment } from '../environments/environment';+} from '@supabase/supabase-js'+import { environment } from '../environments/environment'export interface Profile {- username: string;- website: string;- avatar_url: string;+ username: string+ website: string+ avatar_url: string}@Injectable({providedIn: 'root',})export class SupabaseService {- private supabase: SupabaseClient;+ private supabase: SupabaseClient- constructor(private loadingCtrl: LoadingController, private toastCtrl: ToastController) {+ constructor(+ private loadingCtrl: LoadingController,+ private toastCtrl: ToastController+ ) {this.supabase = createClient(environment.supabaseUrl,environment.supabaseKey- );+ )}get user() {- return this.supabase.auth.user();+ return this.supabase.auth.user()}get session() {- return this.supabase.auth.session();+ return this.supabase.auth.session()}get profile() {@@ -216,21 +226,21 @@ export class SupabaseService {.from('profiles').select(`username, website, avatar_url`).eq('id', this.user?.id)- .single();+ .single()}authChanges(callback: (event: AuthChangeEvent, session: Session | null) => void) {- return this.supabase.auth.onAuthStateChange(callback);+ return this.supabase.auth.onAuthStateChange(callback)}signIn(email: string) {- return this.supabase.auth.signIn({ email });+ return this.supabase.auth.signIn({ email })}signOut() {- return this.supabase.auth.signOut();+ return this.supabase.auth.signOut()}updateProfile(profile: Profile) {@@ -238,28 +248,28 @@ export class SupabaseService {...profile,id: this.user?.id,updated_at: new Date(),- };+ }return this.supabase.from('profiles').upsert(update, {returning: 'minimal', // Don't return the value after inserting- });+ })}downLoadImage(path: string) {- return this.supabase.storage.from('avatars').download(path);+ return this.supabase.storage.from('avatars').download(path)}uploadAvatar(filePath: string, file: File) {- return this.supabase.storage.from('avatars').upload(filePath, file);+ return this.supabase.storage.from('avatars').upload(filePath, file)}async createNotice(message: string) {- const toast = await this.toastCtrl.create({ message, duration: 5000 });- await toast.present();+ const toast = await this.toastCtrl.create({ message, duration: 5000 })+ await toast.present()}createLoader() {- return this.loadingCtrl.create();+ return this.loadingCtrl.create()}}```@@ -272,8 +282,8 @@ Create an **LoginPage** with `ionic g page login` Ionic CLI command.> This guide will show the template inline, but the example app will have templateUrls```ts title="src/app/login/login.page.ts"-import { Component, OnInit } from '@angular/core';-import { SupabaseService } from '../supabase.service';+import { Component, OnInit } from '@angular/core'+import { SupabaseService } from '../supabase.service'@Component({selector: 'app-login',@@ -289,43 +299,41 @@ import { SupabaseService } from '../supabase.service';<h1>Supabase + Ionic Angular</h1><p>Sign in via magic link with your email below</p></div>- <ion-list inset="true">- <form (ngSubmit)="handleLogin($event)">- <ion-item>- <ion-label position="stacked">Email</ion-label>- <ion-input- [(ngModel)]="email"- name="email"- autocomplete- type="email"- ></ion-input>- </ion-item>- <div class="ion-text-center">- <ion-button type="submit" fill="clear">Login</ion-button>- </div>- </form>- </ion-list>+ <ion-list inset="true">+ <form (ngSubmit)="handleLogin($event)">+ <ion-item>+ <ion-label position="stacked">Email</ion-label>+ <ion-input+ [(ngModel)]="email"+ name="email"+ autocomplete+ type="email"+ ></ion-input>+ </ion-item>+ <div class="ion-text-center">+ <ion-button type="submit" fill="clear">Login</ion-button>+ </div>+ </form>+ </ion-list></ion-content>`,styleUrls: ['./login.page.scss'],})export class LoginPage implements OnInit {- email = '';- constructor(- private readonly supabase: SupabaseService,- ) {}+ email = ''+ constructor(private readonly supabase: SupabaseService) {}ngOnInit() {}async handleLogin(event: any) {- event.preventDefault();- const loader = await this.supabase.createLoader();- await loader.present();+ event.preventDefault()+ const loader = await this.supabase.createLoader()+ await loader.present()try {- await this.supabase.signIn(this.email);- await loader.dismiss();- await this.supabase.createNotice('Check your email for the login link!');+ await this.supabase.signIn(this.email)+ await loader.dismiss()+ await this.supabase.createNotice('Check your email for the login link!')} catch (error) {- await loader.dismiss();+ await loader.dismiss()await this.supabase.createNotice(error.error_description || error.message)}}@@ -338,9 +346,9 @@ After a user is signed in we can allow them to edit their profile details and maCreate an **AccountComponent** with `ionic g page account` Ionic CLI command.```ts title="src/app/account.component.ts"-import { Component, OnInit} from '@angular/core';-import { Router } from '@angular/router';-import { Profile, SupabaseService } from '../supabase.service';+import { Component, OnInit } from '@angular/core'+import { Router } from '@angular/router'+import { Profile, SupabaseService } from '../supabase.service'@Component({selector: 'app-account',@@ -394,62 +402,60 @@ export class AccountPage implements OnInit {username: '',avatar_url: '',website: '',- };+ }- session = this.supabase.session;+ session = this.supabase.sessionconstructor(private readonly supabase: SupabaseService,private router: Router) {}ngOnInit() {- this.getProfile();+ this.getProfile()}async getProfile() {try {- let { data: profile, error, status } = await this.supabase.profile;+ let { data: profile, error, status } = await this.supabase.profileif (error && status !== 406) {- throw error;+ throw error}if (profile) {- this.profile = profile;+ this.profile = profile}} catch (error) {- alert(error.message);+ alert(error.message)}}async updateProfile(avatar_url: string = '') {- const loader = await this.supabase.createLoader();- await loader.present();+ const loader = await this.supabase.createLoader()+ await loader.present()try {- await this.supabase.updateProfile({ ...this.profile, avatar_url });- await loader.dismiss();- await this.supabase.createNotice('Profile updated!');+ await this.supabase.updateProfile({ ...this.profile, avatar_url })+ await loader.dismiss()+ await this.supabase.createNotice('Profile updated!')} catch (error) {- await this.supabase.createNotice(error.message);+ await this.supabase.createNotice(error.message)}}async signOut() {- console.log('testing?');- await this.supabase.signOut();- this.router.navigate(['/'], { replaceUrl: true });+ console.log('testing?')+ await this.supabase.signOut()+ this.router.navigate(['/'], { replaceUrl: true })}}```--### Launch!Now that we have all the components in place, let's update **AppComponent**:```ts title="src/app/app.component.ts"-import { Component } from '@angular/core';-import { Router } from '@angular/router';-import { SupabaseService } from './supabase.service';+import { Component } from '@angular/core'+import { Router } from '@angular/router'+import { SupabaseService } from './supabase.service'@Component({selector: 'app-root',@@ -463,11 +469,11 @@ import { SupabaseService } from './supabase.service';export class AppComponent {constructor(private supabase: SupabaseService, private router: Router) {this.supabase.authChanges((_, session) => {- console.log(session);+ console.log(session)if (session?.user) {- this.router.navigate(['/account']);+ this.router.navigate(['/account'])}- });+ })}}```@@ -475,24 +481,26 @@ export class AppComponent {Then update the **AppRoutingModule**```ts title="src/app/app.ts"-import { NgModule } from '@angular/core';-import { PreloadAllModules, RouterModule, Routes } from '@angular/router';+import { NgModule } from '@angular/core'+import { PreloadAllModules, RouterModule, Routes } from '@angular/router'const routes: Routes = [{path: '/',- loadChildren: () => import('./login/login.module').then((m) => m.LoginPageModule)+ loadChildren: () =>+ import('./login/login.module').then((m) => m.LoginPageModule),},{path: 'account',- loadChildren: () => import('./account/account.module').then((m) => m.AccountPageModule)+ loadChildren: () =>+ import('./account/account.module').then((m) => m.AccountPageModule),},-];+]@NgModule({imports: [RouterModule.forRoot(routes, {- preloadingStrategy: PreloadAllModules+ preloadingStrategy: PreloadAllModules,}),],exports: [RouterModule],@@ -508,7 +516,6 @@ ionic serveAnd the browser will auomatically open to show the app.-## Bonus: Profile photos@@ -532,23 +539,23 @@ Ionic PWA elements is a companion package that will polyfill certain browser APIWith those packages installed we can update our `main.ts` to include an additional bootstapping call for the Ionic PWA Elements.```ts title="src/main.ts"-import { enableProdMode } from '@angular/core';-import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';+import { enableProdMode } from '@angular/core'+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'-import { AppModule } from './app/app.module';-import { environment } from './environments/environment';+import { AppModule } from './app/app.module'+import { environment } from './environments/environment'-import { defineCustomElements } from '@ionic/pwa-elements/loader';+import { defineCustomElements } from '@ionic/pwa-elements/loader'defineCustomElements(window)if (environment.production) {- enableProdMode();+ enableProdMode()}-platformBrowserDynamic().bootstrapModule(AppModule)- .catch(err => console.log(err));+platformBrowserDynamic()+ .bootstrapModule(AppModule)+ .catch((err) => console.log(err))```-Then create an **AvatarComponent** with this Ionic CLI command:```bash@@ -556,10 +563,10 @@ Then create an **AvatarComponent** with this Ionic CLI command:``````ts title="src/app/avatar.component.ts"-import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';-import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';-import { SupabaseService } from '../supabase.service';-import { Camera, CameraResultType } from '@capacitor/camera';+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'+import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'+import { SupabaseService } from '../supabase.service'+import { Camera, CameraResultType } from '@capacitor/camera'@Component({selector: 'app-avatar',template: `@@ -570,7 +577,8 @@ import { Camera, CameraResultType } from '@capacitor/camera';</ng-template></div>`,- style: [`+ style: [+ `:host {display: block;margin: auto;@@ -598,20 +606,21 @@ import { Camera, CameraResultType } from '@capacitor/camera';width: 100%;height: 100%;}- `],+ `,+ ],})export class AvatarComponent implements OnInit {- _avatarUrl: SafeResourceUrl | undefined;- uploading = false;+ _avatarUrl: SafeResourceUrl | undefined+ uploading = false@Input()set avatarUrl(url: string | undefined) {if (url) {- this.downloadImage(url);+ this.downloadImage(url)}}- @Output() upload = new EventEmitter<string>();+ @Output() upload = new EventEmitter<string>()constructor(private readonly supabase: SupabaseService,@@ -622,42 +631,46 @@ export class AvatarComponent implements OnInit {async downloadImage(path: string) {try {- const { data } = await this.supabase.downLoadImage(path);+ const { data } = await this.supabase.downLoadImage(path)this._avatarUrl = this.dom.bypassSecurityTrustResourceUrl(URL.createObjectURL(data)- );+ )} catch (error) {- console.error('Error downloading image: ', error.message);+ console.error('Error downloading image: ', error.message)}}async uploadAvatar() {- const loader = await this.supabase.createLoader();+ const loader = await this.supabase.createLoader()try {const photo = await Camera.getPhoto({resultType: CameraResultType.DataUrl,- });+ })const file = await fetch(photo.dataUrl).then((res) => res.blob())- .then( (blob) => new File([blob], 'my-file', { type: `image/${photo.format}` }));+ .then(+ (blob) =>+ new File([blob], 'my-file', { type: `image/${photo.format}` })+ )- const fileName = `${Math.random()}-${new Date().getTime()}.${ photo.format }`;+ const fileName = `${Math.random()}-${new Date().getTime()}.${+ photo.format+ }`- await loader.present();- await this.supabase.uploadAvatar(fileName, file);+ await loader.present()+ await this.supabase.uploadAvatar(fileName, file)- this.upload.emit(fileName);+ this.upload.emit(fileName)} catch (error) {- this.supabase.createNotice(error.message);+ this.supabase.createNotice(error.message)} finally {- loader.dismiss();+ loader.dismiss()}}}```-### Add the new widgetAnd then we can add the widget on top of the **AccountComponent** html template:diff --git a/apps/reference/docs/guides/with-ionic-react.mdx b/apps/reference/docs/guides/with-ionic-react.mdxindex 1ca3e17be63..6885fd6fbac 100644--- a/apps/reference/docs/guides/with-ionic-react.mdx+++ b/apps/reference/docs/guides/with-ionic-react.mdx@@ -1,12 +1,12 @@---id: with-ionic-react-title: "Quickstart: Ionic React"+title: 'Quickstart: Ionic React'description: Learn how to use Supabase in your Ionic React App.sidebar_label: Ionic React----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Intro@@ -47,7 +47,6 @@ and then creating a "schema" inside the database.1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schemaNow we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,@@ -66,7 +65,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -123,7 +127,6 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>-### Get the API KeysNow that you've created some database tables, you are ready to insert data using the auto-generated API.@@ -134,7 +137,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -416,30 +424,30 @@ export function AccountPage() {Now that we have all the components in place, let's update `App.tsx`:```jsx title="src/App.tsx"-import { Redirect, Route } from 'react-router-dom';-import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';-import { IonReactRouter } from '@ionic/react-router';-import { supabase } from './supabaseClient';+import { Redirect, Route } from 'react-router-dom'+import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react'+import { IonReactRouter } from '@ionic/react-router'+import { supabase } from './supabaseClient'-import '@ionic/react/css/ionic.bundle.css';+import '@ionic/react/css/ionic.bundle.css'/* Theme variables */-import './theme/variables.css';-import { LoginPage } from './pages/Login';-import { AccountPage } from './pages/Account';-import { useEffect, useState } from 'react';-import { Session } from '@supabase/supabase-js';+import './theme/variables.css'+import { LoginPage } from './pages/Login'+import { AccountPage } from './pages/Account'+import { useEffect, useState } from 'react'+import { Session } from '@supabase/supabase-js'-setupIonicReact();+setupIonicReact()const App: React.FC = () => {- const [session, setSession] = useState<Session | null>(null);+ const [session, setSession] = (useState < Session) | (null > null)useEffect(() => {- setSession(supabase.auth.session());+ setSession(supabase.auth.session())supabase.auth.onAuthStateChange((_event, session) => {- setSession(session);- });- }, [session]);+ setSession(session)+ })+ }, [session])return (<IonApp><IonReactRouter>@@ -448,7 +456,7 @@ const App: React.FC = () => {exactpath="/"render={() => {- return session ? <Redirect to="/account" /> : <LoginPage />;+ return session ? <Redirect to="/account" /> : <LoginPage />}}/><Route exact path="/account">@@ -457,10 +465,10 @@ const App: React.FC = () => {</IonRouterOutlet></IonReactRouter></IonApp>- );-};+ )+}-export default App;+export default App```Once that's done, run this in a terminal window:@@ -492,24 +500,24 @@ Ionic PWA elements is a companion package that will polyfill certain browser APIWith those packages installed we can update our `index.tsx` to include an additional bootstapping call for the Ionic PWA Elements.```ts title="src/index.tsx"-import React from 'react';-import ReactDOM from 'react-dom';-import App from './App';-import * as serviceWorkerRegistration from './serviceWorkerRegistration';-import reportWebVitals from './reportWebVitals';+import React from 'react'+import ReactDOM from 'react-dom'+import App from './App'+import * as serviceWorkerRegistration from './serviceWorkerRegistration'+import reportWebVitals from './reportWebVitals'-import {defineCustomElements} from '@ionic/pwa-elements/loader';-defineCustomElements(window);+import { defineCustomElements } from '@ionic/pwa-elements/loader'+defineCustomElements(window)ReactDOM.render(<React.StrictMode><App /></React.StrictMode>,document.getElementById('root')-);+)-serviceWorkerRegistration.unregister();-reportWebVitals();+serviceWorkerRegistration.unregister()+reportWebVitals()```Then create an **AvatarComponent**.diff --git a/apps/reference/docs/guides/with-ionic-vue.mdx b/apps/reference/docs/guides/with-ionic-vue.mdxindex eb0062434bd..ed4984c797e 100644--- a/apps/reference/docs/guides/with-ionic-vue.mdx+++ b/apps/reference/docs/guides/with-ionic-vue.mdx@@ -1,12 +1,12 @@---id: with-ionic-vue-title: "Quickstart: Ionic Vue"+title: 'Quickstart: Ionic Vue'description: Learn how to use Supabase in your Ionic Vue App.sidebar_label: Ionic Vue----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Intro@@ -47,7 +47,6 @@ and then creating a "schema" inside the database.1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schemaNow we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,@@ -66,7 +65,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -123,7 +127,6 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>-### Get the API KeysNow that you've created some database tables, you are ready to insert data using the auto-generated API.@@ -134,7 +137,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -214,31 +222,12 @@ Let's set up a Vue component to manage logins and sign ups. We'll use Magic Link</ion-list><p>{{email}}</p></ion-content>-</ion-page></template><script lang="ts">-import { supabase } from '../supabase';-import {- IonContent,- IonHeader,- IonPage,- IonTitle,- IonToolbar,- IonList,- IonItem,- IonLabel,- IonInput,- IonButton,- toastController,- loadingController,-} from '@ionic/vue';-import { defineComponent, ref } from 'vue';--export default defineComponent({- name: 'LoginPage',- components: {+ import { supabase } from '../supabase'+ import {IonContent,IonHeader,IonPage,@@ -249,37 +238,49 @@ export default defineComponent({IonLabel,IonInput,IonButton,- },- setup() {- const email = ref('');- const handleLogin = async () => {-- const loader = await loadingController.create({});- const toast = await toastController.create({ duration: 5000 });-- try {- await loader.present();- const { error } = await supabase.auth.signIn({ email: email.value });-- if (error) throw error;-- toast.message = 'Check your email for the login link!';- await toast.present();-- } catch (error: any) {-- toast.message = error.error_description || error.message;- await toast.present();-- } finally {-- await loader.dismiss();-+ toastController,+ loadingController,+ } from '@ionic/vue'+ import { defineComponent, ref } from 'vue'++ export default defineComponent({+ name: 'LoginPage',+ components: {+ IonContent,+ IonHeader,+ IonPage,+ IonTitle,+ IonToolbar,+ IonList,+ IonItem,+ IonLabel,+ IonInput,+ IonButton,+ },+ setup() {+ const email = ref('')+ const handleLogin = async () => {+ const loader = await loadingController.create({})+ const toast = await toastController.create({ duration: 5000 })++ try {+ await loader.present()+ const { error } = await supabase.auth.signIn({ email: email.value })++ if (error) throw error++ toast.message = 'Check your email for the login link!'+ await toast.present()+ } catch (error: any) {+ toast.message = error.error_description || error.message+ await toast.present()+ } finally {+ await loader.dismiss()+ }}- };- return { handleLogin, email };- },-});+ return { handleLogin, email }+ },+ })</script>```@@ -337,118 +338,118 @@ Let's create a new component for that called `Account.vue`.</template><script lang="ts">-import { store } from '@/store';-import { supabase } from '@/supabase';-import {- IonContent,- IonHeader,- IonPage,- IonTitle,- IonToolbar,- toastController,- loadingController,- IonInput,- IonItem,- IonButton,- IonLabel,-} from '@ionic/vue';-import { User } from '@supabase/supabase-js';-import { defineComponent, onMounted, ref } from 'vue';-export default defineComponent({- name: 'AccountPage',- components: {+ import { store } from '@/store'+ import { supabase } from '@/supabase'+ import {IonContent,IonHeader,IonPage,IonTitle,IonToolbar,+ toastController,+ loadingController,IonInput,IonItem,IonButton,IonLabel,- },- setup() {- const session = ref(supabase.auth.session());- const profile = ref({- username: '',- website: '',- avatar_url: '',- });- const user = store.user as User;- async function getProfile() {- const loader = await loadingController.create({});- const toast = await toastController.create({ duration: 5000 });- await loader.present();- try {- let { data, error, status } = await supabase- .from('profiles')- .select(`username, website, avatar_url`)- .eq('id', user.id)- .single();-- if (error && status !== 406) throw error;-- if (data) {- console.log(data)- profile.value = {- username: data.username,- website: data.website,- avatar_url: data.avatar_url,- };+ } from '@ionic/vue'+ import { User } from '@supabase/supabase-js'+ import { defineComponent, onMounted, ref } from 'vue'+ export default defineComponent({+ name: 'AccountPage',+ components: {+ IonContent,+ IonHeader,+ IonPage,+ IonTitle,+ IonToolbar,+ IonInput,+ IonItem,+ IonButton,+ IonLabel,+ },+ setup() {+ const session = ref(supabase.auth.session())+ const profile = ref({+ username: '',+ website: '',+ avatar_url: '',+ })+ const user = store.user as User+ async function getProfile() {+ const loader = await loadingController.create({})+ const toast = await toastController.create({ duration: 5000 })+ await loader.present()+ try {+ let { data, error, status } = await supabase+ .from('profiles')+ .select(`username, website, avatar_url`)+ .eq('id', user.id)+ .single()++ if (error && status !== 406) throw error++ if (data) {+ console.log(data)+ profile.value = {+ username: data.username,+ website: data.website,+ avatar_url: data.avatar_url,+ }+ }+ } catch (error: any) {+ toast.message = error.message+ await toast.present()+ } finally {+ await loader.dismiss()}- } catch (error: any) {- toast.message = error.message;- await toast.present();- } finally {- await loader.dismiss();}- }-- const updateProfile = async () => {- const loader = await loadingController.create({});- const toast = await toastController.create({ duration: 5000 });- try {- await loader.present();- const updates = {- id: user.id,- ...profile.value,- updated_at: new Date(),- };- //- let { error } = await supabase.from('profiles').upsert(updates, {- returning: 'minimal', // Don't return the value after inserting- });- //- if (error) throw error;- } catch (error: any) {- toast.message = error.message;- await toast.present();- } finally {- await loader.dismiss();++ const updateProfile = async () => {+ const loader = await loadingController.create({})+ const toast = await toastController.create({ duration: 5000 })+ try {+ await loader.present()+ const updates = {+ id: user.id,+ ...profile.value,+ updated_at: new Date(),+ }+ //+ let { error } = await supabase.from('profiles').upsert(updates, {+ returning: 'minimal', // Don't return the value after inserting+ })+ //+ if (error) throw error+ } catch (error: any) {+ toast.message = error.message+ await toast.present()+ } finally {+ await loader.dismiss()+ }}- };-- async function signOut() {- const loader = await loadingController.create({});- const toast = await toastController.create({ duration: 5000 });- await loader.present();- try {- let { error } = await supabase.auth.signOut();- if (error) throw error;- } catch (error: any) {- toast.message = error.message;- await toast.present();- } finally {- await loader.dismiss();++ async function signOut() {+ const loader = await loadingController.create({})+ const toast = await toastController.create({ duration: 5000 })+ await loader.present()+ try {+ let { error } = await supabase.auth.signOut()+ if (error) throw error+ } catch (error: any) {+ toast.message = error.message+ await toast.present()+ } finally {+ await loader.dismiss()+ }}- }- onMounted(() => {- getProfile();- });- return { signOut, profile, session, updateProfile };- },-});+ onMounted(() => {+ getProfile()+ })+ return { signOut, profile, session, updateProfile }+ },+ })</script>```@@ -457,32 +458,31 @@ export default defineComponent({Now that we have all the components in place, let's update `App.vue` and our routes:```ts title="src/router.index.ts"-import { createRouter, createWebHistory } from '@ionic/vue-router';-import { RouteRecordRaw } from 'vue-router';-import LoginPage from '../views/Login.vue';-import AccountPage from '../views/Account.vue';+import { createRouter, createWebHistory } from '@ionic/vue-router'+import { RouteRecordRaw } from 'vue-router'+import LoginPage from '../views/Login.vue'+import AccountPage from '../views/Account.vue'const routes: Array<RouteRecordRaw> = [{path: '/',name: 'Login',- component: LoginPage+ component: LoginPage,},{path: '/account',name: 'Account',- component: AccountPage- }+ component: AccountPage,+ },]const router = createRouter({history: createWebHistory(process.env.BASE_URL),- routes+ routes,})export default router```-```html title="src/App.vue"<template><ion-app>@@ -491,29 +491,29 @@ export default router</template><script lang="ts">-import { IonApp, IonRouterOutlet, useIonRouter } from '@ionic/vue';-import { defineComponent } from 'vue';--import { store } from './store';-import { supabase } from './supabase';--export default defineComponent({- name: 'App',- components: {- IonApp,- IonRouterOutlet- },- setup(){- const router = useIonRouter();- store.user = supabase.auth.user() ?? {};- supabase.auth.onAuthStateChange((_, session) => {- store.user = session?.user ?? {}- if(session?.user) {- router.replace('/account');- }- })- }-});+ import { IonApp, IonRouterOutlet, useIonRouter } from '@ionic/vue'+ import { defineComponent } from 'vue'++ import { store } from './store'+ import { supabase } from './supabase'++ export default defineComponent({+ name: 'App',+ components: {+ IonApp,+ IonRouterOutlet,+ },+ setup() {+ const router = useIonRouter()+ store.user = supabase.auth.user() ?? {}+ supabase.auth.onAuthStateChange((_, session) => {+ store.user = session?.user ?? {}+ if (session?.user) {+ router.replace('/account')+ }+ })+ },+ })</script>```@@ -548,24 +548,22 @@ With those packages installed we can update our `main.ts` to include an addition```ts title="src/main.tsx"import { createApp } from 'vue'import App from './App.vue'-import router from './router';+import router from './router'-import { IonicVue } from '@ionic/vue';+import { IonicVue } from '@ionic/vue'/* Core CSS required for Ionic components to work properly */-import '@ionic/vue/css/ionic.bundle.css';+import '@ionic/vue/css/ionic.bundle.css'/* Theme variables */-import './theme/variables.css';+import './theme/variables.css'-import { defineCustomElements } from '@ionic/pwa-elements/loader';-defineCustomElements(window);-const app = createApp(App)- .use(IonicVue)- .use(router);+import { defineCustomElements } from '@ionic/pwa-elements/loader'+defineCustomElements(window)+const app = createApp(App).use(IonicVue).use(router)router.isReady().then(() => {- app.mount('#app');-});+ app.mount('#app')+})```Then create an **AvatarComponent**.@@ -581,104 +579,105 @@ Then create an **AvatarComponent**.</template><script lang="ts">-import { ref, toRefs, watch, defineComponent } from 'vue';-import { supabase } from '../supabase';-import { Camera, CameraResultType } from '@capacitor/camera';-import { IonIcon } from '@ionic/vue';-import { person } from 'ionicons/icons';-export default defineComponent({- name: 'AppAvatar',- props: { path: String },- emits: ['upload', 'update:path'],- components: { IonIcon },- setup(prop, { emit }) {- const { path } = toRefs(prop);- const avatarUrl = ref('');-- const downloadImage = async () => {- try {- const { data, error } = await supabase.storage- .from('avatars')- .download(path.value);- if (error) throw error;- avatarUrl.value = URL.createObjectURL(data!);- } catch (error: any) {- console.error('Error downloading image: ', error.message);- }- };-- const uploadAvatar = async () => {- try {- const photo = await Camera.getPhoto({- resultType: CameraResultType.DataUrl,- });- if (photo.dataUrl) {- const file = await fetch(photo.dataUrl)- .then((res) => res.blob())- .then(- (blob) =>- new File([blob], 'my-file', { type: `image/${photo.format}` })- );-- const fileName = `${Math.random()}-${new Date().getTime()}.${- photo.format- }`;- let { error: uploadError } = await supabase.storage+ import { ref, toRefs, watch, defineComponent } from 'vue'+ import { supabase } from '../supabase'+ import { Camera, CameraResultType } from '@capacitor/camera'+ import { IonIcon } from '@ionic/vue'+ import { person } from 'ionicons/icons'+ export default defineComponent({+ name: 'AppAvatar',+ props: { path: String },+ emits: ['upload', 'update:path'],+ components: { IonIcon },+ setup(prop, { emit }) {+ const { path } = toRefs(prop)+ const avatarUrl = ref('')++ const downloadImage = async () => {+ try {+ const { data, error } = await supabase.storage.from('avatars')- .upload(fileName, file);- if (uploadError) {- throw uploadError;+ .download(path.value)+ if (error) throw error+ avatarUrl.value = URL.createObjectURL(data!)+ } catch (error: any) {+ console.error('Error downloading image: ', error.message)+ }+ }++ const uploadAvatar = async () => {+ try {+ const photo = await Camera.getPhoto({+ resultType: CameraResultType.DataUrl,+ })+ if (photo.dataUrl) {+ const file = await fetch(photo.dataUrl)+ .then((res) => res.blob())+ .then(+ (blob) =>+ new File([blob], 'my-file', { type: `image/${photo.format}` })+ )++ const fileName = `${Math.random()}-${new Date().getTime()}.${+ photo.format+ }`+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(fileName, file)+ if (uploadError) {+ throw uploadError+ }+ emit('update:path', fileName)+ emit('upload')}- emit('update:path', fileName);- emit('upload');+ } catch (error) {+ console.log(error)}- } catch (error) {- console.log(error);}- };- watch(path, () => {- if (path.value) downloadImage();- });+ watch(path, () => {+ if (path.value) downloadImage()+ })- return { avatarUrl, uploadAvatar, person };- },-});+ return { avatarUrl, uploadAvatar, person }+ },+ })</script><style>-.avatar {- display: block;- margin: auto;- min-height: 150px;-}-.avatar .avatar_wrapper {- margin: 16px auto 16px;- border-radius: 50%;- overflow: hidden;- height: 150px;- aspect-ratio: 1;- background: var(--ion-color-step-50);- border: thick solid var(--ion-color-step-200);-}-.avatar .avatar_wrapper:hover {- cursor: pointer;-}-.avatar .avatar_wrapper ion-icon.no-avatar {- width: 100%;- height: 115%;-}-.avatar img {- display: block;- object-fit: cover;- width: 100%;- height: 100%;-}+ .avatar {+ display: block;+ margin: auto;+ min-height: 150px;+ }+ .avatar .avatar_wrapper {+ margin: 16px auto 16px;+ border-radius: 50%;+ overflow: hidden;+ height: 150px;+ aspect-ratio: 1;+ background: var(--ion-color-step-50);+ border: thick solid var(--ion-color-step-200);+ }+ .avatar .avatar_wrapper:hover {+ cursor: pointer;+ }+ .avatar .avatar_wrapper ion-icon.no-avatar {+ width: 100%;+ height: 115%;+ }+ .avatar img {+ display: block;+ object-fit: cover;+ width: 100%;+ height: 100%;+ }</style>```### Add the new widgetAnd then we can add the widget to the Account page:+```html title="src/views/Account.vue"<template><ion-page>diff --git a/apps/reference/docs/guides/with-nextjs.mdx b/apps/reference/docs/guides/with-nextjs.mdxindex cb963ff5198..0f82541674a 100644--- a/apps/reference/docs/guides/with-nextjs.mdx+++ b/apps/reference/docs/guides/with-nextjs.mdx@@ -1,14 +1,14 @@---id: with-nextjs-title: "Quickstart: Next.js"+title: 'Quickstart: Next.js'description: Learn how to use Supabase in your Next App.-sidebar_label: "Next.js"+sidebar_label: 'Next.js'----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-## Intro+## IntroThis example provides the steps to build a simple user management app (from scratch!) using Supabase and Next.js. It includes:@@ -22,7 +22,7 @@ By the end of this guide you'll have an app which allows users to login and upda-<!-- ## Video demo+<!-- ## Video demoComing soon.@@ -30,7 +30,7 @@ Use the annotated timeline to step through this tutorial.## Instant deploy-Want to deploy a completed version of this example without following the guide?+Want to deploy a completed version of this example without following the guide?[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2Freact-user-management&project-name=supabase-user-management&repository-name=supabase-user-management&demo-title=Supabase%20User%20Management&demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js&demo-url=https%3A%2F%2Fsupabase-react-user-management.vercel.app&demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv&external-id=nextjs-user-management)@@ -45,20 +45,19 @@ If you want to do it yourself, let's get started: -->## Project set up-Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase+Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabaseand then creating a "schema" inside the database.-### Create a project+### Create a project1. Go to [app.supabase.com](https://app.supabase.com).1. Click on "New Project".1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schema-Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,+Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,or you can just copy/paste the SQL from below and run it yourself.<Tabs@@ -74,7 +73,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -132,11 +136,9 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>+### Get the API Keys-### Get the API Keys---Now that you've created some database tables, you are ready to insert data using the auto-generated API.+Now that you've created some database tables, you are ready to insert data using the auto-generated API.We just need to get the URL and `anon` key from the API settings.1. Go to the [Settings](https://app.supabase.com/project/_/settings) page in the Dashboard.@@ -144,7 +146,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -153,7 +160,7 @@ Let's start building the Next.js app from scratch.### Initialize a Next.js app-We can use [`create-next-app`](https://nextjs.org/docs/getting-started) to initialize+We can use [`create-next-app`](https://nextjs.org/docs/getting-started) to initializean app called `supabase-nextjs`:```bash@@ -167,7 +174,7 @@ Then let's install the only additional dependency: [supabase-js](https://github.npm install @supabase/supabase-js```-And finally we want to save the environment variables in a `.env.local`.+And finally we want to save the environment variables in a `.env.local`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).```bash title=".env.local"@@ -175,8 +182,8 @@ NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY```-Now that we have the API credentials in place, let's create a helper file to initialize the Supabase client.-These variables will be exposed on the browser, and that's completely fine since we have+Now that we have the API credentials in place, let's create a helper file to initialize the Supabase client.+These variables will be exposed on the browser, and that's completely fine since we have[Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.```js title="utils/supabaseClient.js"@@ -188,12 +195,12 @@ const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEYexport const supabase = createClient(supabaseUrl, supabaseAnonKey)```-And one optional step is to update the CSS file `styles/globals.css` to make the app look nice.+And one optional step is to update the CSS file `styles/globals.css` to make the app look nice.You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/nextjs-ts-user-management/styles/globals.css).### Set up a Login component-Let's set up a React component to manage logins and sign ups.+Let's set up a React component to manage logins and sign ups.We'll use Magic Links, so users can sign in with their email without using passwords.```jsx title="components/Auth.js"@@ -218,10 +225,12 @@ export default function Auth() {}return (- <div className="row flex flex-center">+ <div className="row flex-center flex"><div className="col-6 form-widget"><h1 className="header">Supabase + Next.js</h1>- <p className="description">Sign in via magic link with your email below</p>+ <p className="description">+ Sign in via magic link with your email below+ </p><div><inputclassName="inputField"@@ -350,7 +359,7 @@ export default function Account({ session }) {<div><button- className="button block primary"+ className="button primary block"onClick={() => updateProfile({ username, website, avatar_url })}disabled={loading}>@@ -359,18 +368,18 @@ export default function Account({ session }) {</div><div>- <button className="button block" onClick={() => supabase.auth.signOut()}>+ <button+ className="button block"+ onClick={() => supabase.auth.signOut()}+ >Sign Out</button></div></div>)}-```--### Launch!Now that we have all the components in place, let's update `pages/index.js`:@@ -394,7 +403,11 @@ export default function Home() {return (<div className="container" style={{ padding: '50px 0 100px 0' }}>- {!session ? <Auth /> : <Account key={session.user.id} session={session} />}+ {!session ? (+ <Auth />+ ) : (+ <Account key={session.user.id} session={session} />+ )}</div>)}@@ -408,17 +421,16 @@ npm run devAnd then open the browser to [localhost:3000](http://localhost:3000) and you should see the completed app.-## Bonus: Profile photos-Every Supabase project is configured with [Storage](/docs/guides/storage) for managing large files like+Every Supabase project is configured with [Storage](/docs/guides/storage) for managing large files likephotos and videos.### Create an upload widget-Let's create an avatar for the user so that they can upload a profile photo.+Let's create an avatar for the user so that they can upload a profile photo.We can start by creating a new component:```jsx title="components/Avatar.js"@@ -435,7 +447,9 @@ export default function Avatar({ url, size, onUpload }) {async function downloadImage(path) {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) {throw error}@@ -446,7 +460,6 @@ export default function Avatar({ url, size, onUpload }) {}}-async function uploadAvatar(event) {try {setUploading(true)@@ -486,7 +499,10 @@ export default function Avatar({ url, size, onUpload }) {style={{ height: size, width: size }}/>) : (- <div className="avatar no-image" style={{ height: size, width: size }} />+ <div+ className="avatar no-image"+ style={{ height: size, width: size }}+ />)}<div style={{ width: size }}><label className="button primary block" htmlFor="single">@@ -509,12 +525,10 @@ export default function Avatar({ url, size, onUpload }) {}```-### Add the new widgetAnd then we can add the widget to the Account page:-```jsx title="components/Account.js"// Import the new componentimport Avatar from './Avatar'@@ -535,7 +549,6 @@ return ({/* ... */}</div>)-```## Next stepsdiff --git a/apps/reference/docs/guides/with-nuxt-3.mdx b/apps/reference/docs/guides/with-nuxt-3.mdxindex 529b3c41bfb..c0eea3833b2 100644--- a/apps/reference/docs/guides/with-nuxt-3.mdx+++ b/apps/reference/docs/guides/with-nuxt-3.mdx@@ -5,8 +5,8 @@ description: Learn how to use Supabase in your Nuxt 3 App.sidebar_label: Nuxt 3----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'## Intro@@ -56,7 +56,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -124,7 +129,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -141,7 +151,7 @@ npx nuxi init nuxt-user-managementcd nuxt-user-management```-Then let's install the only additional dependency: [NuxtSupabase](https://supabase.nuxtjs.org/). We only need to import NuxtSupabase as a dev dependency.+Then let's install the only additional dependency: [NuxtSupabase](https://supabase.nuxtjs.org/). We only need to import NuxtSupabase as a dev dependency.```bashnpm install @nuxtjs/supabase --save-dev@@ -157,7 +167,7 @@ SUPABASE_KEY="YOUR_SUPABASE_ANON_KEY"These variables will be exposed on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.Amazing thing about [NuxtSupabase](https://supabase.nuxtjs.org/) is that setting environment variables is all we need to do in order to start using Supabase.-No need to initialize Supabase. The library will take care of it automatically.+No need to initialize Supabase. The library will take care of it automatically.And one optional step is to update the CSS file `assets/main.css` to make the app look nice.You can find the full contents of this file [here](https://github.com/supabase-community/nuxt3-quickstarter/blob/main/assets/main.css).@@ -178,38 +188,47 @@ Let's set up a Vue component to manage logins and sign ups. We'll use Magic Link```html title="/components/Auth.vue"<template>- <form class="row flex flex-center" @submit.prevent="handleLogin">- <div class="col-6 form-widget">- <h1 class="header">Supabase + Nuxt 3</h1>- <p class="description">Sign in via magic link with your email below</p>- <div>- <input class="inputField" type="email" placeholder="Your email" v-model="email" />- </div>- <div>- <input type="submit" class="button block" :value="loading ? 'Loading' : 'Send magic link'"- :disabled="loading" />- </div>- </div>- </form>+ <form class="row flex-center flex" @submit.prevent="handleLogin">+ <div class="col-6 form-widget">+ <h1 class="header">Supabase + Nuxt 3</h1>+ <p class="description">Sign in via magic link with your email below</p>+ <div>+ <input+ class="inputField"+ type="email"+ placeholder="Your email"+ v-model="email"+ />+ </div>+ <div>+ <input+ type="submit"+ class="button block"+ :value="loading ? 'Loading' : 'Send magic link'"+ :disabled="loading"+ />+ </div>+ </div>+ </form></template><script setup>-const supabase = useSupabaseClient()+ const supabase = useSupabaseClient()-const loading = ref(false)-const email = ref("")-const handleLogin = async () => {+ const loading = ref(false)+ const email = ref('')+ const handleLogin = async () => {try {- loading.value = true- const { error } = await supabase.auth.signIn({ email: email.value })- if (error) throw error- alert("Check your email for the login link!")+ loading.value = true+ const { error } = await supabase.auth.signIn({ email: email.value })+ if (error) throw error+ alert('Check your email for the login link!')} catch (error) {- alert(error.error_description || error.message)+ alert(error.error_description || error.message)} finally {- loading.value = false+ loading.value = false}-}+ }</script>```@@ -228,89 +247,93 @@ Let's create a new component for that called `Account.vue`.```html title="components/Account.vue"<template>- <form class="form-widget" @submit.prevent="updateProfile">- <div>- <label for="email">Email</label>- <input id="email" type="text" :value="user.email" disabled />- </div>- <div>- <label for="username">Username</label>- <input id="username" type="text" v-model="username" />- </div>- <div>- <label for="website">Website</label>- <input id="website" type="website" v-model="website" />- </div>-- <div>- <input type="submit" class="button block primary" :value="loading ? 'Loading ...' : 'Update'"- :disabled="loading" />- </div>-- <div>- <button class="button block" @click="signOut" :disabled="loading">- Sign Out- </button>- </div>- </form>+ <form class="form-widget" @submit.prevent="updateProfile">+ <div>+ <label for="email">Email</label>+ <input id="email" type="text" :value="user.email" disabled />+ </div>+ <div>+ <label for="username">Username</label>+ <input id="username" type="text" v-model="username" />+ </div>+ <div>+ <label for="website">Website</label>+ <input id="website" type="website" v-model="website" />+ </div>++ <div>+ <input+ type="submit"+ class="button primary block"+ :value="loading ? 'Loading ...' : 'Update'"+ :disabled="loading"+ />+ </div>++ <div>+ <button class="button block" @click="signOut" :disabled="loading">+ Sign Out+ </button>+ </div>+ </form></template><script setup>-const supabase = useSupabaseClient()--const loading = ref(true)-const username = ref('')-const website = ref('')-const avatar_path = ref('')---loading.value = true-const user = useUser();-let { data } = await supabase- .from('profiles')- .select(`username, website, avatar_url`)- .eq('id', user.value.id)- .single()-if (data) {- username.value = data.username- website.value = data.website- avatar_path.value = data.avatar_url-}-loading.value = false--async function updateProfile() {- try {- loading.value = true- const user = useUser();- const updates = {- id: user.value.id,- username: username.value,- website: website.value,- avatar_url: avatar_path.value,- updated_at: new Date(),- }- let { error } = await supabase.from('profiles').upsert(updates, {- returning: 'minimal', // Don't return the value after inserting- })- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false- }-}--async function signOut() {- try {- loading.value = true- let { error } = await supabase.auth.signOut()- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false- }-}+ const supabase = useSupabaseClient()++ const loading = ref(true)+ const username = ref('')+ const website = ref('')+ const avatar_path = ref('')+++ loading.value = true+ const user = useUser();+ let { data } = await supabase+ .from('profiles')+ .select(`username, website, avatar_url`)+ .eq('id', user.value.id)+ .single()+ if (data) {+ username.value = data.username+ website.value = data.website+ avatar_path.value = data.avatar_url+ }+ loading.value = false++ async function updateProfile() {+ try {+ loading.value = true+ const user = useUser();+ const updates = {+ id: user.value.id,+ username: username.value,+ website: website.value,+ avatar_url: avatar_path.value,+ updated_at: new Date(),+ }+ let { error } = await supabase.from('profiles').upsert(updates, {+ returning: 'minimal', // Don't return the value after inserting+ })+ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }+ }++ async function signOut() {+ try {+ loading.value = true+ let { error } = await supabase.auth.signOut()+ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }+ }</script>```@@ -330,23 +353,21 @@ We now need to create an index page called `pages/index.vue`:```html title="pages/index.vue"<template>- <div class="container" style="padding: 50px 0 100px 0">- <Account v-if="user" />- <Auth v-else />- </div>+ <div class="container" style="padding: 50px 0 100px 0">+ <Account v-if="user" />+ <Auth v-else />+ </div></template><script setup>+ const supabase = useSupabaseClient()-const supabase = useSupabaseClient()--const user = useUser();+ const user = useUser()-user.value = useSupabaseUser()-supabase.auth.onAuthStateChange((_, session) => {+ user.value = useSupabaseUser()+ supabase.auth.onAuthStateChange((_, session) => {user.value = session?.user-})-+ })</script>```@@ -370,74 +391,90 @@ Let's create an avatar for the user so that they can upload a profile photo. We```html title="components/Avatar.vue"<template>- <div>- <img v-if="src" :src="src" alt="Avatar" class="avatar image" style="width: 10em; height: 10em;" />- <div v-else class="avatar no-image" :style="{ height: size, width: size }" />-- <div style="width: 10em; position: relative;">- <label class="button primary block" for="single">- {{ uploading ? "Uploading ..." : "Upload" }}- </label>- <input style="position: absolute; visibility: hidden;" type="file" id="single" accept="image/*"- @change="uploadAvatar" :disabled="uploading" />- </div>+ <div>+ <img+ v-if="src"+ :src="src"+ alt="Avatar"+ class="avatar image"+ style="width: 10em; height: 10em;"+ />+ <div+ v-else+ class="avatar no-image"+ :style="{ height: size, width: size }"+ />++ <div style="width: 10em; position: relative;">+ <label class="button primary block" for="single">+ {{ uploading ? "Uploading ..." : "Upload" }}+ </label>+ <input+ style="position: absolute; visibility: hidden;"+ type="file"+ id="single"+ accept="image/*"+ @change="uploadAvatar"+ :disabled="uploading"+ /></div>+ </div></template><script setup>-const props = defineProps(['path'])-const { path } = toRefs(props)+ const props = defineProps(['path'])+ const { path } = toRefs(props)-const emit = defineEmits(['update:path', 'upload'])+ const emit = defineEmits(['update:path', 'upload'])-const supabase = useSupabaseClient()+ const supabase = useSupabaseClient()-const uploading = ref(false)-const src = ref("")-const files = ref()-const downloadImage = async () => {+ const uploading = ref(false)+ const src = ref('')+ const files = ref()+ const downloadImage = async () => {try {- const { data, error } = await supabase.storage- .from("avatars")- .download(path.value)- if (error) throw error- src.value = URL.createObjectURL(data)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path.value)+ if (error) throw error+ src.value = URL.createObjectURL(data)} catch (error) {- console.error("Error downloading image: ", error.message)+ console.error('Error downloading image: ', error.message)}-}+ }-const uploadAvatar = async (evt) => {+ const uploadAvatar = async (evt) => {files.value = evt.target.filestry {- uploading.value = true- if (!files.value || files.value.length === 0) {- throw new Error("You must select an image to upload.")- }- const file = files.value[0]- const fileExt = file.name.split(".").pop()- const fileName = `${Math.random()}.${fileExt}`- const filePath = `${fileName}`- let { error: uploadError } = await supabase.storage- .from("avatars")- .upload(filePath, file)- if (uploadError) throw uploadError- emit("update:path", filePath)- emit("upload")+ uploading.value = true+ if (!files.value || files.value.length === 0) {+ throw new Error('You must select an image to upload.')+ }+ const file = files.value[0]+ const fileExt = file.name.split('.').pop()+ const fileName = `${Math.random()}.${fileExt}`+ const filePath = `${fileName}`+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)+ if (uploadError) throw uploadError+ emit('update:path', filePath)+ emit('upload')} catch (error) {- alert(error.message)+ alert(error.message)} finally {- uploading.value = false+ uploading.value = false}-}+ }-downloadImage()+ downloadImage()-watch(path, () => {+ watch(path, () => {if (path.value) {- downloadImage()+ downloadImage()}-})+ })</script>```@@ -447,94 +484,98 @@ And then we can add the widget to the Account page:```html title="components/Account.vue"<template>- <form class="form-widget" @submit.prevent="updateProfile">- <Avatar v-model:path="avatar_path" @upload="updateProfile" />- <div>- <label for="email">Email</label>- <input id="email" type="text" :value="user.email" disabled />- </div>- <div>- <label for="username">Name</label>- <input id="username" type="text" v-model="username" />- </div>- <div>- <label for="website">Website</label>- <input id="website" type="website" v-model="website" />- </div>-- <div>- <input type="submit" class="button block primary" :value="loading ? 'Loading ...' : 'Update'"- :disabled="loading" />- </div>-- <div>- <button class="button block" @click="signOut" :disabled="loading">- Sign Out- </button>- </div>- </form>+ <form class="form-widget" @submit.prevent="updateProfile">+ <Avatar v-model:path="avatar_path" @upload="updateProfile" />+ <div>+ <label for="email">Email</label>+ <input id="email" type="text" :value="user.email" disabled />+ </div>+ <div>+ <label for="username">Name</label>+ <input id="username" type="text" v-model="username" />+ </div>+ <div>+ <label for="website">Website</label>+ <input id="website" type="website" v-model="website" />+ </div>++ <div>+ <input+ type="submit"+ class="button primary block"+ :value="loading ? 'Loading ...' : 'Update'"+ :disabled="loading"+ />+ </div>++ <div>+ <button class="button block" @click="signOut" :disabled="loading">+ Sign Out+ </button>+ </div>+ </form></template><script setup>-const supabase = useSupabaseClient()--const loading = ref(true)-const username = ref('')-const website = ref('')-const avatar_path = ref('')---loading.value = true-const user = useUser();-let { data } = await supabase- .from('profiles')- .select(`username, website, avatar_url`)- .eq('id', user.value.id)- .single()-if (data) {- username.value = data.username- website.value = data.website- avatar_path.value = data.avatar_url-}-loading.value = false--async function updateProfile() {- try {- loading.value = true- const user = useUser();- const updates = {- id: user.value.id,- username: username.value,- website: website.value,- avatar_url: avatar_path.value,- updated_at: new Date(),- }- let { error } = await supabase.from('profiles').upsert(updates, {- returning: 'minimal', // Don't return the value after inserting- })- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false- }-}--async function signOut() {- try {- loading.value = true- let { error } = await supabase.auth.signOut()- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false- }-}+ const supabase = useSupabaseClient()++ const loading = ref(true)+ const username = ref('')+ const website = ref('')+ const avatar_path = ref('')+++ loading.value = true+ const user = useUser();+ let { data } = await supabase+ .from('profiles')+ .select(`username, website, avatar_url`)+ .eq('id', user.value.id)+ .single()+ if (data) {+ username.value = data.username+ website.value = data.website+ avatar_path.value = data.avatar_url+ }+ loading.value = false++ async function updateProfile() {+ try {+ loading.value = true+ const user = useUser();+ const updates = {+ id: user.value.id,+ username: username.value,+ website: website.value,+ avatar_url: avatar_path.value,+ updated_at: new Date(),+ }+ let { error } = await supabase.from('profiles').upsert(updates, {+ returning: 'minimal', // Don't return the value after inserting+ })+ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }+ }++ async function signOut() {+ try {+ loading.value = true+ let { error } = await supabase.auth.signOut()+ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }+ }</script>```-That is it! You should now be able to upload a profile photo to Supabase Storage.+That is it! You should now be able to upload a profile photo to Supabase Storage.## Next stepsdiff --git a/apps/reference/docs/guides/with-react.mdx b/apps/reference/docs/guides/with-react.mdxindex db22e129800..178036c4802 100644--- a/apps/reference/docs/guides/with-react.mdx+++ b/apps/reference/docs/guides/with-react.mdx@@ -73,7 +73,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -141,7 +146,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -215,10 +225,12 @@ export default function Auth() {}return (- <div className="row flex flex-center">+ <div className="row flex-center flex"><div className="col-6 form-widget" aria-live="polite"><h1 className="header">Supabase + React</h1>- <p className="description">Sign in via magic link with your email below</p>+ <p className="description">+ Sign in via magic link with your email below+ </p>{loading ? ('Sending magic link...') : (@@ -345,13 +357,17 @@ const Account = ({ session }) => {/></div><div>- <button className="button block primary" disabled={loading}>+ <button className="button primary block" disabled={loading}>Update profile</button></div></form>)}- <button type="button" className="button block" onClick={() => supabase.auth.signOut()}>+ <button+ type="button"+ className="button block"+ onClick={() => supabase.auth.signOut()}+ >Sign Out</button></div>@@ -385,7 +401,11 @@ export default function App() {return (<div className="container" style={{ padding: '50px 0 100px 0' }}>- {!session ? <Auth /> : <Account key={session.user.id} session={session} />}+ {!session ? (+ <Auth />+ ) : (+ <Account key={session.user.id} session={session} />+ )}</div>)}@@ -428,7 +448,9 @@ export default function Avatar({ url, size, onUpload }) {const downloadImage = async (path) => {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) {throw error}@@ -452,7 +474,9 @@ export default function Avatar({ url, size, onUpload }) {const fileName = `${Math.random()}.${fileExt}`const filePath = `${fileName}`- let { error: uploadError } = await supabase.storage.from('avatars').upload(filePath, file)+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)if (uploadError) {throw uploadError@@ -474,7 +498,9 @@ export default function Avatar({ url, size, onUpload }) {className="avatar image"style={{ height: size, width: size }}/>- {uploading ? "Uploading..." : (+ {uploading ? (+ 'Uploading...'+ ) : (<><label className="button primary block" htmlFor="single">Upload an avatardiff --git a/apps/reference/docs/guides/with-redwoodjs.mdx b/apps/reference/docs/guides/with-redwoodjs.mdxindex 7a46bb920db..792af09bd5b 100644--- a/apps/reference/docs/guides/with-redwoodjs.mdx+++ b/apps/reference/docs/guides/with-redwoodjs.mdx@@ -120,7 +120,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -194,7 +199,12 @@ We just need to get the URL as well as the `anon`, `service_role` and `JWT_SECRE3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -293,7 +303,10 @@ import { createClient } from '@supabase/supabase-js'// ...-const supabaseClient = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY)+const supabaseClient = createClient(+ process.env.SUPABASE_URL,+ process.env.SUPABASE_KEY+)const App = () => (<FatalErrorBoundary page={FatalErrorPage}>@@ -402,10 +415,12 @@ const Auth = () => {}return (- <div className="row flex flex-center">+ <div className="row flex-center flex"><div className="col-6 form-widget"><h1 className="header">Supabase + RedwoodJS</h1>- <p className="description">Sign in via magic link with your email below</p>+ <p className="description">+ Sign in via magic link with your email below+ </p><div><inputclassName="inputField"@@ -524,7 +539,7 @@ const Account = () => {}return (- <div className="row flex flex-center">+ <div className="row flex-center flex"><div className="col-6 form-widget"><h1 className="header">Supabase + RedwoodJS</h1><p className="description">Your profile</p>@@ -554,7 +569,7 @@ const Account = () => {<div><button- className="button block primary"+ className="button primary block"onClick={() => updateProfile({ username, website, avatar_url })}disabled={loading}>@@ -655,7 +670,9 @@ const Avatar = ({ url, size, onUpload }) => {async function downloadImage(path) {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) {throw error}@@ -679,7 +696,9 @@ const Avatar = ({ url, size, onUpload }) => {const fileName = `${Math.random()}.${fileExt}`const filePath = `${fileName}`- let { error: uploadError } = await supabase.storage.from('avatars').upload(filePath, file)+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)if (uploadError) {throw uploadError@@ -703,7 +722,10 @@ const Avatar = ({ url, size, onUpload }) => {style={{ height: size, width: size }}/>) : (- <div className="avatar no-image" style={{ height: size, width: size }} />+ <div+ className="avatar no-image"+ style={{ height: size, width: size }}+ />)}<div style={{ width: size }}><label className="button primary block" htmlFor="single">diff --git a/apps/reference/docs/guides/with-solidjs.mdx b/apps/reference/docs/guides/with-solidjs.mdxindex 953c44500e9..931de124084 100644--- a/apps/reference/docs/guides/with-solidjs.mdx+++ b/apps/reference/docs/guides/with-solidjs.mdx@@ -73,7 +73,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -141,7 +146,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">- <source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -214,10 +224,12 @@ export default function Auth() {}return (- <div className="row flex flex-center">+ <div className="row flex-center flex"><div className="col-6 form-widget" aria-live="polite"><h1 className="header">Supabase + SolidJS</h1>- <p className="description">Sign in via magic link with your email below</p>+ <p className="description">+ Sign in via magic link with your email below+ </p>{loading() ? ('Sending magic link...') : (@@ -345,13 +357,21 @@ const Account = (props) => {/></div><div>- <button type="submit" className="button block primary" disabled={loading()}>+ <button+ type="submit"+ className="button primary block"+ disabled={loading()}+ >Update profile</button></div></form>)}- <button type="button" className="button block" onClick={() => supabase.auth.signOut()}>+ <button+ type="button"+ className="button block"+ onClick={() => supabase.auth.signOut()}+ >Sign Out</button></div>@@ -385,7 +405,11 @@ export default () => {return (<div className="container" style={{ padding: '50px 0 100px 0' }}>- {!session() ? <Auth /> : <Account key={session().user.id} session={session()} />}+ {!session() ? (+ <Auth />+ ) : (+ <Account key={session().user.id} session={session()} />+ )}</div>)}@@ -423,7 +447,9 @@ export default (props) => {const downloadImage = async (path) => {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) {throw error}@@ -447,7 +473,9 @@ export default (props) => {const fileName = `${Math.random()}.${fileExt}`const filePath = `${fileName}`- let { error: uploadError } = await supabase.storage.from('avatars').upload(filePath, file)+ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)if (uploadError) {throw uploadError@@ -464,7 +492,11 @@ export default (props) => {return (<div style={{ width: props.size }} aria-live="polite"><img- src={avatarUrl() ? avatarUrl() : `https://place-hold.it/${props.size}x${props.size}`}+ src={+ avatarUrl()+ ? avatarUrl()+ : `https://place-hold.it/${props.size}x${props.size}`+ }alt={avatarUrl() ? 'Avatar' : 'No image'}className="avatar image"style={{ height: props.size, width: props.size }}diff --git a/apps/reference/docs/guides/with-svelte.mdx b/apps/reference/docs/guides/with-svelte.mdxindex b1f5c3463ec..cdba2019e3f 100644--- a/apps/reference/docs/guides/with-svelte.mdx+++ b/apps/reference/docs/guides/with-svelte.mdx@@ -1,14 +1,14 @@---id: with-svelte-title: "Quickstart: Svelte"+title: 'Quickstart: Svelte'description: Learn how to use Supabase in your Svelte App.sidebar_label: Svelte----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-## Intro+## IntroThis example provides the steps to build a simple user management app (from scratch!) using Supabase and Svelte. It includes:@@ -23,24 +23,24 @@ By the end of this guide you'll have an app which allows users to login and upda### GitHub+Whenever you get stuck at any point, take a look at [this repo](https://github.com/yustarandomname/svelte-supabase-quickstart).## Project set up-Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase+Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabaseand then creating a "schema" inside the database.-### Create a project+### Create a project1. Go to [app.supabase.com](https://app.supabase.com).1. Click on "New Project".1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schema-Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,+Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,or you can just copy/paste the SQL from below and run it yourself.<Tabs@@ -56,7 +56,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -114,11 +119,9 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>+### Get the API Keys-### Get the API Keys---Now that you've created some database tables, you are ready to insert data using the auto-generated API.+Now that you've created some database tables, you are ready to insert data using the auto-generated API.We just need to get the URL and `anon` key from the API settings.1. Go to the [Settings](https://app.supabase.com/project/_/settings) page in the Dashboard.@@ -126,7 +129,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -135,7 +143,7 @@ Let's start building the Svelte app from scratch.### Initialize a Svelte app-We can use the [Quickstart Svelte Template](https://svelte.dev/blog/the-easiest-way-to-get-started) to initialize+We can use the [Quickstart Svelte Template](https://svelte.dev/blog/the-easiest-way-to-get-started) to initializean app called `supabase-svelte`:```bash@@ -149,7 +157,7 @@ Then let's install the only additional dependency: [supabase-js](https://github.npm install @supabase/supabase-js```-And finally we want to save the environment variables in a `.env`.+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).```bash title=".env"@@ -158,7 +166,7 @@ SVELTE_APP_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY```Our app is almost functional, to make svelte work with supabase and .env files we first need to change the `rollup.config.js` file a bit.-Supabase imports `json` files, to convert .json files to ES6 modules we need the `@rollup/plugin-json` install it by running:+Supabase imports `json` files, to convert .json files to ES6 modules we need the `@rollup/plugin-json` install it by running:```bashnpm install --save-dev @rollup/plugin-json@@ -173,26 +181,26 @@ Furthermore, to use the .env with svelte we need another rollup plugin. Install:and add these plugins to the `rollup.config.js` file.```js title="rollup.config.js"- import { config } from 'dotenv';- import replace from '@rollup/plugin-replace';- import json from '@rollup/plugin-json'+import { config } from 'dotenv'+import replace from '@rollup/plugin-replace'+import json from '@rollup/plugin-json'- export default {- plugins: [+export default {+ plugins: [replace({- __api: JSON.stringify({- env: {- isProd: production,- ...config().parsed // attached the .env config- }- }),- delimiters: ['', '']- }),- json(),+ __api: JSON.stringify({+ env: {+ isProd: production,+ ...config().parsed, // attached the .env config+ },+ }),+ delimiters: ['', ''],+ }),+ json(),// ...- ],- // ...- }+ ],+ // ...+}```Now that we have the API credentials in place, let's create a helper file to initialize the Supabase client. These variables will be exposed@@ -207,7 +215,7 @@ const supabaseAnonKey = __api.env.SVELTE_APP_SUPABASE_ANON_KEYexport const supabase = createClient(supabaseUrl, supabaseAnonKey)```-And one optional step is to update the CSS file `public/global.css` to make the app look nice.+And one optional step is to update the CSS file `public/global.css` to make the app look nice.You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/react-user-management/src/index.css).### Set up a Login component@@ -216,10 +224,10 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic L```html title="/src/Auth.svelte"<script>- import {supabase} from "./supabaseClient"+ import { supabase } from './supabaseClient'let loading = false- let email;+ let emailconst handleLogin = async () => {try {@@ -235,7 +243,7 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic L}</script>-<form class="row flex flex-center" on:submit|preventDefault={handleLogin}>+<form class="row flex-center flex" on:submit|preventDefault="{handleLogin}"><div class="col-6 form-widget"><h1 class="header">Supabase + Svelte</h1><p class="description">Sign in via magic link with your email below</p>@@ -244,25 +252,27 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic Lclass="inputField"type="email"placeholder="Your email"- bind:value={email}+ bind:value="{email}"/></div><div>- <input type="submit" class='button block' value={loading ? "Loading" : "Send magic link"} disabled={loading} />+ <input type="submit" class='button block' value={loading ? "Loading" :+ "Send magic link"} disabled={loading} /></div></div></form>```### User store+To access the user information in other places, we use a writable store. Create a new file called `sessionStore.js`+```javascript title="src/sessionStore.js"-import { writable } from 'svelte/store';+import { writable } from 'svelte/store'-export const user = writable(false);+export const user = writable(false)```-### Account pageAfter a user is signed in we can allow them to edit their profile details and manage their account.@@ -338,70 +348,64 @@ Let's create a new component for that called `Profile.svelte`.} finally {loading = false}-}</script>-<form use:getProfile class="form-widget" on:submit|preventDefault={updateProfile}>+<form+ use:getProfile+ class="form-widget"+ on:submit|preventDefault="{updateProfile}"+><div><label for="email">Email</label>- <input id="email" type="text" value={$user.email} disabled />+ <input id="email" type="text" value="{$user.email}" disabled /></div><div><label for="username">Name</label>- <input- id="username"- type="text"- bind:value={username}- />+ <input id="username" type="text" bind:value="{username}" /></div><div><label for="website">Website</label>- <input- id="website"- type="website"- bind:value={website}- />+ <input id="website" type="website" bind:value="{website}" /></div><div>- <input type="submit" class="button block primary" value={loading ? 'Loading ...' : 'Update'} disabled={loading}/>+ <input type="submit" class="button block primary" value={loading ? 'Loading+ ...' : 'Update'} disabled={loading}/></div><div>- <button class="button block" on:click={signOut} disabled={loading}>+ <button class="button block" on:click="{signOut}" disabled="{loading}">Sign Out</button></div></form>```--### Launch!Now that we have all the components in place, let's update `App.svelte`:```html title="src/App.svelte"<script>- import {user} from "./sessionStore"- import {supabase} from "./supabaseClient"- import Auth from "./Auth.svelte"- import Profile from "./Profile.svelte"+ import { user } from './sessionStore'+ import { supabase } from './supabaseClient'+ import Auth from './Auth.svelte'+ import Profile from './Profile.svelte'- user.set(supabase.auth.user())+ user.set(supabase.auth.user())- supabase.auth.onAuthStateChange((state, session) => {- user.set(state === 'SIGNED_IN' && session.user)- })+ supabase.auth.onAuthStateChange((state, session) => {+ user.set(state === 'SIGNED_IN' && session.user)+ })</script><div class="container" style="padding: 50px 0 100px 0;">- {#if $user}- <Profile />- {:else}- <Auth />- {/if}+ {#if $user}+ <Profile />+ {:else}+ <Auth />+ {/if}</div>```@@ -427,23 +431,25 @@ Let's create an avatar for the user so that they can upload a profile photo. We```html title="src/Avatar.svelte"<script>- import { createEventDispatcher } from 'svelte';+ import { createEventDispatcher } from 'svelte'import { supabase } from './supabaseClient'- export let path;- export let size = "10em"+ export let path+ export let size = '10em'let uploading = false- let src;- let files;+ let src+ let files- const dispatch = createEventDispatcher();+ const dispatch = createEventDispatcher()async function downloadImage() {try {- const { data, error } = await supabase.storage.from('avatars').download(path)+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path)if (error) throw error-+src = URL.createObjectURL(data)} catch (error) {console.error('Error downloading image: ', error.message)@@ -468,7 +474,7 @@ Let's create an avatar for the user so that they can upload a profile photo. We.upload(filePath, file)if (uploadError) throw uploadError-+path = filePathdispatch('upload')} catch (error) {@@ -481,16 +487,17 @@ Let's create an avatar for the user so that they can upload a profile photo. We<div>{#if path}- <img use:downloadImage- {src}- alt="Avatar"- class="avatar image"- style="height: {size}; width: {size};"- />+ <img+ use:downloadImage+ {src}+ alt="Avatar"+ class="avatar image"+ style="height: {size}; width: {size};"+ />{:else}- <div class="avatar no-image" style="height: {size}; width: {size};" />+ <div class="avatar no-image" style="height: {size}; width: {size};" />{/if}-+<div style="width: {size};"><label class="button primary block" for="single">{uploading ? 'Uploading ...' : 'Upload'}@@ -501,32 +508,33 @@ Let's create an avatar for the user so that they can upload a profile photo. Weid="single"accept="image/*"bind:files- on:change={uploadAvatar}- disabled={uploading}+ on:change="{uploadAvatar}"+ disabled="{uploading}"/></div></div>```-### Add the new widgetAnd then we can add the widget to the Account page:-```html title="src/Profile.svelte"<script>// Import the new componentimport Avatar from './Avatar.svelte'</script>-<form use:getProfile class="form-widget" on:submit|preventDefault={updateProfile}>+<form+ use:getProfile+ class="form-widget"+ on:submit|preventDefault="{updateProfile}"+><!-- Add to body -->- <Avatar bind:path={avatar_url} on:upload={updateProfile} />+ <Avatar bind:path="{avatar_url}" on:upload="{updateProfile}" /><!-- Other form elements --></form>-```## Next stepsdiff --git a/apps/reference/docs/guides/with-sveltekit.mdx b/apps/reference/docs/guides/with-sveltekit.mdxindex ddf83b7f853..47d16fe4fda 100644--- a/apps/reference/docs/guides/with-sveltekit.mdx+++ b/apps/reference/docs/guides/with-sveltekit.mdx@@ -1,14 +1,14 @@---id: with-sveltekit-title: "Quickstart: SvelteKit"+title: 'Quickstart: SvelteKit'description: Learn how to use Supabase in your SvelteKit App.sidebar_label: SvelteKit----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-## Intro+## IntroThis example provides the steps to build a simple user management app (from scratch!) using Supabase and Svelte. It includes:@@ -23,24 +23,24 @@ By the end of this guide you'll have an app which allows users to login and upda### Github+Whenever you get stuck at any point, take a look at [this repo](https://github.com/yustarandomname/svelte-supabase-quickstart).## Project set up-Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase+Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabaseand then creating a "schema" inside the database.-### Create a project+### Create a project1. Go to [app.supabase.com](https://app.supabase.com).1. Click on "New Project".1. Enter your project details.1. Wait for the new project to launch.-### Set up the database schema-Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,+Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,or you can just copy/paste the SQL from below and run it yourself.<Tabs@@ -56,7 +56,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -114,11 +119,9 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>+### Get the API Keys-### Get the API Keys---Now that you've created some database tables, you are ready to insert data using the auto-generated API.+Now that you've created some database tables, you are ready to insert data using the auto-generated API.We just need to get the URL and `anon` key from the API settings.1. Go to the [Settings](https://app.supabase.com/project/_/settings) page in the Dashboard.@@ -126,7 +129,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -135,7 +143,7 @@ Let's start building the Svelte app from scratch.### Initialize a Svelte app-We can use the [SvelteKit Skeleton Project](https://kit.svelte.dev/docs) to initialize+We can use the [SvelteKit Skeleton Project](https://kit.svelte.dev/docs) to initializean app called `supabase-sveltekit` (for this tutorial you do not need TypeScript, ESLint, Prettier, or Playwright):```bash@@ -150,7 +158,7 @@ Then let's install the only additional dependency: [supabase-js](https://github.npm install @supabase/supabase-js```-And finally we want to save the environment variables in a `.env`.+And finally we want to save the environment variables in a `.env`.All we need are the `SUPABASE_URL` and the `SUPABASE_KEY` key that you copied [earlier](#get-the-api-keys).```bash title=".env"@@ -170,7 +178,7 @@ const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEYexport const supabase = createClient(supabaseUrl, supabaseAnonKey)```-And one optional step is to update the CSS file `public/global.css` to make the app look nice.+And one optional step is to update the CSS file `public/global.css` to make the app look nice.You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/react-user-management/src/index.css).### Set up a Login component@@ -179,10 +187,10 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic L```html title="lib/Auth.svelte"<script>- import {supabase} from "$lib/supabaseClient"+ import { supabase } from '$lib/supabaseClient'let loading = false- let email;+ let emailconst handleLogin = async () => {try {@@ -198,7 +206,7 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic L}</script>-<form class="row flex flex-center" on:submit|preventDefault={handleLogin}>+<form class="row flex-center flex" on:submit|preventDefault="{handleLogin}"><div class="col-6 form-widget"><h1 class="header">Supabase + Svelte</h1><p class="description">Sign in via magic link with your email below</p>@@ -207,25 +215,27 @@ Let's set up a Svelte component to manage logins and sign ups. We'll use Magic Lclass="inputField"type="email"placeholder="Your email"- bind:value={email}+ bind:value="{email}"/></div><div>- <input type="submit" class='button block' value={loading ? "Loading" : "Send magic link"} disabled={loading} />+ <input type="submit" class='button block' value={loading ? "Loading" :+ "Send magic link"} disabled={loading} /></div></div></form>```### User store+To access the user information in other places, we use a writable store. Create a new file called `sessionStore.js`+```javascript title="lib/sessionStore.js"import { writable } from 'svelte/store'export const user = writable(false)```-### Account pageAfter a user is signed in we can allow them to edit their profile details and manage their account.@@ -301,70 +311,65 @@ Let's create a new component for that called `Profile.svelte`.} finally {loading = false}-+}</script>-<form use:getProfile class="form-widget" on:submit|preventDefault={updateProfile}>+<form+ use:getProfile+ class="form-widget"+ on:submit|preventDefault="{updateProfile}"+><div><label for="email">Email</label>- <input id="email" type="text" value={$user.email} disabled />+ <input id="email" type="text" value="{$user.email}" disabled /></div><div><label for="username">Name</label>- <input- id="username"- type="text"- bind:value={username}- />+ <input id="username" type="text" bind:value="{username}" /></div><div><label for="website">Website</label>- <input- id="website"- type="website"- bind:value={website}- />+ <input id="website" type="website" bind:value="{website}" /></div><div>- <input type="submit" class="button block primary" value={loading ? 'Loading ...' : 'Update'} disabled={loading}/>+ <input type="submit" class="button block primary" value={loading ? 'Loading+ ...' : 'Update'} disabled={loading}/></div><div>- <button class="button block" on:click={signOut} disabled={loading}>+ <button class="button block" on:click="{signOut}" disabled="{loading}">Sign Out</button></div></form>```--### Launch!Now that we have all the components in place, let's update `src/routes/index.svelte`:```html title="src/routes/index.svelte"<script>- import {user} from "$lib/sessionStore"- import {supabase} from "$lib/supabaseClient"- import Auth from "$lib/Auth.svelte"- import Profile from "$lib/Profile.svelte"+ import { user } from '$lib/sessionStore'+ import { supabase } from '$lib/supabaseClient'+ import Auth from '$lib/Auth.svelte'+ import Profile from '$lib/Profile.svelte'- user.set(supabase.auth.user())+ user.set(supabase.auth.user())- supabase.auth.onAuthStateChange((_, session) => {- user.set(session.user)- })+ supabase.auth.onAuthStateChange((_, session) => {+ user.set(session.user)+ })</script><div class="container" style="padding: 50px 0 100px 0;">- {#if $user}- <Profile />- {:else}- <Auth />- {/if}+ {#if $user}+ <Profile />+ {:else}+ <Auth />+ {/if}</div>```@@ -391,26 +396,26 @@ Let's create an avatar for the user so that they can upload a profile photo. Weimport { createEventDispatcher } from 'svelte'import { supabase } from '$lib/supabaseClient'- export let path;- export let size = "10em"+ export let path+ export let size = '10em'let uploading = false- let src;- let files;+ let src+ let files- const dispatch = createEventDispatcher();+ const dispatch = createEventDispatcher()function downloadImage() {supabase.storage- .from("avatars")+ .from('avatars').download(path).then(({ data, error }) => {- if (error) throw error;- src = URL.createObjectURL(data);+ if (error) throw error+ src = URL.createObjectURL(data)}).catch((error) =>- console.error("Error downloading image: ", error.message)- );+ console.error('Error downloading image: ', error.message)+ )}async function uploadAvatar() {@@ -431,7 +436,7 @@ Let's create an avatar for the user so that they can upload a profile photo. We.upload(filePath, file)if (uploadError) throw uploadError-+path = filePathdispatch('upload')} catch (error) {@@ -444,16 +449,17 @@ Let's create an avatar for the user so that they can upload a profile photo. We<div>{#if path}- <img use:downloadImage- {src}- alt="Avatar"- class="avatar image"- style="height: {size}; width: {size};"- />+ <img+ use:downloadImage+ {src}+ alt="Avatar"+ class="avatar image"+ style="height: {size}; width: {size};"+ />{:else}- <div class="avatar no-image" style="height: {size}; width: {size};" />+ <div class="avatar no-image" style="height: {size}; width: {size};" />{/if}-+<div style="width: {size};"><label class="button primary block" for="single">{uploading ? 'Uploading ...' : 'Upload'}@@ -464,32 +470,33 @@ Let's create an avatar for the user so that they can upload a profile photo. Weid="single"accept="image/*"bind:files- on:change={uploadAvatar}- disabled={uploading}+ on:change="{uploadAvatar}"+ disabled="{uploading}"/></div></div>```-### Add the new widgetAnd then we can add the widget to the Account page:-```html title="$lib/Profile.svelte"<script>// Import the new componentimport Avatar from '$lib/Avatar.svelte'</script>-<form use:getProfile class="form-widget" on:submit|preventDefault={updateProfile}>+<form+ use:getProfile+ class="form-widget"+ on:submit|preventDefault="{updateProfile}"+><!-- Add to body -->- <Avatar bind:path={avatar_url} on:upload={updateProfile} />+ <Avatar bind:path="{avatar_url}" on:upload="{updateProfile}" /><!-- Other form elements --></form>-```## Next stepsdiff --git a/apps/reference/docs/guides/with-vue-3.mdx b/apps/reference/docs/guides/with-vue-3.mdxindex c954e23927f..329733680b7 100644--- a/apps/reference/docs/guides/with-vue-3.mdx+++ b/apps/reference/docs/guides/with-vue-3.mdx@@ -1,14 +1,14 @@---id: with-vue-3-title: "Quickstart: Vue 3"+title: 'Quickstart: Vue 3'description: Learn how to use Supabase in your Vue 3 App.-sidebar_label: "Vue 3"+sidebar_label: 'Vue 3'----import Tabs from '@theme/Tabs';-import TabItem from '@theme/TabItem';+import Tabs from '@theme/Tabs'+import TabItem from '@theme/TabItem'-## Intro+## IntroThis example provides the steps to build a simple user management app (from scratch!) using Supabase and Vue 3. It includes:@@ -23,24 +23,24 @@ By the end of this guide you'll have an app which allows users to login and upda### GitHub+Whenever you get stuck at any point, take a look at [this repo](https://github.com/zernonia/supabase-vue-3).## Project set up-Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabase+Before we start building we're going to set up our Database and API. This is as simple as starting a new Project in Supabaseand then creating a "schema" inside the database.-### Create a project+### Create a project1. Go to [app.supabase.com](https://app.supabase.com).1. Click on "New Project".1. Enter your project details.1. Wait for the new database to launch.-### Set up the database schema-Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,+Now we are going to set up the database schema. We can use the "User Management Starter" quickstart in the SQL Editor,or you can just copy/paste the SQL from below and run it yourself.<Tabs@@ -56,7 +56,12 @@ or you can just copy/paste the SQL from below and run it yourself.3. Click **Run**.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/sql-user-management-starter.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/sql-user-management-starter.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video></TabItem>@@ -114,11 +119,9 @@ create policy "Anyone can upload an avatar."</TabItem></Tabs>+### Get the API Keys-### Get the API Keys---Now that you've created some database tables, you are ready to insert data using the auto-generated API.+Now that you've created some database tables, you are ready to insert data using the auto-generated API.We just need to get the URL and `anon` key from the API settings.1. Go to the [Settings](https://app.supabase.com/project/_/settings) page in the Dashboard.@@ -126,7 +129,12 @@ We just need to get the URL and `anon` key from the API settings.3. Find your API `URL`, `anon`, and `service_role` keys on this page.<video width="99%" muted playsInline controls="true">-<source src="/docs/videos/api/api-url-and-key.mp4" type="video/mp4" muted playsInline />+ <source+ src="/docs/videos/api/api-url-and-key.mp4"+ type="video/mp4"+ muted+ playsInline+ /></video>## Building the App@@ -154,7 +162,7 @@ Then let's install the only additional dependency: [supabase-js](https://github.npm install @supabase/supabase-js```-And finally we want to save the environment variables in a `.env`.+And finally we want to save the environment variables in a `.env`.All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).```bash title=".env"@@ -174,26 +182,24 @@ const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEYexport const supabase = createClient(supabaseUrl, supabaseAnonKey)```-And one optional step is to update the CSS file `src/assets/main.css` to make the app look nice.+And one optional step is to update the CSS file `src/assets/main.css` to make the app look nice.You can find the full contents of this file [here](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/react-user-management/src/index.css).```javascript title="src/main.js"-import { createApp } from "vue"-import App from "./App.vue"-import "./assets/main.css"+import { createApp } from 'vue'+import App from './App.vue'+import './assets/main.css'-createApp(App).mount("#app")+createApp(App).mount('#app')```--### Set up a Login componentLet's set up a Vue component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords.```html title="/src/components/Auth.vue"<template>- <form class="row flex flex-center" @submit.prevent="handleLogin">+ <form class="row flex-center flex" @submit.prevent="handleLogin"><div class="col-6 form-widget"><h1 class="header">Supabase + Vue 3</h1><p class="description">Sign in via magic link with your email below</p>@@ -218,48 +224,49 @@ Let's set up a Vue component to manage logins and sign ups. We'll use Magic Link</template><script>-import { ref } from "vue"-import { supabase } from "../supabase"--export default {- setup() {- const loading = ref(false)- const email = ref("")-- const handleLogin = async () => {- try {- loading.value = true- const { error } = await supabase.auth.signIn({ email: email.value })- if (error) throw error- alert("Check your email for the login link!")- } catch (error) {- alert(error.error_description || error.message)- } finally {- loading.value = false+ import { ref } from 'vue'+ import { supabase } from '../supabase'++ export default {+ setup() {+ const loading = ref(false)+ const email = ref('')++ const handleLogin = async () => {+ try {+ loading.value = true+ const { error } = await supabase.auth.signIn({ email: email.value })+ if (error) throw error+ alert('Check your email for the login link!')+ } catch (error) {+ alert(error.error_description || error.message)+ } finally {+ loading.value = false+ }}- }-- return {- loading,- email,- handleLogin,- }- },-}++ return {+ loading,+ email,+ handleLogin,+ }+ },+ }</script>```### User store+To access the user information in other places, we use a reactive store. Create a new file called `store.js` and utilize Vue 3 `reactive` functionalities.+```javascript title="src/store.js"-import { reactive } from "vue"+import { reactive } from 'vue'export const store = reactive({user: {},})```-### Account pageAfter a user is signed in we can allow them to edit their profile details and manage their account.@@ -284,7 +291,7 @@ Let's create a new component for that called `Profile.vue`.<div><inputtype="submit"- class="button block primary"+ class="button primary block":value="loading ? 'Loading ...' : 'Update'":disabled="loading"/>@@ -299,100 +306,97 @@ Let's create a new component for that called `Profile.vue`.</template><script>-import { supabase } from "../supabase"-import { store } from "../store"-import { onMounted, ref } from "vue"--export default {- setup() {- const loading = ref(true)- const username = ref("")- const website = ref("")- const avatar_url = ref("")-- async function getProfile() {- try {- loading.value = true- store.user = supabase.auth.user()-- let { data, error, status } = await supabase- .from("profiles")- .select(`username, website, avatar_url`)- .eq("id", store.user.id)- .single()-- if (error && status !== 406) throw error-- if (data) {- username.value = data.username- website.value = data.website- avatar_url.value = data.avatar_url+ import { supabase } from '../supabase'+ import { store } from '../store'+ import { onMounted, ref } from 'vue'++ export default {+ setup() {+ const loading = ref(true)+ const username = ref('')+ const website = ref('')+ const avatar_url = ref('')++ async function getProfile() {+ try {+ loading.value = true+ store.user = supabase.auth.user()++ let { data, error, status } = await supabase+ .from('profiles')+ .select(`username, website, avatar_url`)+ .eq('id', store.user.id)+ .single()++ if (error && status !== 406) throw error++ if (data) {+ username.value = data.username+ website.value = data.website+ avatar_url.value = data.avatar_url+ }+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false}- } catch (error) {- alert(error.message)- } finally {- loading.value = false}- }-- async function updateProfile() {- try {- loading.value = true- store.user = supabase.auth.user()-- const updates = {- id: store.user.id,- username: username.value,- website: website.value,- avatar_url: avatar_url.value,- updated_at: new Date(),- }-- let { error } = await supabase.from("profiles").upsert(updates, {- returning: "minimal", // Don't return the value after inserting- })- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false+ async function updateProfile() {+ try {+ loading.value = true+ store.user = supabase.auth.user()++ const updates = {+ id: store.user.id,+ username: username.value,+ website: website.value,+ avatar_url: avatar_url.value,+ updated_at: new Date(),+ }++ let { error } = await supabase.from('profiles').upsert(updates, {+ returning: 'minimal', // Don't return the value after inserting+ })++ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }}- }-- async function signOut() {- try {- loading.value = true- let { error } = await supabase.auth.signOut()- if (error) throw error- } catch (error) {- alert(error.message)- } finally {- loading.value = false++ async function signOut() {+ try {+ loading.value = true+ let { error } = await supabase.auth.signOut()+ if (error) throw error+ } catch (error) {+ alert(error.message)+ } finally {+ loading.value = false+ }}- }-- onMounted(() => {- getProfile()- })-- return {- store,- loading,- username,- website,- avatar_url,-- updateProfile,- signOut,- }- },-}-</script>-```+ onMounted(() => {+ getProfile()+ })+ return {+ store,+ loading,+ username,+ website,+ avatar_url,+ updateProfile,+ signOut,+ }+ },+ }+</script>+```### Launch!@@ -407,30 +411,29 @@ Now that we have all the components in place, let's update `App.vue`:</template><script>-import { store } from "./store"-import { supabase } from "./supabase"-import Auth from "./components/Auth.vue"-import Profile from "./components/Profile.vue"--export default {- components: {- Auth,- Profile,- },-- setup() {- store.user = supabase.auth.user()- supabase.auth.onAuthStateChange((_, session) => {- store.user = session.user- })-- return {- store,- }- },-}+ import { store } from './store'+ import { supabase } from './supabase'+ import Auth from './components/Auth.vue'+ import Profile from './components/Profile.vue'++ export default {+ components: {+ Auth,+ Profile,+ },++ setup() {+ store.user = supabase.auth.user()+ supabase.auth.onAuthStateChange((_, session) => {+ store.user = session.user+ })++ return {+ store,+ }+ },+ }</script>-```Once that's done, run this in a terminal window:@@ -484,83 +487,81 @@ Let's create an avatar for the user so that they can upload a profile photo. We</template><script>-import { ref, toRefs, watch } from "vue"-import { supabase } from "../supabase"--export default {- props: {- path: String,- },- emits: ["upload", "update:path"],- setup(prop, { emit }) {- const { path } = toRefs(prop)- const size = ref("10em")- const uploading = ref(false)- const src = ref("")- const files = ref()-- const downloadImage = async () => {- try {- const { data, error } = await supabase.storage- .from("avatars")- .download(path.value)- if (error) throw error- src.value = URL.createObjectURL(data)- } catch (error) {- console.error("Error downloading image: ", error.message)+ import { ref, toRefs, watch } from 'vue'+ import { supabase } from '../supabase'++ export default {+ props: {+ path: String,+ },+ emits: ['upload', 'update:path'],+ setup(prop, { emit }) {+ const { path } = toRefs(prop)+ const size = ref('10em')+ const uploading = ref(false)+ const src = ref('')+ const files = ref()++ const downloadImage = async () => {+ try {+ const { data, error } = await supabase.storage+ .from('avatars')+ .download(path.value)+ if (error) throw error+ src.value = URL.createObjectURL(data)+ } catch (error) {+ console.error('Error downloading image: ', error.message)+ }}- }-- const uploadAvatar = async (evt) => {- files.value = evt.target.files- try {- uploading.value = true- if (!files.value || files.value.length === 0) {- throw new Error("You must select an image to upload.")++ const uploadAvatar = async (evt) => {+ files.value = evt.target.files+ try {+ uploading.value = true+ if (!files.value || files.value.length === 0) {+ throw new Error('You must select an image to upload.')+ }++ const file = files.value[0]+ const fileExt = file.name.split('.').pop()+ const fileName = `${Math.random()}.${fileExt}`+ const filePath = `${fileName}`++ let { error: uploadError } = await supabase.storage+ .from('avatars')+ .upload(filePath, file)++ if (uploadError) throw uploadError+ emit('update:path', filePath)+ emit('upload')+ } catch (error) {+ alert(error.message)+ } finally {+ uploading.value = false}+ }++ watch(path, () => {+ if (path.value) downloadImage()+ })++ return {+ size,+ uploading,+ src,+ files,- const file = files.value[0]- const fileExt = file.name.split(".").pop()- const fileName = `${Math.random()}.${fileExt}`- const filePath = `${fileName}`-- let { error: uploadError } = await supabase.storage- .from("avatars")- .upload(filePath, file)-- if (uploadError) throw uploadError- emit("update:path", filePath)- emit("upload")- } catch (error) {- alert(error.message)- } finally {- uploading.value = false+ uploadAvatar,}- }-- watch(path, () => {- if (path.value) downloadImage()- })-- return {- size,- uploading,- src,- files,-- uploadAvatar,- }- },-}+ },+ }</script>```-### Add the new widgetAnd then we can add the widget to the Account page:-```html title="src/Profile.vue"<template><form class="form-widget" @submit.prevent="updateProfile">@@ -574,8 +575,8 @@ And then we can add the widget to the Account page:<script>// Import the new componentimport Avatar from './Avatar.vue'-- //++ //components: {Avatar,}diff --git a/apps/reference/docs/handbook/contributing.mdx b/apps/reference/docs/handbook/contributing.mdxindex e6ad5dfa399..9fcb1875166 100644--- a/apps/reference/docs/handbook/contributing.mdx+++ b/apps/reference/docs/handbook/contributing.mdx@@ -9,11 +9,12 @@ import Sponsors from '@site/src/components/Sponsors'## How to contributeSupabase has many [open source repos](https://github.com/orgs/supabase/repositories). Some of the more popular ones are:- - [Supabase](https://github.com/supabase/supabase) - Our Dashboard, Websites, and example apps- - [Supabase-js](https://github.com/supabase/supabase-js) - A clientside library written in Typescript- - [Gotrue](https://github.com/supabase/gotrue) - Our auth server, written in Go- - [Realtime](https://github.com/supabase/realtime) - A server for streaming changes from Postgres, written in Elixir- - [browse all](https://github.com/orgs/supabase/repositories)++- [Supabase](https://github.com/supabase/supabase) - Our Dashboard, Websites, and example apps+- [Supabase-js](https://github.com/supabase/supabase-js) - A clientside library written in Typescript+- [Gotrue](https://github.com/supabase/gotrue) - Our auth server, written in Go+- [Realtime](https://github.com/supabase/realtime) - A server for streaming changes from Postgres, written in Elixir+- [browse all](https://github.com/orgs/supabase/repositories)Want to contribute? Why not jump into our GitHub repo and:@@ -26,7 +27,6 @@ Want to contribute? Why not jump into our GitHub repo and:- Try our products and give feedback.- Spread the word if you like what we are doing.-## Sponsors-<Sponsors />\ No newline at end of file+<Sponsors />diff --git a/apps/reference/docs/handbook/introduction.mdx b/apps/reference/docs/handbook/introduction.mdxindex 69d9bb2bcae..091ad734753 100644--- a/apps/reference/docs/handbook/introduction.mdx+++ b/apps/reference/docs/handbook/introduction.mdx@@ -6,10 +6,10 @@ description: 'The Supabase public handbook and manifesto'Supabase is thinking in public. Everything is online, no matter how raw the current state of things.-This is our public handbook and manifesto. We are completely opensource and this means that you, our users, are also our team members.+This is our public handbook and manifesto. We are completely opensource and this means that you, our users, are also our team members.---## Opensource-Wherever we can we will support existing opensource tools and libraries.+Wherever we can we will support existing opensource tools and libraries.diff --git a/apps/reference/docs/handbook/supasquad.mdx b/apps/reference/docs/handbook/supasquad.mdxindex 90d66f74820..f1a261ec445 100644--- a/apps/reference/docs/handbook/supasquad.mdx+++ b/apps/reference/docs/handbook/supasquad.mdx@@ -39,7 +39,7 @@ Write guest blog posts, create documentation, and help Supabase global expansion### Moderator-Help us maintain the community guidelines in our GitHub and Community-led communities such as [Discord](https://discord.supabase.com), [Reddit](https://reddit.com/r/Supabase/),+Help us maintain the community guidelines in our GitHub and Community-led communities such as [Discord](https://discord.supabase.com), [Reddit](https://reddit.com/r/Supabase/),[StackOverflow](https://stackoverflow.com/questions/tagged/supabase), etc.## Benefits for SupaSquad members@@ -58,26 +58,35 @@ Help us maintain the community guidelines in our GitHub and Community-led commun## How to join-1. Apply to join the program using [this form](https://airtable.com/shr0FtLqLfhpuEya8).2. We will start taking interviewing members from `1 September 2021`.3. Entry is capped to 20 founding members so we can grow the community at a healthy pace and provide a great experience to all new users.4. Membership is valid for one year, and can be renewed every year.-## FAQs<details>- <summary><i>Why are you only admitting 20 new members?</i></summary>- The entire Supabase team is only 20 people, so as you can imagine adding another 20 people sounds like a lot to us! We wish we could admit everyone who wanted to join.- But we also want to make sure everyone who joins the Squad has an awesome experience. In the future we will probably expand the intake to include a monthly quota.+ <summary>+ <i>Why are you only admitting 20 new members?</i>+ </summary>+ The entire Supabase team is only 20 people, so as you can imagine adding another+ 20 people sounds like a lot to us! We wish we could admit everyone who wanted to+ join. But we also want to make sure everyone who joins the Squad has an awesome+ experience. In the future we will probably expand the intake to include a monthly+ quota.</details><details>- <summary><i>What is expected?</i></summary>- Mostly just enthusiasm. If you are interested in Open Source and want to get involved, the SupaSquad program is a great channel. You'll be given opportunities to contribute- to the community in whatever ways match your skillset.+ <summary>+ <i>What is expected?</i>+ </summary>+ Mostly just enthusiasm. If you are interested in Open Source and want to get involved,+ the SupaSquad program is a great channel. You'll be given opportunities to contribute+ to the community in whatever ways match your skillset.</details><details>- <summary><i>What if I become too busy to contribute?</i></summary>- No worries! The program isn't a job. It's just an opportunity to build your skillset and audience within the Supabase ecosystem.-</details>\ No newline at end of file+ <summary>+ <i>What if I become too busy to contribute?</i>+ </summary>+ No worries! The program isn't a job. It's just an opportunity to build your skillset+ and audience within the Supabase ecosystem.+</details>