diff --git a/apps/reference/_supabase_js/upgrade-guide.mdx b/apps/reference/_supabase_js/upgrade-guide.mdx
index c66a896e9ba..6edc071b8cb 100644
--- a/apps/reference/_supabase_js/upgrade-guide.mdx
+++ b/apps/reference/_supabase_js/upgrade-guide.mdx
@@ -381,7 +381,7 @@ const userListener = supabase.from('users')
const userListener = supabase.channel('public:user')
.on(
'postgres_changes',
- { event: '*', schema: 'public', table: 'user' }
+ { event: '*', schema: 'public', table: 'user' },
(payload) => handleAllEventsPayload()
)
.subscribe()
@@ -408,7 +408,7 @@ userListener.unsubscribe()
```ts
-supabase.removeChannel('public:users')
+supabase.removeChannel(userListener)
```
-
\ No newline at end of file
+
diff --git a/apps/reference/docs/guides/auth/auth-email.mdx b/apps/reference/docs/guides/auth/auth-email.mdx
index 4f982891630..c4c24a828a6 100644
--- a/apps/reference/docs/guides/auth/auth-email.mdx
+++ b/apps/reference/docs/guides/auth/auth-email.mdx
@@ -16,12 +16,9 @@ Setting up Email logins for your Supabase application.
## Configure email settings
-- Go to your [Supabase Project Dashboard](https://app.supabase.com)
-- In the left sidebar, click the `Authentication` icon (near the top)
-- Click `Settings` from the list to go to the `Authentication Settings` page
-- Enter the final (hosted) URL of your app under `Site URL`
-- Under `Email Auth` turn `Enable Email Signup` to ON
-- Click `Save`
+1. Go to the [Authentication Settings](https://app.supabase.com/project/_/auth/settings) page in the Dashboard.
+1. For **Site URL**, enter the final (hosted) URL of your app.
+1. Under Auth Providers, **enable email provider**.
:::note Self hosting
diff --git a/apps/reference/docs/guides/auth/auth-magic-link.mdx b/apps/reference/docs/guides/auth/auth-magic-link.mdx
index 865d4394300..3d09f2e726b 100644
--- a/apps/reference/docs/guides/auth/auth-magic-link.mdx
+++ b/apps/reference/docs/guides/auth/auth-magic-link.mdx
@@ -19,12 +19,9 @@ Setting up Magic Link logins for your Supabase application.
## Add Magic Link into your Supabase Project
-- Go to your [Supabase Project Dashboard](https://app.supabase.com)
-- In the left sidebar, click the `Authentication` icon (near the top)
-- Click `Settings` from the list to go to the `Authentication Settings` page
-- Enter the final (hosted) URL of your app under `Site URL` (this is important)
-- Under `Email Auth` turn `Enable Email Signup` to ON
-- Click `Save`
+1. Go to the [Authentication Settings](https://app.supabase.com/project/_/auth/settings) page in the Dashboard.
+1. For **Site URL**, enter the final (hosted) URL of your app.
+1. Under Auth Providers, **enable email provider**.
## Add login code to your client app
diff --git a/apps/reference/docs/guides/auth/auth-twilio.mdx b/apps/reference/docs/guides/auth/auth-twilio.mdx
index 96abd4aa723..f5c0e53cb0a 100644
--- a/apps/reference/docs/guides/auth/auth-twilio.mdx
+++ b/apps/reference/docs/guides/auth/auth-twilio.mdx
@@ -145,6 +145,7 @@ values={[
let { session, error } = await supabase.auth.verifyOTP({
phone: '+13334445555',
token: '123456',
+ type: 'sms',
})
```
@@ -260,6 +261,7 @@ values={[
let { session, error } = await supabase.auth.verifyOTP({
phone: '+13334445555',
token: '123456',
+ type: 'sms',
})
```
diff --git a/apps/reference/docs/guides/database/connecting-to-postgres.mdx b/apps/reference/docs/guides/database/connecting-to-postgres.mdx
index e6882cf3883..b059d3dbc67 100644
--- a/apps/reference/docs/guides/database/connecting-to-postgres.mdx
+++ b/apps/reference/docs/guides/database/connecting-to-postgres.mdx
@@ -12,11 +12,11 @@ Supabase provides several options for programmatically connecting to your Postgr
- Direct connections using Postgres' standard connection system.
- Connection pooling using PgBouncer.
-### API vs Direct vs Pooling
+### Direct vs Pooling vs API
-- The API is an auto-generated REST interface. You should use this for all browser and application interactions.
- A "direct connection" is when a connection is made to the database using Postgres' native connection implementation. You should use this for tools which are always alive - usually installed on a long-running server.
- A "connection pool" is a system (external to Postgres) which keeps connections "open". You should use this for serverless functions and tools which disconnect from the database frequently.
+- The API is an auto-generated REST interface. You should use this for all browser and application interactions. The API server internally handles a connection pool.
Why would you use a connection pool? Primarily because the way that Postgres handles connections isn't very scalable for a large number of _temporary_ connections.
You can use these simple questions to determine which connection method to use:
diff --git a/apps/reference/docs/guides/functions.mdx b/apps/reference/docs/guides/functions.mdx
index 0391adce248..8bcab320554 100644
--- a/apps/reference/docs/guides/functions.mdx
+++ b/apps/reference/docs/guides/functions.mdx
@@ -263,6 +263,10 @@ serve(async (req) => {
})
```
+### Using HTTP Methods
+
+Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS`. A function can be designed to perform different actions based on a request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your function.
+
## Limitations
- Deno Deploy limitations
@@ -270,5 +274,4 @@ serve(async (req) => {
- Cannot write to File System
- Edge Functions
- Local development - only one function at a time
- - Supabase Functions only supports `POST`, `OPTIONS`, and `GET` requests.
- Serving of HTML content is not supported (`GET` requests that return `text/html` will be rewritten to `text/plain`).
diff --git a/apps/reference/docs/guides/functions/examples.mdx b/apps/reference/docs/guides/functions/examples.mdx
index e56dc4da517..39a48de9a0b 100644
--- a/apps/reference/docs/guides/functions/examples.mdx
+++ b/apps/reference/docs/guides/functions/examples.mdx
@@ -26,6 +26,16 @@ const examples = [
description: 'Full example for using Supabase and Stripe, with Flutter.',
href: 'https://github.com/supabase-community/flutter-stripe-payments-with-supabase-functions',
},
+ {
+ name: 'Building a RESTful Service API',
+ description: 'Learn how to use HTTP methods and paths to build a RESTful service for managing tasks.',
+ href: 'https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/restful-tasks/index.ts',
+ },
+ {
+ name: 'Working with Supabase Storage',
+ description: 'An example on reading a file from Supbase Storage.',
+ href: 'https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/read-storage/index.ts',
+ }
]
You can find a list of useful [Edge Function Examples](https://github.com/supabase/supabase/tree/master/examples/edge-functions) in our GitHub repository.
diff --git a/apps/reference/docs/guides/hosting/docker.mdx b/apps/reference/docs/guides/hosting/docker.mdx
index 886a1e22a52..1b0ea6fa0d6 100644
--- a/apps/reference/docs/guides/hosting/docker.mdx
+++ b/apps/reference/docs/guides/hosting/docker.mdx
@@ -95,6 +95,11 @@ POSTGRES_PORT=5432
Once 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.
+### Setting database's `log_min_messages`
+
+By default, `docker-compose` sets the database's `log_min_messages` configuration to `fatal` to prevent redundant logs generated by Realtime.
+However, you might miss important log messages such as database errors. Configure `log_min_messages` based on your needs.
+
## Deploying
See the following guides to deploy Docker Compose setup using your preferred tool and platform:
diff --git a/apps/reference/docs/guides/hosting/overview.mdx b/apps/reference/docs/guides/hosting/overview.mdx
index 945353de013..f8f9c96a88a 100644
--- a/apps/reference/docs/guides/hosting/overview.mdx
+++ b/apps/reference/docs/guides/hosting/overview.mdx
@@ -36,7 +36,7 @@ Each system has a number of configuration options which can be found in the rele
- [Postgres](https://hub.docker.com/_/postgres/)
- [PostgREST](https://postgrest.org/en/stable/configuration.html)
-- [Realtime](https://github.com/supabase/realtime#server-set-up)
+- [Realtime](https://github.com/supabase/realtime#server)
- [GoTrue](https://github.com/supabase/gotrue)
- [Storage](https://github.com/supabase/storage-api)
- [Kong](https://docs.konghq.com/install/docker/)
@@ -46,7 +46,7 @@ Each system has a number of configuration options which can be found in the rele
It is recommended that you decouple your database from the middleware so that you can upgrade the middleware without any downtime.
The "middleware" is everything except Postgres, and it should work with any Postgres provider (such as AWS RDS), or your own Postgres cluster.
-### Database Extensions
+### 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
[schema initialization script](https://github.com/supabase/supabase/blob/master/docker/volumes/db/init/00-initial-schema.sql).
@@ -69,7 +69,7 @@ For UUID functions, required for PostgreSQL <13.
For working with JWT and Auth functions.
-### Database Roles
+### Roles
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).
@@ -111,6 +111,10 @@ For running commands via the Supabase UI.
Supabase Administrative role for maintaining your database.
+### Realtime Logs
+
+Set your database's `log_min_messages` configuration to `fatal` to prevent redundant database logs generated by Realtime. However, you might miss important log messages such as database errors. Configure `log_min_messages` based on your needs.
+
## API Keys
The API Gateway (Kong) uses JWT to authenticate access through to the database. The JWT should correspond to a relevant Postgres Role,
diff --git a/apps/reference/docs/guides/with-flutter.mdx b/apps/reference/docs/guides/with-flutter.mdx
index a904307801f..a09a5b9f56d 100644
--- a/apps/reference/docs/guides/with-flutter.mdx
+++ b/apps/reference/docs/guides/with-flutter.mdx
@@ -47,12 +47,8 @@ Run `flutter pub get` to install the dependencies.
Now that we have the dependencies installed let's setup deep links so users who have logged in via magic link or OAuth can come back to the app.
-```sh
-1. Go to the "Authentication" section.
-2. Click "Settings" in the sidebar.
-3. Type `io.supabase.flutterquickstart://login-callback/` in the Additional Redirect URLs input field.
-4. Hit save.
-```
+1. Go to [Authentication Settings](https://app.supabase.com/project/_/auth/settings) in the Dashboard.
+1. In **Redirect URLs**, add `io.supabase.flutterquickstart://login-callback/` as a new domain.

diff --git a/apps/reference/docs/guides/with-nextjs.mdx b/apps/reference/docs/guides/with-nextjs.mdx
index 2cfe4430752..82492aca8a0 100644
--- a/apps/reference/docs/guides/with-nextjs.mdx
+++ b/apps/reference/docs/guides/with-nextjs.mdx
@@ -14,6 +14,17 @@ import ProjectSetup from './_partials/project_setup.mdx'

+### Video Guide
+
+
+
+
+
### GitHub
Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase/supabase/tree/master/examples/user-management/nextjs-ts-user-management).
diff --git a/apps/reference/docs/guides/with-nuxt-3.mdx b/apps/reference/docs/guides/with-nuxt-3.mdx
index d912f99bea5..0df2facf0ad 100644
--- a/apps/reference/docs/guides/with-nuxt-3.mdx
+++ b/apps/reference/docs/guides/with-nuxt-3.mdx
@@ -16,7 +16,7 @@ import ProjectSetup from './_partials/project_setup.mdx'
### Github
-Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase-community/nuxt3-quickstarter).
+Should you get stuck while working through the guide, refer to [this repo](https://github.com/supabase/supabase/tree/master/examples/user-management/nuxt3-user-management).
@@ -103,7 +103,7 @@ Let's set up a Vue component to manage logins and sign ups. We'll use Magic Link
const handleLogin = async () => {
try {
loading.value = true
- const { error } = await supabase.auth.signIn({ email: email.value })
+ const { error } = await supabase.auth.signInWithOtp({ email: email.value })
if (error) throw error
alert('Check your email for the login link!')
} catch (error) {
@@ -207,6 +207,7 @@ Let's create a new component for that called `Account.vue`.
loading.value = true
let { error } = await supabase.auth.signOut()
if (error) throw error
+ user.value = null
} catch (error) {
alert(error.message)
} finally {
diff --git a/apps/reference/docs/guides/with-sveltekit.mdx b/apps/reference/docs/guides/with-sveltekit.mdx
index 8cf78ec9ff4..86f2c66592d 100644
--- a/apps/reference/docs/guides/with-sveltekit.mdx
+++ b/apps/reference/docs/guides/with-sveltekit.mdx
@@ -52,7 +52,7 @@ PUBLIC_SUPABASE_ANON_KEY="YOUR_SUPABASE_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 [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.
-```js title="lib/supabaseClient.ts"
+```js title="src/lib/supabaseClient.ts"
import { createClient } from '@supabase/auth-helpers-sveltekit'
import { env } from '$env/dynamic/public'
@@ -62,167 +62,241 @@ export const supabaseClient = createClient(env.PUBLIC_SUPABASE_URL, env.PUBLIC_S
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/svelte-user-management/src/app.css).
+### Supabase Auth Helpers
+
+SvelteKit is a highly versatile framework offering pre-rendering at build time (SSG), server-side rendering at request time (SSR), API routes, and more.
+
+It can be challenging to authenticate your users in all these different environments, that's why we've created the Supabase Auth Helpers to make user management and data fetching within SvelteKit as easy as possible.
+
+Install the auth helpers for SvelteKit:
+
+```bash
+npm install @supabase/auth-helpers-sveltekit
+```
+
+Update your `src/routes/+layout.svelte`:
+
+```html title="src/routes/+layout.svelte"
+
+
+
+
+
+```
+
+Create a new `src/routes/+layout.ts` file to handle the session on the client-side.
+
+```ts title="src/routes/+layout.ts"
+import type { LayoutLoad } from './$types';
+import { getSupabase } from '@supabase/auth-helpers-sveltekit';
+
+export const load: LayoutLoad = async (event) => {
+ const { session } = await getSupabase(event);
+ return { session };
+};
+```
+
+Create a new `src/routes/+layout.server.ts` file to handle the session on the server-side.
+
+```ts title="src/routes/+layout.server.ts"
+import type { LayoutServerLoad } from './$types';
+import { getServerSession } from '@supabase/auth-helpers-sveltekit';
+
+export const load: LayoutServerLoad = async (event) => {
+ return {
+ session: await getServerSession(event)
+ };
+};
+```
+
+Be sure to create `src/hooks.client.ts` and `src/hooks.server.ts` in order to get the auth helper started on the client and server-side.
+
+```ts title="src/hooks.client.ts"
+import '$lib/supabaseClient'
+```
+
+```ts title="src/hooks.server.ts"
+import '$lib/supabaseClient'
+```
+
### Set up a Login component
Let's set up a Svelte 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="lib/Auth.svelte"
-
-
```
-### User store
+### Account component
-To access the user information in other places, we use a writable store. Create a new file called `sessionStore.js`
+After a user is signed in, they need to be able to edit their profile details and manage their account.
+Create a new `Account.svelte` component to handle this functionality.
-```javascript title="lib/sessionStore.js"
-import { writable } from 'svelte/store'
+```html title="src/routes/Account.svelte"
+
-
```
@@ -232,25 +306,21 @@ Now that we have all the components in place, let's update `src/routes/+page.sve
```html title="src/routes/+page.svelte"
-
- {#if $user}
-
- {:else}
-
- {/if}
-
+
+ Supabase + SvelteKit
+
+
+
+{#if !$page.data.session}
+
+{:else}
+
+{/if}
```
Once that's done, run this in a terminal window:
@@ -271,89 +341,95 @@ Every Supabase project is configured with [Storage](/docs/guides/storage) for ma
Let's create an avatar for the user so that they can upload a profile photo. We can start by creating a new component:
-```html title="lib/Avatar.svelte"
-
+
+
+
+
+
+
+
+
+#### Body Parameters
+
+```json
+{
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+}
+```
+
+
+
+
+#### Responses
+
+
+
+
+
+
+
+
+
+
+```json
+{
+ "schema": {
+ "type": "object"
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Failed to delete secrets with given names
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/temp-docs/_api_versioned_docs/.gitkeep b/apps/temp-docs/_api_versioned_docs/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_api_versioned_sidebars/.gitkeep b/apps/temp-docs/_api_versioned_sidebars/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_api_versions.json b/apps/temp-docs/_api_versions.json
new file mode 100644
index 00000000000..fe51488c706
--- /dev/null
+++ b/apps/temp-docs/_api_versions.json
@@ -0,0 +1 @@
+[]
diff --git a/apps/temp-docs/_cli/intro.mdx b/apps/temp-docs/_cli/intro.mdx
new file mode 100644
index 00000000000..8ac2186ca6e
--- /dev/null
+++ b/apps/temp-docs/_cli/intro.mdx
@@ -0,0 +1,29 @@
+---
+id: intro
+slug: /
+sidebar_position: 1
+sidebar_label: Supabase CLI
+hide_table_of_contents: true
+---
+
+# Supabase CLI
+
+The Supabase CLI provides tools to develop your project locally and deploy to the Supabase Platform.
+The CLI is still under development, but it contains all the functionality for working with your Supabase projects and the Supabase Platform.
+
+- Run Supabase locally: [`supabase start`](https://supabase.com/docs/reference/cli/usage#supabase-start)
+- Manage database migrations: [`supabase migration`](https://supabase.com/docs/reference/cli/usage#supabase-migration)
+- CI/CD for releasing to production: [`supabase db push`](https://supabase.com/docs/reference/cli/usage#supabase-db-push)
+- Manage your Supabase projects: [`supabase projects`](https://supabase.com/docs/reference/cli/usage#supabase-projects)
+- Generate types directly from your database schema: [`supabase gen types`](https://supabase.com/docs/reference/cli/usage#supabase-gen)
+ - A [community-supported GitHub Action](https://github.com/lyqht/generate-supabase-db-types-github-action) to generate TypeScript types
+- Shell autocomplete: [`supabase completion`](https://supabase.com/docs/reference/cli/usage#supabase-completion)
+ - A [community-supported Fig autocomplete spec](https://fig.io/manual/supabase) for macOS terminal
+
+## Additional Links
+
+- [Install the Supabase CLI](/docs/guides/cli)
+- [Source code](https://github.com/supabase/cli)
+- [Known bugs and issues](https://github.com/supabase/cli/issues)
+- [Supabase CLI v1 and Admin API Beta](https://supabase.com/blog/supabase-cli-v1-and-admin-api-beta)
+- [The CLI team announcing CLI V1 and Admin API Beta - Video](https://www.youtube.com/watch?v=OpPOaJI_Z28)
diff --git a/apps/temp-docs/_cli/release-notes.mdx b/apps/temp-docs/_cli/release-notes.mdx
new file mode 100644
index 00000000000..e10337f8d04
--- /dev/null
+++ b/apps/temp-docs/_cli/release-notes.mdx
@@ -0,0 +1,7 @@
+---
+id: release-notes
+---
+
+# Release Notes
+
+All release notes can be found in the [GitHub Releases page](https://github.com/supabase/cli/releases).
diff --git a/apps/temp-docs/_cli_versioned_docs/.gitkeep b/apps/temp-docs/_cli_versioned_docs/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_cli_versioned_sidebars/.gitkeep b/apps/temp-docs/_cli_versioned_sidebars/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_cli_versions.json b/apps/temp-docs/_cli_versions.json
new file mode 100644
index 00000000000..fe51488c706
--- /dev/null
+++ b/apps/temp-docs/_cli_versions.json
@@ -0,0 +1 @@
+[]
diff --git a/apps/temp-docs/_gotrue/config.mdx b/apps/temp-docs/_gotrue/config.mdx
new file mode 100644
index 00000000000..9a00a5a380e
--- /dev/null
+++ b/apps/temp-docs/_gotrue/config.mdx
@@ -0,0 +1,35 @@
+---
+id: config
+slug: /config
+title: Configuration
+toc_max_heading_level: 3
+---
+
+
+
+A `config.toml` file is generated after running `supabase init`.
+
+This file is located in the `supabase` folder under `supabase/config.toml`.
+
+
+
+
+
+
+## General {#general}
+
+
+
+### `project_id` {#project_id}
+
+A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running `supabase init`.
+
+
+
+
Required: true
+
Default: None
+
+
+
+
+
diff --git a/apps/temp-docs/_gotrue/intro.mdx b/apps/temp-docs/_gotrue/intro.mdx
new file mode 100644
index 00000000000..cb9a386f235
--- /dev/null
+++ b/apps/temp-docs/_gotrue/intro.mdx
@@ -0,0 +1,22 @@
+---
+slug: /
+sidebar_position: 1
+sidebar_label: Auth Server
+---
+
+# Supabase Auth Server
+
+The Supabase Auth Server (GoTrue) is a JSON Web Token (JWT)-based API for managing users and issuing access tokens.
+
+GoTrue is an open-source API written in Golang, that acts as a self-standing API service for handling user registration and authentication for JAM projects. It's based on OAuth2 and JWT and handles user signup, authentication, and custom user data.
+
+## Client libraries
+
+- [JavaScript](https://github.com/supabase/gotrue-js)
+- [Dart](https://github.com/supabase/gotrue-dart)
+
+## Additional Links
+
+- [Source Code](https://github.com/supabase/gotrue)
+- [Known bugs and issues](https://github.com/supabase/gotrue/issues)
+- [Auth Guides](https://supabase.com/docs/guides/auth)
diff --git a/apps/temp-docs/_gotrue/release-notes.mdx b/apps/temp-docs/_gotrue/release-notes.mdx
new file mode 100644
index 00000000000..cb164542845
--- /dev/null
+++ b/apps/temp-docs/_gotrue/release-notes.mdx
@@ -0,0 +1,7 @@
+---
+id: release-notes
+---
+
+# Release Notes
+
+All release notes can be found in the [GitHub Releases](https://github.com/supabase/gotrue/releases) page.
diff --git a/apps/temp-docs/_gotrue/usage.mdx b/apps/temp-docs/_gotrue/usage.mdx
new file mode 100644
index 00000000000..64eed5538f0
--- /dev/null
+++ b/apps/temp-docs/_gotrue/usage.mdx
@@ -0,0 +1,18 @@
+---
+id: usage
+slug: /usage
+title: Usage
+toc_max_heading_level: 3
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+
+Documentation of the gotrue API.
+
+
+
+
diff --git a/apps/temp-docs/_gotrue_versioned_docs/.gitkeep b/apps/temp-docs/_gotrue_versioned_docs/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_gotrue_versioned_sidebars/.gitkeep b/apps/temp-docs/_gotrue_versioned_sidebars/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_gotrue_versions.json b/apps/temp-docs/_gotrue_versions.json
new file mode 100644
index 00000000000..fe51488c706
--- /dev/null
+++ b/apps/temp-docs/_gotrue_versions.json
@@ -0,0 +1 @@
+[]
diff --git a/apps/temp-docs/_storage/intro.mdx b/apps/temp-docs/_storage/intro.mdx
new file mode 100644
index 00000000000..4c038f6c7aa
--- /dev/null
+++ b/apps/temp-docs/_storage/intro.mdx
@@ -0,0 +1,28 @@
+---
+slug: /
+sidebar_position: 1
+sidebar_label: Storage Server
+---
+
+# Supabase Storage Server
+
+An S3 compatible object storage service that integrates with Postgres.
+
+- Uses Postgres as it's datastore for storing metadata
+- Authorization rules are written as Postgres Row Level Security policies
+- Integrates with S3 as the storage backend (with more in the pipeline!)
+- Extremely lightweight and performant
+
+Read [this post](https://supabase.com/blog/supabase-storage) on why we decided to build a new object storage service.
+
+## Client libraries
+
+- [JavaScript](https://github.com/supabase/storage-js)
+- [Dart](https://github.com/supabase/storage-dart)
+
+## Additional Links
+
+- [Source Code](https://github.com/supabase/storage-api)
+- [Known bugs and issues](https://github.com/supabase/storage-js/issues)
+- [Storage Guides](https://supabase.com/docs/guides/storage)
+- [OpenAPI Docs](https://supabase.github.io/storage-api/)
diff --git a/apps/temp-docs/_storage/release-notes.mdx b/apps/temp-docs/_storage/release-notes.mdx
new file mode 100644
index 00000000000..8dad269f0d9
--- /dev/null
+++ b/apps/temp-docs/_storage/release-notes.mdx
@@ -0,0 +1,7 @@
+---
+id: release-notes
+---
+
+# Release Notes
+
+All release notes can be found in the [GitHub Releases](https://github.com/supabase/storage-api/releases) page.
diff --git a/apps/temp-docs/_storage_versioned_docs/.gitkeep b/apps/temp-docs/_storage_versioned_docs/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_storage_versioned_sidebars/.gitkeep b/apps/temp-docs/_storage_versioned_sidebars/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/apps/temp-docs/_storage_versions.json b/apps/temp-docs/_storage_versions.json
new file mode 100644
index 00000000000..fe51488c706
--- /dev/null
+++ b/apps/temp-docs/_storage_versions.json
@@ -0,0 +1 @@
+[]
diff --git a/apps/temp-docs/_supabase_dart/initializing.mdx b/apps/temp-docs/_supabase_dart/initializing.mdx
new file mode 100644
index 00000000000..b0d69813f45
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart/initializing.mdx
@@ -0,0 +1,43 @@
+---
+id: initializing
+title: 'Initializing'
+slug: initializing
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+## Flutter
+
+For `supabase-flutter`, you will be using the static `initialize()` method on `Supabase` class.
+
+### Flutter `initialize()`
+
+```dart title="main.dart"
+Future main() async {
+ await Supabase.initialize(url: 'https://xyzcompany.supabase.co', anonKey: 'public-anon-key');
+ runApp(MyApp());
+}
+```
+
+### Access `SupabaseClient` instance
+
+Once you initialize Supabase in your `main()` method, you can access the `SupabaseClient` instance from anywhere in your app.
+
+```dart
+final supabase = Supabase.instance.client;
+```
+
+## Other Dart Projects
+
+You can initialize a new Supabase client using the `SupabaseClient()` method.
+
+The Supabase client is your entrypoint to the rest of the Supabase functionality
+and is the easiest way to interact with everything we offer within the Supabase ecosystem.
+
+### Dart `SupabaseClient()`
+
+```dart
+final supabase = SupabaseClient('https://xyzcompany.supabase.co', 'public-anon-key');
+```
+
diff --git a/apps/temp-docs/_supabase_dart/installing.mdx b/apps/temp-docs/_supabase_dart/installing.mdx
new file mode 100644
index 00000000000..8c49c1fd9f7
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart/installing.mdx
@@ -0,0 +1,24 @@
+---
+id: installing
+title: 'Installing'
+slug: installing
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+## Flutter
+
+For Flutter project, you can use [supabase_flutter](https://pub.dev/packages/supabase_flutter) package.
+
+```bash
+flutter pub add supabase_flutter
+```
+
+## Other Dart projects
+
+For non-Flutter projects using Dart, such as server-side Dart or Angular-Dart, you can use the [supabase](https://pub.dev/packages/supabase) package.
+
+```bash
+dart pub add supabase
+```
\ No newline at end of file
diff --git a/apps/temp-docs/_supabase_dart/intro.mdx b/apps/temp-docs/_supabase_dart/intro.mdx
new file mode 100644
index 00000000000..d728b447d2e
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart/intro.mdx
@@ -0,0 +1,27 @@
+---
+id: intro
+slug: /
+sidebar_label: Supabase Flutter Library
+---
+
+# Supabase Flutter Library
+
+This reference documents every object and method available in Supabase's isomorphic Flutter library, [`supabase-flutter`](https://pub.dev/packages/supabase_flutter).
+
+You can use the `supabase-flutter` library to:
+
+- interact with your Postgres database
+- listen to database changes
+- invoke Deno Edge Functions
+- build login and user management functionality
+- manage large files
+
+## For non-Flutter projects
+
+We also have [supabase-dart](https://github.com/supabase-community/supabase-dart) for non-Flutter Dart projects, such as server-side Dart or Angular-Dart.
+supabase-dart shares most of the APIs with supabase-flutter without being dependent on Flutter so that you can use Supabase anywhere you can run Dart!
+
+## Additional Links
+
+- Source Code: [github.com/supabase/supabase-flutter](https://github.com/supabase/supabase-flutter)
+- [Known bugs and issues](https://github.com/supabase/supabase-flutter/issues)
diff --git a/apps/temp-docs/_supabase_dart_versioned_docs/version-v0/intro.mdx b/apps/temp-docs/_supabase_dart_versioned_docs/version-v0/intro.mdx
new file mode 100644
index 00000000000..ed80828fa05
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart_versioned_docs/version-v0/intro.mdx
@@ -0,0 +1,27 @@
+---
+id: intro
+slug: /
+sidebar_label: Supabase Dart Library
+---
+
+# Supabase Dart Library
+
+:::caution
+You're viewing the docs for an older version of the `supabase-flutter` library.
+:::
+
+
+This reference documents every object and method available in Supabase's isomorphic Dart library, `supabase-dart`.
+
+You can use the `supabase-dart` library to:
+
+- interact with your Postgres database
+- listen to database changes
+- invoke Deno Edge Functions
+- build login and user management functionality
+- manage large files
+
+## Additional Links
+
+- Source Code: [github.com/supabase/supabase-dart](https://github.com/supabase/supabase-dart)
+- [Known bugs and issues](https://github.com/supabase/supabase-dart/issues)
diff --git a/apps/temp-docs/_supabase_dart_versioned_sidebars/version-v0-sidebars.json b/apps/temp-docs/_supabase_dart_versioned_sidebars/version-v0-sidebars.json
new file mode 100644
index 00000000000..44acc0181ad
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart_versioned_sidebars/version-v0-sidebars.json
@@ -0,0 +1,120 @@
+{
+ "sidebar": [
+ {
+ "type": "category",
+ "label": "Getting Started",
+ "items": ["intro", "generated/installing", "generated/initializing"],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Auth",
+ "items": [
+ "generated/auth-signup",
+ "generated/auth-signin",
+ "generated/auth-signinwithprovider",
+ "generated/auth-signout",
+ "generated/auth-session",
+ "generated/auth-user",
+ "generated/auth-update",
+ "generated/auth-onauthstatechange",
+ "generated/reset-password-email"
+ ],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Functions",
+ "items": ["generated/invoke"],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Database",
+ "items": [
+ "generated/select",
+ "generated/insert",
+ "generated/update",
+ "generated/upsert",
+ "generated/delete",
+ "generated/rpc"
+ ],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Realtime",
+ "items": [
+ "generated/subscribe",
+ "generated/removesubscription",
+ "generated/getsubscriptions",
+ "generated/stream"
+ ],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Storage",
+ "items": [
+ "generated/storage-createbucket",
+ "generated/storage-getbucket",
+ "generated/storage-listbuckets",
+ "generated/storage-updatebucket",
+ "generated/storage-deletebucket",
+ "generated/storage-emptybucket",
+ "generated/storage-from-upload",
+ "generated/storage-from-download",
+ "generated/storage-from-list",
+ "generated/storage-from-update",
+ "generated/storage-from-move",
+ "generated/storage-from-remove",
+ "generated/storage-from-createsignedurl",
+ "generated/storage-from-getpublicurl"
+ ],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Modifiers",
+ "items": [
+ "generated/using-modifiers",
+ "generated/limit",
+ "generated/order",
+ "generated/range",
+ "generated/single"
+ ],
+ "collapsed": true
+ },
+ {
+ "type": "category",
+ "label": "Filters",
+ "items": [
+ "generated/using-filters",
+ "generated/or",
+ "generated/not",
+ "generated/match",
+ "generated/eq",
+ "generated/neq",
+ "generated/gt",
+ "generated/gte",
+ "generated/lt",
+ "generated/lte",
+ "generated/like",
+ "generated/ilike",
+ "generated/is_",
+ "generated/in_",
+ "generated/contains",
+ "generated/containedby",
+ "generated/rangelt",
+ "generated/rangegt",
+ "generated/rangegte",
+ "generated/rangelte",
+ "generated/rangeadjacent",
+ "generated/overlaps",
+ "generated/textsearch",
+ "generated/filter"
+ ],
+ "collapsed": true
+ }
+ ]
+}
diff --git a/apps/temp-docs/_supabase_dart_versions.json b/apps/temp-docs/_supabase_dart_versions.json
new file mode 100644
index 00000000000..574c045ecaf
--- /dev/null
+++ b/apps/temp-docs/_supabase_dart_versions.json
@@ -0,0 +1 @@
+["v0"]
diff --git a/apps/temp-docs/_supabase_js/installing.mdx b/apps/temp-docs/_supabase_js/installing.mdx
new file mode 100644
index 00000000000..96b254beca2
--- /dev/null
+++ b/apps/temp-docs/_supabase_js/installing.mdx
@@ -0,0 +1,37 @@
+---
+id: installing
+title: 'Installing'
+slug: installing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+All JavaScript libraries are built directly by the Supabase team.
+
+Other languages are built by the community and supported by Supabase.
+
+## JavaScript
+
+Via NPM
+
+```bash
+npm install @supabase/supabase-js
+```
+
+Via Yarn
+
+```bash
+yarn add @supabase/supabase-js
+```
+
+Find the source code on [GitHub](https://github.com/supabase/supabase-js).
+
+Or via CDN
+
+```js
+
+//or
+
+```
diff --git a/apps/temp-docs/_supabase_js/intro.md b/apps/temp-docs/_supabase_js/intro.md
new file mode 100644
index 00000000000..bec6b4f975e
--- /dev/null
+++ b/apps/temp-docs/_supabase_js/intro.md
@@ -0,0 +1,25 @@
+---
+slug: /
+sidebar_position: 1
+sidebar_label: Supabase JavaScript Library
+hide_table_of_contents: true
+---
+
+# Supabase JavaScript Library
+
+This reference documents every object and method available in Supabase's isomorphic JavaScript library, `supabase-js`.
+
+You can use the `supabase-js` library to:
+
+- interact with your Postgres database
+- listen to database changes
+- invoke Deno Edge Functions
+- build login and user management functionality
+- manage large files
+
+## Additional Links
+
+- Source Code: [github.com/supabase/supabase-js](https://github.com/supabase/supabase-js)
+- TypeDoc: [supabase.github.io/supabase-js](https://supabase.github.io/supabase-js/v2/)
+- NPM: [npmjs.com/package/@supabase/supabase-js](https://www.npmjs.com/package/@supabase/supabase-js)
+- [Known bugs and issues](https://github.com/supabase/supabase-js/issues)
diff --git a/apps/temp-docs/_supabase_js/release-notes.md b/apps/temp-docs/_supabase_js/release-notes.md
new file mode 100644
index 00000000000..715215f2197
--- /dev/null
+++ b/apps/temp-docs/_supabase_js/release-notes.md
@@ -0,0 +1,211 @@
+---
+id: release-notes
+---
+
+# Release Notes
+
+Supabase.js v2 release notes.
+
+## 2.0.0
+
+Install the latest with `npm install @supabase/supabase-js`.
+
+### Explicit constructor options
+
+All client specific options within the constructor are keyed to the library: [PR](https://github.com/supabase/supabase-js/pull/458):
+
+```jsx
+const supabase = createClient(apiURL, apiKey, {
+ db: {
+ schema: 'public',
+ },
+ auth: {
+ storage: AsyncStorage,
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ },
+ realtime: {
+ channels,
+ endpoint,
+ },
+ global: {
+ fetch: customFetch,
+ headers: DEFAULT_HEADERS,
+ },
+})
+```
+
+### Typescript support
+
+The libraries now support typescript.
+
+```ts
+// v2 - definitions are injected in `createClient()`
+import type { Database } from './DatabaseDefinitions'
+const supabase = createClient(SUPABASE_URL, ANON_KEY)
+const { data } = await supabase.from('messages').select().match({ id: 1 })
+
+// v1 -- previously definitions were injected in the `from()` method
+supabase.from('messages').select('*')
+```
+
+Types can be generated via the CLI:
+
+```bash
+supabase start
+supabase gen types typescript --local > DatabaseDefinitions.ts
+```
+
+### Data operations return minimal
+
+`.insert()` / `.upsert()` / `.update()` / `.delete()` don't return rows by default: [PR](https://github.com/supabase/postgrest-js/pull/276).
+
+Previously, these methods return inserted/updated/deleted rows by default (which caused [some confusion](https://github.com/supabase/supabase/discussions/1548)), and you can opt to not return it by specifying `returning: 'minimal'`. Now the default behavior is to not return rows. To return inserted/updated/deleted rows, add a `.select()` call at the end, e.g.:
+
+```sql
+const { data, error } = await supabase
+ .from('my_table')
+ .delete()
+ .eq('id', 1)
+ .select()
+```
+
+### New ordering defaults
+
+`.order()` now defaults to Postgres’s default: [PR](https://github.com/supabase/postgrest-js/pull/283).
+
+Previously `nullsFirst` defaults to `false` , meaning `null`s are ordered last. This is bad for performance if e.g. the column uses an index with `NULLS FIRST` (which is the default direction for indexes).
+
+### Cookies and localstorage namespace
+
+Storage key name in the Auth library has changed to include project reference which means that existing websites that had their JWT expiry set to a longer time could find their users logged out with this upgrade.
+
+```jsx
+const defaultStorageKey = `sb-${new URL(this.authUrl).hostname.split('.')[0]}-auth-token`
+```
+
+### New Auth Types
+
+Typescript typings have been reworked. `Session` interface now guarantees that it will always have an `access_token`, `refresh_token` and `user`
+
+```jsx
+interface Session {
+ provider_token?: string | null
+ access_token: string
+ expires_in?: number
+ expires_at?: number
+ refresh_token: string
+ token_type: string
+ user: User
+}
+```
+
+### New Auth methods
+
+We're removing the `signIn()` method in favor of more explicit function signatures:
+`signInWithPassword()`, `signInWithPasswordless()`, and `signInWithOtp()`.
+
+```ts
+// v2
+const { data } = await supabase.auth.signInWithPassword({
+ email: 'hello@example',
+ password: 'pass',
+})
+// v1
+const { data } = await supabase.auth.signIn({
+ email: 'hello@example',
+ password: 'pass',
+})
+```
+
+### New Realtime methods
+
+There is a new `channel()` method in the Realtime library, which will be used for our Multiplayer updates.
+
+```ts
+supabaseClient
+ .channel('any_string_you_want')
+ .on('presence', { event: 'track' }, (payload) => {
+ console.log(payload)
+ })
+ .subscribe()
+
+supabaseClient
+ .channel('any_string_you_want')
+ .on(
+ 'postgres_changes',
+ {
+ event: 'INSERT',
+ schema: 'public',
+ table: 'movies',
+ },
+ (payload) => {
+ console.log(payload)
+ }
+ )
+ .subscribe()
+```
+
+We will deprecate the `.from().on().subscribe()` method previosuly used for listening to postgres changes.
+
+### Deprecated setAuth()
+
+Deprecated and removed `setAuth()` . To set a custom `access_token` jwt instead, pass the custom header into the `createClient()` method provided: ([PR](https://github.com/supabase/gotrue-js/pull/340))
+
+### All changes
+
+- `supabase-js`
+ - `shouldThrowOnError` has been removed until all the client libraries support this option ([PR](https://github.com/supabase/supabase-js/pull/490)).
+- `postgrest-js`
+ - TypeScript typings have been reworked [PR](https://github.com/supabase/postgrest-js/pull/279)
+ - Use `undefined` instead of `null` for function params, types, etc. (https://github.com/supabase/postgrest-js/pull/278)
+ - Some features are now obsolete: (https://github.com/supabase/postgrest-js/pull/275)
+ - filter shorthands (e.g. `cs` vs. `contains`)
+ - `body` in response (vs. `data`)
+ - `upsert`ing through the `.insert()` method
+ - `auth` method on `PostgrestClient`
+ - client-level `throwOnError`
+- `gotrue-js`
+ - `supabase-js` client allows passing a `storageKey` param which will allow the user to set the key used in local storage for storing the session. By default, this will be namespace-d with the supabase project ref. ([PR](https://github.com/supabase/supabase-js/pull/460))
+ - `signIn` method is now split into `signInWithPassword` , `signInWithPasswordless` , `signInWithOAuth` ([PR](https://github.com/supabase/gotrue-js/pull/304))
+ - Deprecated and removed `session()` , `user()` in favour of using `getSession()` instead. `getSession()` will always return a valid session if a user is already logged in, meaning no more random logouts. ([PR](https://github.com/supabase/gotrue-js/pull/299))
+ - Deprecated and removed setting for `multitab` support because `getSession()` and gotrue’s reuse interval setting takes care of session management across multiple tabs ([PR](https://github.com/supabase/gotrue-js/pull/366))
+ - No more throwing of random errors, gotrue-js v2 always returns a custom error type: ([PR](https://github.com/supabase/gotrue-js/pull/341))
+ - `AuthSessionMissingError`
+ - Indicates that a session is expected but missing
+ - `AuthNoCookieError`
+ - Indicates that a cookie is expected but missing
+ - `AuthInvalidCredentialsError`
+ - Indicates that the incorrect credentials were passed
+ - Renamed the `api` namespace to `admin` , the `admin` namespace will only contain methods that should only be used in a trusted server-side environment with the service role key
+ - Moved `resetPasswordForEmail` , `getUser` and `updateUser` to the `GoTrueClient` which means they will be accessible from the `supabase.auth` namespace in `supabase-js` instead of having to do `supabase.auth.api` to access them
+ - Removed `sendMobileOTP` , `sendMagicLinkEmail` in favor of `signInWithOtp`
+ - Removed `signInWithEmail`, `signInWithPhone` in favor of `signInWithPassword`
+ - Removed `signUpWithEmail` , `signUpWithPhone` in favor of `signUp`
+ - Replaced `update` with `updateUser`
+- `storage-js`
+ - Return types are more strict. Functions types used to indicate that the data returned could be null even if there was no error. We now make use of union types which only mark the data as null if there is an error and vice versa. ([PR](https://github.com/supabase/storage-js/pull/60))
+ - The `upload` and `update` function returns the path of the object uploaded as the `path` parameter. Previously the returned value had the bucket name prepended to the path which made it harder to pass the value on to other storage-js methods since all methods take the bucket name and path separately. We also chose to call the returned value `path` instead of `Key` ([PR](https://github.com/supabase/storage-js/pull/75))
+ - `getPublicURL` only returns the public URL inside the data object. This keeps it consistent with our other methods of returning only within the data object. No error is returned since this method cannot does not throw an error ([PR](https://github.com/supabase/storage-js/pull/93))
+ - signed urls are returned as `signedUrl` instead of `signedURL` in both `createSignedUrl` and `createSignedUrls` ([PR](https://github.com/supabase/storage-js/pull/94))
+ - Encodes URLs returned by `createSignedUrl`, `createSignedUrls` and `getPublicUrl` ([PR](https://github.com/supabase/storage-js/pull/86))
+ - `createsignedUrl` used to return a url directly and and within the data object. This was inconsistent. Now we always return values only inside the data object across all methods. ([PR](https://www.notion.so/LW5-supabase-js-v2-7b0bfcdf571d4f20b9b7a9308883f24b))
+ - `createBucket` returns a data object instead of the name of the bucket directly. ([PR](https://github.com/supabase/storage-js/pull/89))
+ - Fixed types for metadata ([PR](https://github.com/supabase/storage-js/pull/90))
+ - Better error types make it easier to track down what went wrong quicker.
+ - `SupabaseStorageClient` is no longer exported. Use `StorageClient` instead. ([PR](https://github.com/supabase/storage-js/pull/92)).
+- `realtime-js`
+ - `RealtimeSubscription` class no longer exists and replaced by `RealtimeChannel`.
+ - `RealtimeClient`'s `disconnect` method now returns type of `void` . It used to return type of `Promise<{ error: Error | null; data: boolean }`.
+ - Removed `removeAllSubscriptions` and `removeSubscription` methods from `SupabaseClient` class.
+ - Removed `SupabaseRealtimeClient` class.
+ - Removed `SupabaseQueryBuilder` class.
+ - Removed `SupabaseEventTypes` type.
+ - Thinking about renaming this to something like `RealtimePostgresChangeEvents` and moving it to `realtime-js` v2.
+ - Removed `.from(’table’).on(’INSERT’, () ⇒ {}).subscribe()` in favor of new Realtime client API.
+- `functions-js`
+ - supabase-js v1 only threw an error if the fetch call itself threw an error (network errors, etc) and not if the function returned HTTP errors like 400s or 500s. We have changed this behaviour to return an error if your function throws an error.
+ - We have introduced new error types to distinguish between different kinds of errors. A `FunctionsHttpError` error is returned if your function throws an error, `FunctionsRelayError` if the Supabase Relay has an error processing your function and `FunctionsFetchError` if there is a network error in calling your function.
+ - The correct content-type headers are automatically attached when sending the request if you don’t pass in a `Content-Type` header and pass in an argument to your function. We automatically attach the content type for `Blob`, `ArrayBuffer`, `File`, `FormData` ,`String` . If it doesn’t match any of these we assume the payload is `json` , we serialise the payload as JSON and attach the content type as `application/json`.
+ - `responseType` does not need to be explicitly passed in. We parse the response based on the `Content-Type` response header sent by the function. We support parsing the responses as `text`, `json`, `blob`, `form-data` and are parsed as `text` by default.
diff --git a/apps/temp-docs/_supabase_js/upgrade-guide.mdx b/apps/temp-docs/_supabase_js/upgrade-guide.mdx
new file mode 100644
index 00000000000..c3a148c534c
--- /dev/null
+++ b/apps/temp-docs/_supabase_js/upgrade-guide.mdx
@@ -0,0 +1,461 @@
+---
+id: upgrade-guide
+title: Upgrade to supabase-js v2
+description: 'Learn how to upgrade to supabase-js v2.'
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+supabase-js v2 focuses on "quality-of-life" improvements for developers and addresses some of the largest pain points in v1. v2 includes type support, a rebuilt Auth library with async methods, improved errors, and more.
+
+No new features will be added to supabase-js v1 , but we'll continuing merging security fixes to v1, with maintenance patches for the next 3 months.
+
+## Upgrade the client library
+
+```sh
+npm install @supabase/supabase-js@2
+```
+
+_Optionally_ if you are using custom configuration with `createClient` then follow below:
+
+
+
+
+
+```ts title="src/supabaseClient.ts"
+const supabaseClient = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
+ schema: 'custom',
+ persistSession: false,
+})
+```
+
+
+
+
+
+```ts title="src/supabaseClient.ts"
+const supabaseClient = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
+ db: {
+ schema: 'custom',
+ },
+ auth: {
+ persistSession: true,
+ },
+})
+```
+
+
+
+
+Read more about the [constructor options](/docs/reference/javascript/release-notes#explicit-constructor-options).
+
+### Auth methods
+
+The signIn() method has been deprecated in favor of more explicit method signatures to help with type hinting. Previously it was difficult for developers to know what they were missing (e.g., a lot of developers didn't realize they could use passwordless magic links).
+
+#### Sign in with email and password
+
+
+
+
+
+```ts
+const { user, error } = await supabase.auth.signIn({ email, password })
+```
+
+
+
+
+
+```ts
+const {
+ data: { user },
+ error,
+} = await supabase.auth.signInWithPassword({ email, password })
+```
+
+
+
+
+#### Sign in with magic link
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signIn({ email })
+```
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signInWithOtp({ email })
+```
+
+
+
+
+#### Sign in with a third-party provider
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signIn({ provider })
+```
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signInWithOAuth({ provider })
+```
+
+
+
+
+#### Sign in with phone
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signIn({ phone, password })
+```
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.signInWithPassword({ phone, password })
+```
+
+
+
+
+#### Sign in with phone using OTP
+
+
+
+
+
+```ts
+const { error } = await supabase.auth.api.sendMobileOTP(phone)
+```
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.signInWithOtp({ phone })
+
+// After receiving a SMS with a OTP.
+const { data, error } = await supabase.auth.verifyOtp({ phone, token })
+```
+
+
+
+
+#### Reset password for email
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.api.resetPasswordForEmail(email)
+```
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.resetPasswordForEmail(email)
+```
+
+
+
+
+#### Get the user's current session
+
+
+
+
+
+```ts
+const session = supabase.auth.session()
+```
+
+
+
+
+
+```ts
+const {
+ data: { session },
+} = await supabase.auth.getSession()
+```
+
+
+
+
+#### Get the logged-in user
+
+
+
+
+
+```ts
+const user = supabase.auth.user()
+```
+
+
+
+
+
+```ts
+const {
+ data: { session },
+} = await supabase.auth.getSession()
+const { user } = session
+```
+
+
+
+
+#### Update user data for a logged-in user
+
+
+
+
+
+```ts
+const { user, error } = await supabase.auth.update({ attributes })
+```
+
+
+
+
+
+```ts
+const {
+ data: { user },
+ error,
+} = await supabase.auth.updateUser({ attributes })
+```
+
+
+
+
+#### Use a custom `access_token` JWT with Supabase
+
+
+
+
+
+```ts
+const { user, error } = supabase.auth.setAuth(access_token)
+```
+
+
+
+
+
+```ts
+const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
+ global: {
+ headers: {
+ Authorization: `Bearer ${access_token}`,
+ },
+ },
+})
+```
+
+
+
+
+### Data methods
+
+`.insert()` / `.upsert()` / `.update()` / `.delete()` don't return rows by default: [PR](https://github.com/supabase/postgrest-js/pull/276).
+
+Previously, these methods return inserted/updated/deleted rows by default (which caused [some confusion](https://github.com/supabase/supabase/discussions/1548)), and you can opt to not return it by specifying `returning: 'minimal'`. Now the default behavior is to not return rows. To return inserted/updated/deleted rows, add a `.select()` call at the end.
+
+#### Insert and return data
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.insert({ new_data })
+```
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.insert({ new_data }).select()
+```
+
+
+
+
+#### Update and return data
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.update({ new_data }).eq('id', id)
+```
+
+
+
+
+
+```ts
+const { data, error } = await supabase.auth.update({ new_data }).eq('id', id).select()
+```
+
+
+
+
+### Realtime methods
+
+#### Subscribe
+
+
+
+
+
+```ts
+const userListener = supabase
+ .from('users')
+ .on('*', (payload) => handleAllEventsPayload(payload.new))
+ .subscribe()
+```
+
+
+
+
+
+```ts
+const userListener = supabase.channel('public:user')
+ .on(
+ 'postgres_changes',
+ { event: '*', schema: 'public', table: 'user' }
+ (payload) => handleAllEventsPayload()
+ )
+ .subscribe()
+```
+
+
+
+
+#### Unsubscribe
+
+
+
+
+
+```ts
+userListener.unsubscribe()
+```
+
+
+
+
+
+```ts
+supabase.removeChannel('public:users')
+```
+
+
+
diff --git a/apps/temp-docs/_supabase_js/working-with-types.md b/apps/temp-docs/_supabase_js/working-with-types.md
new file mode 100644
index 00000000000..cb564843bba
--- /dev/null
+++ b/apps/temp-docs/_supabase_js/working-with-types.md
@@ -0,0 +1,81 @@
+---
+id: typescript-support
+---
+
+# Typescript Support
+
+`supabase-js` supports Typescript.
+
+## Generating types
+
+You can use our CLI to generate types:
+
+```bash
+supabase start
+supabase gen types typescript --local > lib/database.types.ts
+```
+
+These types are generated directly from your database. Given a table `public.movies`, the definition will provide the following data:
+
+```ts
+interface Database {
+ public: {
+ Tables: {
+ movies: {
+ Row: {} // The data expected to be returned from a "select" statement.
+ Insert: {} // The data expected passed to an "insert" statement.
+ Update: {} // The data expected passed to an "update" statement.
+ }
+ }
+ }
+}
+```
+
+There is a difference between `selects`, `inserts`, and `updates`, because often you will set default values in your database for specific columns.
+With default values you do not need to send any data over the network, even if that column is a "required" field. Our type system is granular
+enough to handle these situations.
+
+## Injecting type definitions
+
+You can enrich the supabase client with the types you generated with Supabase.
+
+```ts
+import { createClient } from '@supabase/supabase-js'
+import { Database } from 'lib/database.types'
+
+const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY)
+```
+
+## Type hints
+
+`supabase-js` always returns a `data` object (for success), and an `error` response (for unsuccessful requests).
+This provides a simple interface to get the relevant types returned from any function:
+
+```ts
+export async function getMovies() {
+ return await supabase.from('movies').select(`id, title`)
+}
+
+type MoviesResponse = Awaited>
+export type MoviesResponseSuccess = MoviesResponse['data']
+export type MoviesResponseError = MoviesResponse['error']
+```
+
+## Nested tables
+
+For advanced queries such as nested tables, you may want to construct your own types.
+
+```ts
+import supabase from '~/lib/supabase'
+import type { Database } from '~/lib/database.types'
+
+async function getMovies() {
+ return await supabase.from('movies').select('id, title, actors(*)')
+}
+
+type Actors = Database['public']['Tables']['actors']['Row']
+type MoviesResponse = Awaited>
+type MoviesResponseSuccess = MoviesResponse['data'] & {
+ actors: Actors[]
+}
+```
diff --git a/apps/temp-docs/_supabase_js_versioned_docs/version-v1/generating-types.mdx b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/generating-types.mdx
new file mode 100644
index 00000000000..033cfdb9165
--- /dev/null
+++ b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/generating-types.mdx
@@ -0,0 +1,42 @@
+---
+id: generating-types
+title: 'Generating Types'
+slug: generating-types
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v1.yml
+---
+
+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).
+
+## Usage with TypeScript
+
+`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.
+If you don't provide a type for the row you need to explicitly pass `from('tableName')`.
+
+```ts
+type Message = {
+ id: number
+ inserted_at: string
+ message: string
+ user_id: string
+ channel_id: number
+ author: { username: string }
+}
+
+const response = await supabase
+ .from('messages') // Message maps to the type of the row in your database.
+ .select('*, author:user_id(username)')
+ .match({ channel_id: 2 }) // Your IDE will be able to help with auto-completion.
+response.data // Response data will be of type Array.
+
+// If you don't provide a type for the row you need to explicitly pass `from('tableName')`.
+const response = await supabase
+ .from('messages')
+ .select('*, author:user_id(username)')
+ .match({ channel_id: 2 })
+response.data // Response data will be of type Array.
+```
diff --git a/apps/temp-docs/_supabase_js_versioned_docs/version-v1/index.mdx b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/index.mdx
new file mode 100644
index 00000000000..8f37f5853e8
--- /dev/null
+++ b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/index.mdx
@@ -0,0 +1,11 @@
+---
+id: index
+title: 'Supabase Client'
+slug: supabase-client
+custom_edit_url: ../../spec/supabase_js_v1.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Supabase JavaScript.
diff --git a/apps/temp-docs/_supabase_js_versioned_docs/version-v1/initializing.mdx b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/initializing.mdx
new file mode 100644
index 00000000000..711f03f2aed
--- /dev/null
+++ b/apps/temp-docs/_supabase_js_versioned_docs/version-v1/initializing.mdx
@@ -0,0 +1,151 @@
+---
+id: initializing
+title: 'Initializing'
+slug: initializing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v1.yml
+---
+
+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 functionality
+and is the easiest way to interact with everything we offer within the Supabase ecosystem.
+
+## Parameters
+
+
+
+
+
+
+ supabaseUrl
+
+
+ required
+
+
+ string
+
+
+
+
+The unique Supabase URL which is supplied when you create a new project in your project dashboard.
+
+
+
+
+
+
+
+
+ supabaseKey
+
+
+ required
+
+
+ string
+
+
+
+
+The unique Supabase Key which is supplied when you create a new project in your project dashboard.
+
+