Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

support for union types

Copple3c610f338d2a
diff --git a/apps/reference/_supabase_js/generated/auth-api-createuser.mdx b/apps/reference/_supabase_js/generated/auth-api-createuser.mdx
index 9e14d73a7a4..46c9ef301d4 100644
--- a/apps/reference/_supabase_js/generated/auth-api-createuser.mdx
+++ b/apps/reference/_supabase_js/generated/auth-api-createuser.mdx
@@ -9,7 +9,6 @@ import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
Creates a new user.
-
This function should only be called on a server. Never expose your `service_role` key in the browser.
```js
diff --git a/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx b/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx
index 35f48c85573..d7e52882ef7 100644
--- a/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx
+++ b/apps/reference/_supabase_js/generated/auth-api-deleteuser.mdx
@@ -10,8 +10,6 @@ import TabItem from '@theme/TabItem'
Delete a user. Requires a `service_role` key.
-This function should only be called on a server. Never expose your `service_role` key in the browser.
-
```js
const { data: user, error } = await supabase.auth.api.deleteUser(
'715ed5db-f090-4b8c-a067-640ecee36aa0'
@@ -38,6 +36,8 @@ const { data: user, error } = await supabase.auth.api.deleteUser(
The user uid you want to remove.
+This function should only be called on a server. Never expose your `service_role` key in the browser.
+
</div>
</li>
diff --git a/apps/reference/_supabase_js/generated/auth-signinwithotp.mdx b/apps/reference/_supabase_js/generated/auth-signinwithotp.mdx
index f1355cf5e87..5cc5828a8cd 100644
--- a/apps/reference/_supabase_js/generated/auth-signinwithotp.mdx
+++ b/apps/reference/_supabase_js/generated/auth-signinwithotp.mdx
@@ -39,6 +39,136 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ phone
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's phone number.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ email
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's email address.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ options
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>object</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+No description provided.
+
+ </div>
+
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ captchaToken
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+Verification token received when the user completes the captcha on the site.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ emailRedirectTo
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The redirect url embedded in the email link
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ shouldCreateUser
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If set to false, this method will not create a new user. Defaults to true.
+
+ </div>
+
+</li>
+
+</ul>
+
+</li>
+
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/auth-signinwithpassword.mdx b/apps/reference/_supabase_js/generated/auth-signinwithpassword.mdx
index f89be8fa62e..77e4c92cdab 100644
--- a/apps/reference/_supabase_js/generated/auth-signinwithpassword.mdx
+++ b/apps/reference/_supabase_js/generated/auth-signinwithpassword.mdx
@@ -39,6 +39,116 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ phone
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's phone number.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ password
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's password.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ email
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's email address.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ options
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>object</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+No description provided.
+
+ </div>
+
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ captchaToken
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+Verification token received when the user completes the captcha on the site.
+
+ </div>
+
+</li>
+
+</ul>
+
+</li>
+
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/auth-signup.mdx b/apps/reference/_supabase_js/generated/auth-signup.mdx
index b123927a664..061e3da0419 100644
--- a/apps/reference/_supabase_js/generated/auth-signup.mdx
+++ b/apps/reference/_supabase_js/generated/auth-signup.mdx
@@ -39,6 +39,156 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ phone
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's phone number.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ password
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's password.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ email
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's email address.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ options
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>object</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+No description provided.
+
+ </div>
+
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ captchaToken
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+Verification token received when the user completes the captcha on the site.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ data
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>object</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The user's metadata.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ emailRedirectTo
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>string</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The redirect url embedded in the email link
+
+ </div>
+
+</li>
+
+</ul>
+
+</li>
+
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/containedby.mdx b/apps/reference/_supabase_js/generated/containedby.mdx
index aa8f5da0d93..938a48eea42 100644
--- a/apps/reference/_supabase_js/generated/containedby.mdx
+++ b/apps/reference/_supabase_js/generated/containedby.mdx
@@ -60,6 +60,10 @@ The value to filter with.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/contains.mdx b/apps/reference/_supabase_js/generated/contains.mdx
index 05ffa13e34d..a1b4afdc088 100644
--- a/apps/reference/_supabase_js/generated/contains.mdx
+++ b/apps/reference/_supabase_js/generated/contains.mdx
@@ -60,6 +60,10 @@ The value to filter with.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/delete.mdx b/apps/reference/_supabase_js/generated/delete.mdx
index cedfd86b77f..26ddd38273b 100644
--- a/apps/reference/_supabase_js/generated/delete.mdx
+++ b/apps/reference/_supabase_js/generated/delete.mdx
@@ -60,6 +60,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/filter.mdx b/apps/reference/_supabase_js/generated/filter.mdx
index 738ef78f541..fb998cafa06 100644
--- a/apps/reference/_supabase_js/generated/filter.mdx
+++ b/apps/reference/_supabase_js/generated/filter.mdx
@@ -59,6 +59,10 @@ The operator to filter with.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/getchannels.mdx b/apps/reference/_supabase_js/generated/getchannels.mdx
index 732f3d0b133..befb08174ad 100644
--- a/apps/reference/_supabase_js/generated/getchannels.mdx
+++ b/apps/reference/_supabase_js/generated/getchannels.mdx
@@ -1,6 +1,6 @@
---
id: getchannels
-title: 'getChannels()'
+title: 'getSubscriptions()'
slug: /getchannels
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
---
diff --git a/apps/reference/_supabase_js/generated/insert.mdx b/apps/reference/_supabase_js/generated/insert.mdx
index b5904f9478a..b99a7e0de4f 100644
--- a/apps/reference/_supabase_js/generated/insert.mdx
+++ b/apps/reference/_supabase_js/generated/insert.mdx
@@ -38,6 +38,10 @@ The values to insert.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
@@ -79,6 +83,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/invoke.mdx b/apps/reference/_supabase_js/generated/invoke.mdx
index 235e1167dca..9b359f6538c 100644
--- a/apps/reference/_supabase_js/generated/invoke.mdx
+++ b/apps/reference/_supabase_js/generated/invoke.mdx
@@ -79,6 +79,10 @@ the body of the request
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/overlaps.mdx b/apps/reference/_supabase_js/generated/overlaps.mdx
index 5f646551aee..b64a5051cc1 100644
--- a/apps/reference/_supabase_js/generated/overlaps.mdx
+++ b/apps/reference/_supabase_js/generated/overlaps.mdx
@@ -60,6 +60,10 @@ The value to filter with.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/removeallchannels.mdx b/apps/reference/_supabase_js/generated/removeallchannels.mdx
index f8cdd6747fe..b862afa2940 100644
--- a/apps/reference/_supabase_js/generated/removeallchannels.mdx
+++ b/apps/reference/_supabase_js/generated/removeallchannels.mdx
@@ -1,6 +1,6 @@
---
id: removeallchannels
-title: 'removeAllChannels()'
+title: 'removeAllSubscriptions()'
slug: /removeallchannels
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
---
diff --git a/apps/reference/_supabase_js/generated/rpc.mdx b/apps/reference/_supabase_js/generated/rpc.mdx
index e5899dbbb22..dc522eea08c 100644
--- a/apps/reference/_supabase_js/generated/rpc.mdx
+++ b/apps/reference/_supabase_js/generated/rpc.mdx
@@ -106,6 +106,10 @@ Count algorithm to use to count rows in a table.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/select.mdx b/apps/reference/_supabase_js/generated/select.mdx
index dd25e2cb135..ad178c381d0 100644
--- a/apps/reference/_supabase_js/generated/select.mdx
+++ b/apps/reference/_supabase_js/generated/select.mdx
@@ -77,6 +77,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/storage-from-update.mdx b/apps/reference/_supabase_js/generated/storage-from-update.mdx
index 4af78808873..6a7459f6abd 100644
--- a/apps/reference/_supabase_js/generated/storage-from-update.mdx
+++ b/apps/reference/_supabase_js/generated/storage-from-update.mdx
@@ -62,6 +62,10 @@ The body of the file to be stored in the bucket.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/storage-from-upload.mdx b/apps/reference/_supabase_js/generated/storage-from-upload.mdx
index 4cf53402e23..dca9d6464dc 100644
--- a/apps/reference/_supabase_js/generated/storage-from-upload.mdx
+++ b/apps/reference/_supabase_js/generated/storage-from-upload.mdx
@@ -62,6 +62,10 @@ The body of the file to be stored in the bucket.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/apps/reference/_supabase_js/generated/textsearch.mdx b/apps/reference/_supabase_js/generated/textsearch.mdx
index 4ba108f4520..92a5da1237c 100644
--- a/apps/reference/_supabase_js/generated/textsearch.mdx
+++ b/apps/reference/_supabase_js/generated/textsearch.mdx
@@ -114,6 +114,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/update.mdx b/apps/reference/_supabase_js/generated/update.mdx
index 0735e143d64..d377e589851 100644
--- a/apps/reference/_supabase_js/generated/update.mdx
+++ b/apps/reference/_supabase_js/generated/update.mdx
@@ -80,6 +80,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
</ul>
diff --git a/apps/reference/_supabase_js/generated/upsert.mdx b/apps/reference/_supabase_js/generated/upsert.mdx
index 7fa46090407..d4f63b4e66a 100644
--- a/apps/reference/_supabase_js/generated/upsert.mdx
+++ b/apps/reference/_supabase_js/generated/upsert.mdx
@@ -38,6 +38,10 @@ The values to insert.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
@@ -79,6 +83,10 @@ No description provided.
</div>
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+</ul>
+
</li>
<li className="method-list-item">
diff --git a/packages/generator/LegacyReferenceGenerator.ts b/packages/generator/LegacyReferenceGenerator.ts
index 732b63b12cf..3a28adbe295 100644
--- a/packages/generator/LegacyReferenceGenerator.ts
+++ b/packages/generator/LegacyReferenceGenerator.ts
@@ -17,6 +17,7 @@ import {
writeToDisk,
} from './src/legacy/lib/helpers'
import { TsDoc, OpenRef } from './src/legacy/definitions'
+import { uniqBy } from 'lodash'
const yaml = require('js-yaml')
const fs = require('fs')
@@ -131,12 +132,10 @@ function getDescriptionFromDefintion(tsDefinition) {
}
function recurseThroughParams(paramDefinition: TsDoc.TypeDefinition) {
- let param =
- paramDefinition.type?.type == 'reference' &&
- paramDefinition.type?.dereferenced?.id
- ? paramDefinition.type?.dereferenced
- : paramDefinition
- let children = param.type?.declaration?.children ?? param.children
+ // If this is a reference to another Param, let's use the reference instead
+ let param = isDereferenced(paramDefinition)
+ ? paramDefinition.type?.dereferenced
+ : paramDefinition
const labelParams = {
name: param.name,
@@ -146,6 +145,12 @@ function recurseThroughParams(paramDefinition: TsDoc.TypeDefinition) {
}
let subContent = ''
+ let children = param.type?.declaration?.children
+ ? param.type?.declaration?.children
+ : isUnion(param)
+ ? mergeUnion(param)
+ : param.children
+
if (!!children) {
let properties = children
.sort((a, b) => a.name.localeCompare(b.name)) // first alphabetical
@@ -158,6 +163,27 @@ function recurseThroughParams(paramDefinition: TsDoc.TypeDefinition) {
return methodListItemLabel(labelParams, subContent)
}
+const isDereferenced = (paramDefinition: TsDoc.TypeDefinition) => {
+ return (
+ paramDefinition.type?.type == 'reference' &&
+ paramDefinition.type?.dereferenced?.id
+ )
+}
+
+const isUnion = (paramDefinition: TsDoc.TypeDefinition) => {
+ return paramDefinition.type?.type == 'union'
+}
+
+const mergeUnion = (paramDefinition: TsDoc.TypeDefinition) => {
+ const joined = paramDefinition.type.types.reduce((acc, x) => {
+ acc.push(...x.declaration.children)
+ return acc
+ }, [])
+
+ console.log('joined', joined)
+ return uniqBy(joined, 'name')
+}
+
const methodListGroup = (items) => `
<ul className="method-list-group">
${items}
diff --git a/spec/supabase_js_v2_legacy.yml b/spec/supabase_js_v2_legacy.yml
index 18bf382b85d..faa43cc4faf 100644
--- a/spec/supabase_js_v2_legacy.yml
+++ b/spec/supabase_js_v2_legacy.yml
@@ -1242,9 +1242,9 @@ pages:
.subscribe()
```
- removeSubscription():
- title: 'removeSubscription()'
- $ref: '@supabase/supabase-js.index.SupabaseClient.removeSubscription'
+ removeChannel():
+ title: 'removeChannel()'
+ $ref: '@supabase/supabase-js.index.SupabaseClient.removeChannel'
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:
@@ -1252,12 +1252,12 @@ pages:
isSpotlight: true
js: |
```js
- supabase.removeSubscription(mySubscription)
+ supabase.removeChannel(mySubscription)
```
- removeAllSubscriptions():
+ removeAllChannels():
title: 'removeAllSubscriptions()'
- $ref: '@supabase/supabase-js.index.SupabaseClient.removeAllSubscriptions'
+ $ref: '@supabase/supabase-js.index.SupabaseClient.removeAllChannels'
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:
@@ -1265,18 +1265,18 @@ pages:
isSpotlight: true
js: |
```js
- supabase.removeAllSubscriptions()
+ supabase.removeAllChannels()
```
- getSubscriptions():
+ getChannels():
title: 'getSubscriptions()'
- $ref: '@supabase/supabase-js.index.SupabaseClient.getSubscriptions'
+ $ref: '@supabase/supabase-js.index.SupabaseClient.getChannels'
examples:
- name: Get all subscriptions
isSpotlight: true
js: |
```js
- const subscriptions = supabase.getSubscriptions()
+ const subscriptions = supabase.getChannels()
```
storage.listBuckets():