Skip to content

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

make things into components

Jonathan Summers-Muirc475dcad0639
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
index 8a977a0c01c..cdd02ff0eb0 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
@@ -1,19 +1,17 @@
+import * as Accordion from '@radix-ui/react-accordion'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { IconChevronLeft } from 'ui'
import * as NavItems from './NavigationMenu.constants'
-import * as Accordion from '@radix-ui/react-accordion'
+import { find } from 'lodash'
import Image from 'next/image'
+import { memo } from 'react'
import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
-import { useEffect, useState, memo } from 'react'
-import useWindowLocation from '~/hooks/useWindowLocation'
-import { useNavigationMenuContext } from './NavigationMenu.Context'
-import { find } from 'lodash'
-import { useMenuActiveRefId } from '~/hooks/useMenuState'
import RevVersionDropdown from '~/components/RefVersionDropdown'
+import { useMenuActiveRefId } from '~/hooks/useMenuState'
-const allFunctions = Object.values(clientLibsCommonSections.sections.functions)
+const allFunctions = clientLibsCommonSections
const FunctionLink = ({
title,
@@ -69,12 +67,12 @@ const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => {
const router = useRouter()
const allCurrentFunctions = allFunctions
- .map((fn: any) => {
- if (fn.items.flat().find((item) => item.libs.includes(lib))) return fn
- })
- .filter((item) => item)
+ // .map((fn: any) => {
+ // if (fn.items.flat().find((item) => item.libs.includes(lib))) return fn
+ // })
+ // .filter((item) => item)
- const introItems = Object.values(clientLibsCommonSections.sections.intro[lib].items)
+ // const introItems = Object.values(clientLibsCommonSections.sections.intro[lib].items)
const menu = NavItems[id]
@@ -88,6 +86,12 @@ const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => {
id: 'using-modifiers',
}).items.map((x) => x.id)
+ // return (
+ // <>
+ // <h1>something</h1>
+ // </>
+ // )
+
return (
<div
className={[
@@ -141,14 +145,14 @@ const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => {
{/* )} */}
<ul className="function-link-list">
- {introItems.map((item) => (
+ {/* {introItems.map((item) => (
// @ts-ignore
<FunctionLink library={menu.title} {...item} />
- ))}
+ ))} */}
{allCurrentFunctions.map((fn: any) => {
- const toplevelItems = fn.items.filter((item) => !item.parent)
- toplevelItems.map((item) => <li>{item.title}</li>)
+ // const toplevelItems = fn.items.filter((item) => !item.parent)
+ // toplevelItems.map((item) => <li>{item.title}</li>)
const RenderLink = (props) => {
const activeAccordianItem = useMenuActiveRefId()
@@ -204,17 +208,30 @@ const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => {
)
}
- return (
- <>
- <Divider />
- <SideMenuTitle title={fn.title} />
- {fn.items
- .filter((item) => item.libs.includes(lib))
- .map((item) => (
- <RenderLink {...item} library={menu.title} />
- ))}
- </>
- )
+ // handle subtitles with subitems
+ if (!fn.id) {
+ return (
+ <>
+ <Divider />
+ <SideMenuTitle title={fn.title} />
+ {fn.items &&
+ fn.items
+ .filter((item) => item.libs.includes(lib))
+ .map((item) => <RenderLink {...item} library={menu.title} />)}
+ </>
+ )
+ } else {
+ // handle normal links
+ return (
+ <>
+ <RenderLink {...fn} library={menu.title} />
+ {fn.items &&
+ fn.items
+ .filter((item) => item.libs.includes(lib))
+ .map((item) => <RenderLink {...item} library={menu.title} />)}
+ </>
+ )
+ }
})}
</ul>
{menu.extras && (
diff --git a/apps/docs/components/reference/RefEducationSection.tsx b/apps/docs/components/reference/RefEducationSection.tsx
new file mode 100644
index 00000000000..05ae7a178f8
--- /dev/null
+++ b/apps/docs/components/reference/RefEducationSection.tsx
@@ -0,0 +1,23 @@
+import RefSubLayout from '~/layouts/ref/RefSubLayout'
+import { MDXRemote } from 'next-mdx-remote'
+import components from '~/components'
+
+const RefEducationSection = (props) => {
+ // gracefully reject pages we can't render
+ if (!props.markdownContent) return <></>
+
+ return (
+ <RefSubLayout.EducationSection
+ key={props.item.id}
+ title={props.item.title}
+ hideTitle={props.markdownContent.meta.hideTitle}
+ id={props.item.id}
+ slug={props.item.id}
+ scrollSpyHeader={true}
+ >
+ <MDXRemote {...props.markdownContent.content} components={components} />
+ </RefSubLayout.EducationSection>
+ )
+}
+
+export default RefEducationSection
diff --git a/apps/docs/components/reference/RefFunctionSection.tsx b/apps/docs/components/reference/RefFunctionSection.tsx
new file mode 100644
index 00000000000..69027fb6763
--- /dev/null
+++ b/apps/docs/components/reference/RefFunctionSection.tsx
@@ -0,0 +1,212 @@
+import ReactMarkdown from 'react-markdown'
+
+import { IconDatabase, Tabs } from 'ui'
+import CodeBlock from '~/components/CodeBlock/CodeBlock'
+
+import Options from '~/components/Options'
+import Param from '~/components/Params'
+import RefSubLayout from '~/layouts/ref/RefSubLayout'
+import { extractTsDocNode, generateParameters } from '~/lib/refGenerator/helpers'
+
+import RefDetailCollapse from '~/components/reference/RefDetailCollapse'
+
+interface ICommonFunc {
+ id: string
+ title: string
+ slug: string
+ product: string
+ libs: string
+ items: ICommonFunc[]
+}
+
+interface IRefFunctionSection {
+ funcData: any
+ commonFuncData: ICommonFunc
+ libSpec: any
+ typeSpec: any
+}
+
+const RefFunctionSection: React.FC<IRefFunctionSection> = (props) => {
+ const item = props.libSpec.functions.find((x: any) => x.id === props.funcData.id)
+
+ // gracefully return nothing if function does not exist
+ if (!item) return <></>
+
+ if (item && !item['$ref']) {
+ console.log('🚩 issue with ref', item.id)
+ }
+
+ // console.log(item)
+ const hasTsRef = item['$ref'] || null
+ const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, props.typeSpec)
+ const parameters = hasTsRef ? generateParameters(tsDefinition) : ''
+ const shortText = hasTsRef ? tsDefinition.signatures[0].comment.shortText : ''
+
+ return (
+ <>
+ <RefSubLayout.Section
+ key={item.id}
+ title={`${props.commonFuncData.title}`}
+ id={item.id}
+ slug={props.commonFuncData.slug}
+ scrollSpyHeader={true}
+ >
+ <RefSubLayout.Details>
+ <>
+ <header className={['mb-16'].join(' ')}>
+ {shortText && <ReactMarkdown className="text-sm">{shortText}</ReactMarkdown>}
+ </header>
+
+ {item.description && (
+ <div className="prose">
+ <ReactMarkdown className="text-sm">{item.description}</ReactMarkdown>
+ </div>
+ )}
+ {/* {functionMarkdownContent && (
+ <div className="prose">
+ <MDXRemote {...functionMarkdownContent} components={components} />
+ </div>
+ )} */}
+ {item.notes && (
+ <div className="prose">
+ <ReactMarkdown className="text-sm">{item.notes}</ReactMarkdown>
+ </div>
+ )}
+ {/* // parameters */}
+ {parameters && (
+ <div className="not-prose mt-12">
+ <h5 className="mb-3 text-base text-scale-1200">Parameters</h5>
+ <ul className="">
+ {parameters.map((param) => {
+ // grab override params from yaml file
+ const overrideParams = item.overrideParams
+
+ // params from the yaml file can override the params from parameters if it matches the name
+ const overide = overrideParams?.filter((x) => {
+ return param.name === x.name
+ })
+
+ const paramItem = overide?.length > 0 ? overide[0] : param
+
+ return (
+ <Param {...paramItem}>
+ {paramItem.subContent && (
+ <div className="mt-3">
+ <Options>
+ {param.subContent.map((param) => {
+ return <Options.Option {...param} />
+ })}
+ </Options>
+ </div>
+ )}
+ </Param>
+ )
+ })}
+ </ul>
+ </div>
+ )}
+ </>
+ </RefSubLayout.Details>
+ <RefSubLayout.Examples>
+ {item.examples && (
+ <>
+ <Tabs
+ defaultActiveId={item.examples[0].id}
+ size="tiny"
+ type="rounded-pills"
+ scrollable
+ >
+ {item.examples &&
+ item.examples.map((example, exampleIndex) => {
+ const exampleString = `
+import { 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')
+`
+ const currentExampleId = example.id
+ const staticExample = item.examples[exampleIndex]
+
+ const response = staticExample.response
+ const sql = staticExample?.data?.sql
+ const tables = staticExample?.data?.tables
+
+ return (
+ <Tabs.Panel
+ id={example.id}
+ label={example.name}
+ className="flex flex-col gap-3"
+ >
+ {((tables && tables.length > 0) || sql) && (
+ <RefDetailCollapse
+ id={`${example.id}-${exampleIndex}-data`}
+ label="Example data source"
+ defaultOpen={false}
+ >
+ <>
+ {tables &&
+ tables.length > 0 &&
+ tables.map((table) => {
+ return (
+ <div className="bg-scale-300 border rounded prose max-w-none">
+ <div className="bg-scale-200 px-5 py-2">
+ <div className="flex gap-2 items-center">
+ <div className="text-brand-900">
+ <IconDatabase size={16} />
+ </div>
+ <h5 className="text-xs text-scale-1200">{table.name}</h5>
+ </div>
+ </div>
+ </div>
+ )
+ })}
+ {sql && (
+ <CodeBlock
+ className="useless-code-block-class my-0 border border-t-0 border-scale-500 !rounded-tl-none !rounded-tr-none"
+ language="sql"
+ hideLineNumbers={true}
+ >
+ {sql}
+ </CodeBlock>
+ )}
+ </>
+ </RefDetailCollapse>
+ )}
+
+ <CodeBlock
+ className="useless-code-block-class"
+ language="js"
+ hideLineNumbers={true}
+ >
+ {exampleString +
+ (example.code &&
+ example.code.replace('```', '').replace('js', '').replace('```', ''))}
+ </CodeBlock>
+ {response && (
+ <RefDetailCollapse
+ id={`${example.id}-${exampleIndex}-response`}
+ label="Example response"
+ defaultOpen={false}
+ >
+ <CodeBlock
+ className="useless-code-block-class"
+ language="js"
+ hideLineNumbers={true}
+ >
+ {response.replace('```', '').replace('json', '').replace('```', '')}
+ </CodeBlock>
+ </RefDetailCollapse>
+ )}
+ </Tabs.Panel>
+ )
+ })}
+ </Tabs>
+ </>
+ )}
+ </RefSubLayout.Examples>
+ </RefSubLayout.Section>
+ </>
+ )
+}
+
+export default RefFunctionSection
diff --git a/apps/docs/docs/ref/js/installing.mdx b/apps/docs/docs/ref/js/installing.mdx
new file mode 100644
index 00000000000..fb4e334389e
--- /dev/null
+++ b/apps/docs/docs/ref/js/installing.mdx
@@ -0,0 +1,79 @@
+---
+id: installing
+title: 'Installing'
+slug: installing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml
+---
+
+### Install as package
+
+<RefSubLayout.EducationRow>
+ <RefSubLayout.Details>
+
+ You can install @supabase/supabase-js via the terminal.
+
+ </RefSubLayout.Details>
+
+ <RefSubLayout.Examples>
+
+ <Tabs
+ size="small"
+ type="underlined"
+ defaultActiveId="npm"
+ >
+ <TabPanel id="npm" label="npm">
+
+ ```sh Terminal
+ npm install @supabase/supabase-js
+ ```
+
+ </TabPanel>
+ <TabPanel id="yarn" label="Yarn">
+
+ ```sh Terminal
+ yarn add @supabase/supabase-js
+ ```
+
+ </TabPanel>
+ </Tabs>
+
+ </RefSubLayout.Examples>
+</RefSubLayout.EducationRow>
+
+### Install via CDN
+
+<RefSubLayout.EducationRow>
+ <RefSubLayout.Details>
+
+ You can install @supabase/supabase-js via CDN links.
+
+ </RefSubLayout.Details>
+
+ <RefSubLayout.Examples>
+
+ ```js
+ <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
+ //or
+ <script src="https://unpkg.com/@supabase/supabase-js@2"></script>
+ ```
+
+ </RefSubLayout.Examples>
+</RefSubLayout.EducationRow>
+
+### Use at runtime in Deno
+
+<RefSubLayout.EducationRow>
+ <RefSubLayout.Details>
+
+ You can use supabase-js in the Deno runtime via esm.sh:
+
+ </RefSubLayout.Details>
+
+ <RefSubLayout.Examples>
+
+ ```ts
+ import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
+ ```
+
+ </RefSubLayout.Examples>
+</RefSubLayout.EducationRow>
diff --git a/apps/docs/docs/ref/js/introduction.mdx b/apps/docs/docs/ref/js/introduction.mdx
new file mode 100644
index 00000000000..95e99f2d978
--- /dev/null
+++ b/apps/docs/docs/ref/js/introduction.mdx
@@ -0,0 +1,20 @@
+---
+id: introduction
+title: Introduction
+hideTitle: true
+---
+
+<div className="flex items-start gap-6 not-prose">
+ <img src="/docs/img/icons/javascript-icon.svg" className="w-8 h-8 rounded" />
+ <div className="flex flex-col gap-2">
+ <h1 className="text-3xl text-scale-1200 m-0">Javascript Client Library</h1>
+ <h2 className="text-base font-mono text-scale-1100">@supabase/supabase-js</h2>
+ </div>
+</div>
+
+<div className="max-w-xl">
+ This reference documents every object and method available in Supabase's isomorphic JavaScript
+ library, supabase-js. You can use supabase-js to interact with your Postgres database, listen to
+ database changes, invoke Deno Edge Functions, build login and user management functionality, and
+ manage large files.
+</div>
diff --git a/apps/docs/layouts/ref/RefSubLayout.tsx b/apps/docs/layouts/ref/RefSubLayout.tsx
index 6960152aa61..2f307fa35e6 100644
--- a/apps/docs/layouts/ref/RefSubLayout.tsx
+++ b/apps/docs/layouts/ref/RefSubLayout.tsx
@@ -40,6 +40,7 @@ interface IEducationSection {
monoFont?: boolean
slug: string
scrollSpyHeader?: boolean
+ hideTitle?: boolean
}
interface ISectionDetails {}
interface ISectionExamples {}
@@ -120,12 +121,11 @@ const EducationRow: FC<IEducationRow> = (props) => {
return <div className="grid lg:grid-cols-2 gap-8 lg:gap-16">{props.children}</div>
}
-const EducationSection: FC<IEducationSection> = (props) => {
+const EducationSection: FC<IEducationSection> = ({ hideTitle = false, ...props }) => {
// console.log({ props })
return (
<article key={props.id} className={`${'prose dark:prose-dark max-w-none py-16 lg:py-32'}`}>
- <StickyHeader {...props} />
-
+ {!hideTitle && <StickyHeader {...props} />}
{props.children}
</article>
)
diff --git a/apps/docs/lib/helpers.ts b/apps/docs/lib/helpers.ts
index b5df2c0d5c0..5f219ce0bc6 100644
--- a/apps/docs/lib/helpers.ts
+++ b/apps/docs/lib/helpers.ts
@@ -32,3 +32,68 @@ export function getPageType(asPath: string) {
return page
}
+
+export function flattenSections(sections) {
+ var a = []
+ for (var i = 0; i < sections.length; i++) {
+ if (sections[i].id) {
+ // only push a section that has an id
+ // these are reserved for sidebar subtitles
+ a.push(sections[i])
+ }
+ if (sections[i].items) {
+ // if there are subitems, loop through
+ a = a.concat(flattenSections(sections[i].items))
+ }
+ }
+ return a
+}
+
+export async function RefMarkdownCompiler(sections) {
+ /**
+ * Read all the markdown files that might have
+ * - custom text
+ * - call outs
+ * - important notes regarding implementation
+ */
+ await Promise.all(
+ sections.map(async (x, i) => {
+ if (!x.id) return null
+
+ const pathName = `docs/ref/js/${x.id}.mdx`
+
+ function checkFileExists(x) {
+ if (fs.existsSync(x)) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ const markdownExists = checkFileExists(pathName)
+
+ if (!markdownExists) return null
+
+ const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
+ const { data, content } = matter(fileContents)
+
+ markdownContent.push({
+ id: x.id,
+ title: x.title,
+ meta: data,
+ // introPage: introPages.includes(x),
+ content: content
+ ? await serialize(content ?? '', {
+ // MDX's available options, see the MDX docs for more info.
+ // https://mdxjs.com/packages/mdx/#compilefile-options
+ mdxOptions: {
+ remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme }]],
+ useDynamicImport: true,
+ },
+ // Indicates whether or not to parse the frontmatter from the mdx source
+ })
+ : null,
+ })
+ })
+ )
+}
diff --git a/apps/docs/lib/mdx/generateOldRefMarkdown.tsx b/apps/docs/lib/mdx/generateOldRefMarkdown.tsx
new file mode 100644
index 00000000000..20a806ec32b
--- /dev/null
+++ b/apps/docs/lib/mdx/generateOldRefMarkdown.tsx
@@ -0,0 +1,36 @@
+import { serialize } from 'next-mdx-remote/serialize'
+
+import { remarkCodeHike } from '@code-hike/mdx'
+import codeHikeTheme from '~/codeHikeTheme.js'
+
+import toc from 'markdown-toc'
+
+import { getDocsBySlug } from '~/lib/docs'
+
+// @ts-ignore
+// @ts-ignore
+
+async function generateOldRefMarkdown(slug) {
+ let doc = getDocsBySlug(slug)
+ const content = await serialize(doc.content ?? '', {
+ // MDX's available options, see the MDX docs for more info.
+ // https://mdxjs.com/packages/mdx/#compilefile-options
+ mdxOptions: {
+ remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme, showCopyButton: true }]],
+ useDynamicImport: true,
+ },
+ // Indicates whether or not to parse the frontmatter from the mdx source
+ })
+ return {
+ props: {
+ /*
+ * old reference docs are below
+ */
+ ...doc,
+ content,
+ toc: toc(doc.content, { maxdepth: 1, firsth1: false }),
+ },
+ }
+}
+
+export default generateOldRefMarkdown
diff --git a/apps/docs/lib/mdx/generateRefMarkdown.tsx b/apps/docs/lib/mdx/generateRefMarkdown.tsx
new file mode 100644
index 00000000000..db6793f2aba
--- /dev/null
+++ b/apps/docs/lib/mdx/generateRefMarkdown.tsx
@@ -0,0 +1,61 @@
+import fs from 'fs'
+
+import matter from 'gray-matter'
+import { serialize } from 'next-mdx-remote/serialize'
+
+import { remarkCodeHike } from '@code-hike/mdx'
+import codeHikeTheme from '~/codeHikeTheme.js'
+
+async function generateRefMarkdown(sections, slug) {
+ let markdownContent = []
+ /**
+ * Read all the markdown files that might have
+ * - custom text
+ * - call outs
+ * - important notes regarding implementation
+ */
+ await Promise.all(
+ sections.map(async (x, i) => {
+ if (!x.id) return null
+
+ const pathName = `docs/ref${slug}/${x.id}.mdx`
+
+ function checkFileExists(x) {
+ if (fs.existsSync(x)) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ const markdownExists = checkFileExists(pathName)
+
+ if (!markdownExists) return null
+
+ const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
+ const { data, content } = matter(fileContents)
+
+ markdownContent.push({
+ id: x.id,
+ title: x.title,
+ meta: data,
+ // introPage: introPages.includes(x),
+ content: content
+ ? await serialize(content ?? '', {
+ // MDX's available options, see the MDX docs for more info.
+ // https://mdxjs.com/packages/mdx/#compilefile-options
+ mdxOptions: {
+ remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme }]],
+ useDynamicImport: true,
+ },
+ // Indicates whether or not to parse the frontmatter from the mdx source
+ })
+ : null,
+ })
+ })
+ )
+
+ return markdownContent
+}
+
+export default generateRefMarkdown
diff --git a/apps/docs/pages/reference/javascript/[...slug].tsx b/apps/docs/pages/reference/javascript/[...slug].tsx
index 1c4139e10b5..4d852e385fe 100644
--- a/apps/docs/pages/reference/javascript/[...slug].tsx
+++ b/apps/docs/pages/reference/javascript/[...slug].tsx
@@ -1,242 +1,23 @@
-import { useEffect, useState } from 'react'
-
-import fs from 'fs'
-import toc from 'markdown-toc'
-
-import matter from 'gray-matter'
import { MDXRemote } from 'next-mdx-remote'
-import { serialize } from 'next-mdx-remote/serialize'
-import components from '~/components'
-import { getAllDocs, getDocsBySlug } from '~/lib/docs'
-
-import ReactMarkdown from 'react-markdown'
-
-// @ts-ignore
+import { useRouter } from 'next/router'
+import { useEffect } from 'react'
+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
import jsTypeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'
-// @ts-ignore
-import examples from '~/../../spec/examples/examples.yml' assert { type: 'yml' }
// @ts-expect-error
import jsSpec from '~/../../spec/supabase_js_v2_temp_new_shape.yml' assert { type: 'yml' }
-
-import commonLibJson from '~/../../spec/common-client-libs-sections.json'
-
-import { Button, IconChevronRight, IconDatabase, Tabs } from 'ui'
-import CodeBlock from '~/components/CodeBlock/CodeBlock'
-
-import { useRouter } from 'next/router'
-import { extractTsDocNode, generateParameters } from '~/lib/refGenerator/helpers'
-import Param from '~/components/Params'
-import Options from '~/components/Options'
-import RefSubLayout from '~/layouts/ref/RefSubLayout'
-
+import components from '~/components'
+import RefEducationSection from '~/components/reference/RefEducationSection'
+import RefFunctionSection from '~/components/reference/RefFunctionSection'
import OldLayout from '~/layouts/Default'
+import { getAllDocs } from '~/lib/docs'
+import { flattenSections } from '~/lib/helpers'
+import generateOldRefMarkdown from '~/lib/mdx/generateOldRefMarkdown'
+import generateRefMarkdown from '~/lib/mdx/generateRefMarkdown'
-import * as Accordion from '@radix-ui/react-accordion'
-import RefDetailCollapse from '~/components/reference/RefDetailCollapse'
-
-import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
-
-import remarkGfm from 'remark-gfm'
-import rehypeSlug from 'rehype-slug'
-import { remarkCodeHike } from '@code-hike/mdx'
-import codeHikeTheme from '~/codeHikeTheme.js'
-
-const allFunctions = Object.values(clientLibsCommonSections.sections.functions)
- .map((fn: any) => fn.items)
- .flat(2)
-
-//console.log('allFunctions', allFunctions)
-
-interface ICommonFunc {
- id: string
- title: string
- slug: string
- product: string
- libs: string
- items: ICommonFunc[]
-}
-
-interface IFunctionSection {
- funcData: any
- commonFuncData: ICommonFunc
-}
-
-const FunctionSection: React.FC<IFunctionSection> = (props) => {
- const item = jsSpec.functions.find((x) => x.id === props.funcData.id)
- const hasTsRef = item['$ref'] || null
- const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, jsTypeSpec)
- const parameters = hasTsRef ? generateParameters(tsDefinition) : ''
- const shortText = hasTsRef ? tsDefinition.signatures[0].comment.shortText : ''
-
- return (
- <>
- <RefSubLayout.Section
- key={item.id}
- title={`${props.commonFuncData.title}`}
- id={item.id}
- slug={props.commonFuncData.slug}
- scrollSpyHeader={true}
- >
- <RefSubLayout.Details>
- <>
- <header className={['mb-16'].join(' ')}>
- {shortText && <ReactMarkdown className="text-sm">{shortText}</ReactMarkdown>}
- </header>
-
- {item.description && (
- <div className="prose">
- <ReactMarkdown className="text-sm">{item.description}</ReactMarkdown>
- </div>
- )}
- {/* {functionMarkdownContent && (
- <div className="prose">
- <MDXRemote {...functionMarkdownContent} components={components} />
- </div>
- )} */}
- {item.notes && (
- <div className="prose">
- <ReactMarkdown className="text-sm">{item.notes}</ReactMarkdown>
- </div>
- )}
- {/* // parameters */}
- {parameters && (
- <div className="not-prose mt-12">
- <h5 className="mb-3 text-base text-scale-1200">Parameters</h5>
- <ul className="">
- {parameters.map((param) => {
- // grab override params from yaml file
- const overrideParams = item.overrideParams
-
- // params from the yaml file can override the params from parameters if it matches the name
- const overide = overrideParams?.filter((x) => {
- return param.name === x.name
- })
-
- const paramItem = overide?.length > 0 ? overide[0] : param
-
- return (
- <Param {...paramItem}>
- {paramItem.subContent && (
- <div className="mt-3">
- <Options>
- {param.subContent.map((param) => {
- return <Options.Option {...param} />
- })}
- </Options>
- </div>
- )}
- </Param>
- )
- })}
- </ul>
- </div>
- )}
- </>
- </RefSubLayout.Details>
- <RefSubLayout.Examples>
- {item.examples && (
- <>
- <Tabs
- defaultActiveId={item.examples[0].id}
- size="tiny"
- type="rounded-pills"
- scrollable
- >
- {item.examples &&
- item.examples.map((example, exampleIndex) => {
- const exampleString = `
-import { 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')
-`
- const currentExampleId = example.id
- const staticExample = item.examples[exampleIndex]
-
- const response = staticExample.response
- const sql = staticExample?.data?.sql
- const tables = staticExample?.data?.tables
-
- return (
- <Tabs.Panel
- id={example.id}
- label={example.name}
- className="flex flex-col gap-3"
- >
- {((tables && tables.length > 0) || sql) && (
- <RefDetailCollapse
- id={`${example.id}-${exampleIndex}-data`}
- label="Example data source"
- defaultOpen={false}
- >
- <>
- {tables &&
- tables.length > 0 &&
- tables.map((table) => {
- return (
- <div className="bg-scale-300 border rounded prose max-w-none">
- <div className="bg-scale-200 px-5 py-2">
- <div className="flex gap-2 items-center">
- <div className="text-brand-900">
- <IconDatabase size={16} />
- </div>
- <h5 className="text-xs text-scale-1200">{table.name}</h5>
- </div>
- </div>
- </div>
- )
- })}
- {sql && (
- <CodeBlock
- className="useless-code-block-class my-0 border border-t-0 border-scale-500 !rounded-tl-none !rounded-tr-none"
- language="sql"
- hideLineNumbers={true}
- >
- {sql}
- </CodeBlock>
- )}
- </>
- </RefDetailCollapse>
- )}
-
- <CodeBlock
- className="useless-code-block-class"
- language="js"
- hideLineNumbers={true}
- >
- {exampleString +
- (example.code &&
- example.code.replace('```', '').replace('js', '').replace('```', ''))}
- </CodeBlock>
- {response && (
- <RefDetailCollapse
- id={`${example.id}-${exampleIndex}-response`}
- label="Example response"
- defaultOpen={false}
- >
- <CodeBlock
- className="useless-code-block-class"
- language="js"
- hideLineNumbers={true}
- >
- {response.replace('```', '').replace('json', '').replace('```', '')}
- </CodeBlock>
- </RefDetailCollapse>
- )}
- </Tabs.Panel>
- )
- })}
- </Tabs>
- </>
- )}
- </RefSubLayout.Examples>
- </RefSubLayout.Section>
- </>
- )
-}
+const sections = flattenSections(clientLibsCommonSections)
export default function JSReference(props) {
- console.log('docs', props.docs)
+ // console.log('docs', props.docs)
const router = useRouter()
const slug = router.query.slug[0]
@@ -265,96 +46,35 @@ export default function JSReference(props) {
return (
<>
- <RefSubLayout>
- {/* <div>~~~Preamble pages~~~</div> */}
- {props.docs
- .filter((doc) => doc.introPage)
- .map((item) => (
- <RefSubLayout.EducationSection
- key={item.id}
- title={item.meta.title}
- id={item.id}
- slug={item.id}
- scrollSpyHeader={true}
- >
- <MDXRemote {...item.content} components={components} />
- </RefSubLayout.EducationSection>
- ))}
- {/* jsSpec.functions.map((item, itemIndex) => { */}
- {props.docs
- .filter((doc) => !doc.introPage)
- .map((func, itemIndex) => {
- const commonFuncData = allFunctions.find((fn) => fn.id === func.id)
- return (
- <>
- <FunctionSection funcData={func} commonFuncData={commonFuncData} />
- {commonFuncData.items &&
- commonFuncData.items.map((_commonFuncData) => {
- const rawFuncData = jsSpec.functions.find((x) => x.id === _commonFuncData.id)
+ {sections.map((x) => {
+ switch (x.isFunc) {
+ case false:
+ const markdownData = props.docs.find((doc) => doc.id === x.id)
+ console.log(markdownData)
- return (
- <FunctionSection funcData={rawFuncData} commonFuncData={_commonFuncData} />
- )
- })}
- </>
+ return <RefEducationSection item={x} markdownContent={markdownData} />
+ break
+
+ default:
+ return (
+ <RefFunctionSection
+ funcData={x}
+ commonFuncData={x}
+ libSpec={jsSpec}
+ typeSpec={jsTypeSpec}
+ />
)
- })}
- </RefSubLayout>
+ break
+ }
+ })}
</>
)
}
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
- // an array of ids of the intro sections for this library
- const introPages = commonLibJson.sections.intro.js.items.map((item) => item.id)
- const specPpages = allFunctions.filter((fn) => fn.libs.includes('js')).map((x) => x.id)
-
- const pages = [...introPages, ...specPpages]
-
- /**
- * Read all the markdown files that might have
- * - custom text
- * - call outs
- * - important notes regarding implementation
- */
- const allMarkdownDocs = await Promise.all(
- pages.map(async (x, i) => {
- const pathName = `docs/ref/js/${x}.mdx`
-
- function checkFileExists(x) {
- // console.log('checking this ', x)
- if (fs.existsSync(x)) {
- return true
- } else {
- return false
- }
- }
+ let markdownContent = await generateRefMarkdown(sections, '/js')
- const markdownExists = checkFileExists(pathName)
-
- const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
- const { data, content } = matter(fileContents)
-
- return {
- id: x,
- title: x,
- // ...content,
- meta: data,
- introPage: introPages.includes(x),
- content: content
- ? await serialize(content ?? '', {
- // MDX's available options, see the MDX docs for more info.
- // https://mdxjs.com/packages/mdx/#compilefile-options
- mdxOptions: {
- remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme }]],
- useDynamicImport: true,
- },
- // Indicates whether or not to parse the frontmatter from the mdx source
- })
- : null,
- }
- })
- )
+ console.log(markdownContent)
/*
* old content generation
@@ -372,32 +92,11 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
* handle old ref pages
*/
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
- let doc = getDocsBySlug(slug)
- const content = await serialize(doc.content ?? '', {
- // MDX's available options, see the MDX docs for more info.
- // https://mdxjs.com/packages/mdx/#compilefile-options
- mdxOptions: {
- remarkPlugins: [
- [remarkCodeHike, { autoImport: false, codeHikeTheme, showCopyButton: true }],
- ],
- useDynamicImport: true,
- },
- // Indicates whether or not to parse the frontmatter from the mdx source
- })
- return {
- props: {
- /*
- * old reference docs are below
- */
- ...doc,
- content,
- toc: toc(doc.content, { maxdepth: 1, firsth1: false }),
- },
- }
+ return await generateOldRefMarkdown(slug)
} else {
return {
props: {
- docs: allMarkdownDocs,
+ docs: markdownContent,
},
}
}
diff --git a/apps/docs/pages/reference/javascript/v1/[...slug].tsx b/apps/docs/pages/reference/javascript/v1/[...slug].tsx
index 483038667d8..819c17e060b 100644
--- a/apps/docs/pages/reference/javascript/v1/[...slug].tsx
+++ b/apps/docs/pages/reference/javascript/v1/[...slug].tsx
@@ -1,54 +1,33 @@
-import { useEffect } from 'react'
-
-import fs from 'fs'
-import toc from 'markdown-toc'
-
-import matter from 'gray-matter'
import { MDXRemote } from 'next-mdx-remote'
-import { serialize } from 'next-mdx-remote/serialize'
-import components from '~/components/index'
-import { getAllDocs, getDocsBySlug } from '~/lib/docs'
-
-import ReactMarkdown from 'react-markdown'
-
-// @ts-ignore
+import { useRouter } from 'next/router'
+import { useEffect } from 'react'
+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
import jsTypeSpec from '~/../../spec/enrichments/tsdoc_v1/combined.json'
-// @ts-ignore
-import examples from '~/../../spec/examples/examples.yml' assert { type: 'yml' }
-
-import RefDetailCollapse from '~/components/reference/RefDetailCollapse'
-
// @ts-expect-error
import jsSpec from '~/../../spec/supabase_js_v1_temp_new_shape.yml' assert { type: 'yml' }
-
-import commonLibJson from '~/../../spec/common-client-libs-sections.json'
-import { IconDatabase, Tabs } from 'ui'
-import CodeBlock from '~/components/CodeBlock/CodeBlock'
-
-import { useRouter } from 'next/router'
-import { extractTsDocNode, generateParameters } from '~/lib/refGenerator/helpers'
-import Param from '~/components/Params'
-import Options from '~/components/Options'
-import RefSubLayout from '~/layouts/ref/RefSubLayout'
-
+import components from '~/components'
+import RefEducationSection from '~/components/reference/RefEducationSection'
+import RefFunctionSection from '~/components/reference/RefFunctionSection'
import OldLayout from '~/layouts/Default'
+import { getAllDocs } from '~/lib/docs'
+import { flattenSections } from '~/lib/helpers'
+import generateOldRefMarkdown from '~/lib/mdx/generateOldRefMarkdown'
+import generateRefMarkdown from '~/lib/mdx/generateRefMarkdown'
-import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
-
-const allFunctions = Object.values(clientLibsCommonSections.sections.functions)
- .map((fn: any) => fn.items)
- .flat(2)
+const sections = flattenSections(clientLibsCommonSections)
-export default function DartReference(props) {
- console.log('docs', props.docs)
+export default function JSReference(props) {
+ // console.log('docs', props.docs)
const router = useRouter()
+
const slug = router.query.slug[0]
const isNewDocs = process.env.NEXT_PUBLIC_NEW_DOCS === 'true'
+ // When user lands on a url like http://supabase.com/docs/reference/javascript/sign-up
+ // find the #sign-up element and scroll to that
useEffect(() => {
if (isNewDocs && document && slug !== 'start') {
- // re-enable this when the new yaml shape file is moved into this branch
document.querySelector(`#${slug}`) && document.querySelector(`#${slug}`).scrollIntoView()
}
})
@@ -67,276 +46,35 @@ export default function DartReference(props) {
return (
<>
- <RefSubLayout>
- <div>~~~Preamble pages~~~</div>
- {props.docs
- .filter((doc) => doc.introPage)
- .map((item) => (
- <RefSubLayout.Section
- key={item.id}
- title={item.meta.title}
- id={item.id}
- slug={item.id}
- scrollSpyHeader={true}
- singleColumn={true}
- >
- <MDXRemote {...item.content} components={components} />
- </RefSubLayout.Section>
- ))}
- </RefSubLayout>
- <hr />
- <RefSubLayout>
- {/* jsSpec.functions.map((item, itemIndex) => { */}
- {props.docs
- .filter((doc) => !doc.introPage)
- .map((doc, itemIndex) => {
- const item = jsSpec.functions.find((x) => x.id === doc.id)
- const hasTsRef = item['$ref'] || null
- const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, jsTypeSpec)
- const parameters = hasTsRef ? generateParameters(tsDefinition) : ''
- // const functionMarkdownContent = props?.docs[itemIndex]?.content
- // ? props?.docs[itemIndex]?.content
- // : null
- const shortText = hasTsRef ? tsDefinition.signatures[0].comment.shortText : ''
+ {sections.map((x) => {
+ switch (x.isFunc) {
+ case false:
+ const markdownData = props.docs.find((doc) => doc.id === x.id)
+ console.log(markdownData)
- // const introFileMarkdownContent =
- //console.log('props.docs', props.docs)
- // if (item.id !== 'db-modifiers-select') return <></>
+ return <RefEducationSection item={x} markdownContent={markdownData} />
+ break
+ default:
return (
- <>
- <RefSubLayout.Section
- key={item.id}
- title={item.title}
- // examples.functions[itemIndex] doesn't pull the right title
- // and the ids don't match up, so we can't select that way
- // removing for now
- // title={
- // examples.functions[itemIndex].title ??
- // examples.functions[itemIndex].id ??
- // item.name ??
- // item.id
- // }
- id={item.id}
- slug={allFunctions.find((commonItem) => commonItem.id === item.id).slug}
- scrollSpyHeader={true}
- >
- <RefSubLayout.Details>
- <>
- <header className={['mb-16'].join(' ')}>
- {shortText && (
- <ReactMarkdown className="text-sm">{shortText}</ReactMarkdown>
- )}
- </header>
-
- {item.description && (
- <div className="prose">
- <ReactMarkdown className="text-sm">{item.description}</ReactMarkdown>
- </div>
- )}
- {/* {functionMarkdownContent && (
- <div className="prose">
- <MDXRemote {...functionMarkdownContent} components={components} />
- </div>
- )} */}
- {item.notes && (
- <div className="prose">
- <ReactMarkdown className="text-sm">{item.notes}</ReactMarkdown>
- </div>
- )}
- {/* // parameters */}
- {parameters && (
- <div className="not-prose mt-12">
- <h5 className="mb-3 text-base text-scale-1200">Parameters</h5>
- <ul className="">
- {parameters.map((param) => {
- // grab override params from yaml file
- const overrideParams = item.overrideParams
-
- // params from the yaml file can override the params from parameters if it matches the name
- const overide = overrideParams?.filter((x) => {
- return param.name === x.name
- })
-
- const paramItem = overide?.length > 0 ? overide[0] : param
-
- return (
- <Param {...paramItem}>
- {paramItem.subContent && (
- <div className="mt-3">
- <Options>
- {param.subContent.map((param) => {
- return <Options.Option {...param} />
- })}
- </Options>
- </div>
- )}
- </Param>
- )
- })}
- </ul>
- </div>
- )}
- </>
- </RefSubLayout.Details>
- <RefSubLayout.Examples>
- {item.examples && (
- <>
- <Tabs
- defaultActiveId={item.examples[0].id}
- size="tiny"
- type="rounded-pills"
- scrollable
- >
- {item.examples &&
- item.examples.map((example, exampleIndex) => {
- const exampleString = `
-import { 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')
-`
- const currentExampleId = example.id
- const staticExample = item.examples[exampleIndex]
-
- const response = staticExample.response
- const sql = staticExample?.data?.sql
- const tables = staticExample?.data?.tables
-
- return (
- <Tabs.Panel
- id={example.id}
- label={example.name}
- className="flex flex-col gap-3"
- >
- {((tables && tables.length > 0) || sql) && (
- <RefDetailCollapse
- id={`${example.id}-${exampleIndex}-data`}
- label="Example data source"
- defaultOpen={false}
- >
- <>
- {tables &&
- tables.length > 0 &&
- tables.map((table) => {
- return (
- <div className="bg-scale-300 border rounded prose max-w-none">
- <div className="bg-scale-200 px-5 py-2">
- <div className="flex gap-2 items-center">
- <div className="text-brand-900">
- <IconDatabase size={16} />
- </div>
- <h5 className="text-xs text-scale-1200">
- {table.name}
- </h5>
- </div>
- </div>
- </div>
- )
- })}
- {sql && (
- <CodeBlock
- className="useless-code-block-class my-0 border border-t-0 border-scale-500 !rounded-tl-none !rounded-tr-none"
- language="sql"
- hideLineNumbers={true}
- >
- {sql}
- </CodeBlock>
- )}
- </>
- </RefDetailCollapse>
- )}
-
- <CodeBlock
- className="useless-code-block-class"
- language="js"
- hideLineNumbers={true}
- >
- {exampleString +
- (example.code &&
- example.code
- .replace('```', '')
- .replace('js', '')
- .replace('```', ''))}
- </CodeBlock>
- {response && (
- <RefDetailCollapse
- id={`${example.id}-${exampleIndex}-response`}
- label="Example response"
- defaultOpen={false}
- >
- <CodeBlock
- className="useless-code-block-class"
- language="js"
- hideLineNumbers={true}
- >
- {response
- .replace('```', '')
- .replace('json', '')
- .replace('```', '')}
- </CodeBlock>
- </RefDetailCollapse>
- )}
- </Tabs.Panel>
- )
- })}
- </Tabs>
- </>
- )}
- </RefSubLayout.Examples>
- </RefSubLayout.Section>
- </>
+ <RefFunctionSection
+ funcData={x}
+ commonFuncData={x}
+ libSpec={jsSpec}
+ typeSpec={jsTypeSpec}
+ />
)
- })}
- </RefSubLayout>
+ break
+ }
+ })}
</>
)
}
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
- // an array of ids of the intro sections for this library
- const introPages = commonLibJson.sections.intro['js_v1'].items.map((item) => item.id)
-
- const specPpages = allFunctions.filter((fn) => fn.libs.includes('js_v1')).map((x) => x.id)
-
- const pages = [...introPages, ...specPpages]
-
- /**
- * Read all the markdown files that might have
- * - custom text
- * - call outs
- * - important notes regarding implementation
- */
- const allMarkdownDocs = await Promise.all(
- pages.map(async (x, i) => {
- const pathName = `docs/ref/js/v1/${x}.mdx`
-
- function checkFileExists(x) {
- // console.log('checking this ', x)
- if (fs.existsSync(x)) {
- return true
- } else {
- return false
- }
- }
-
- const markdownExists = checkFileExists(pathName)
+ let markdownContent = await generateRefMarkdown(sections, '/js/v1')
- console.log(x, 'markdownExists', markdownExists)
-
- const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
- const { data, content } = matter(fileContents)
-
- return {
- id: x,
- title: x,
- // ...content,
- meta: data,
- introPage: introPages.includes(x),
- content: content ? await serialize(content || '') : null,
- }
- })
- )
+ console.log(markdownContent)
/*
* old content generation
@@ -345,31 +83,20 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
let slug
if (params.slug.length > 1) {
- slug = `docs/reference/dart/${params.slug.join('/')}`
+ slug = `docs/reference/javascript/v1/${params.slug.join('/')}`
} else {
- slug = `docs/reference/dart/${params.slug[0]}`
+ slug = `docs/reference/javascript/v1/${params.slug[0]}`
}
/*
* handle old ref pages
*/
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
- let doc = getDocsBySlug(slug)
- const content = await serialize(doc.content || '')
- return {
- props: {
- /*
- * old reference docs are below
- */
- ...doc,
- content,
- toc: toc(doc.content, { maxdepth: 1, firsth1: false }),
- },
- }
+ return await generateOldRefMarkdown(slug)
} else {
return {
props: {
- docs: allMarkdownDocs,
+ docs: markdownContent,
},
}
}
@@ -389,3 +116,7 @@ export function getStaticPaths() {
fallback: 'blocking',
}
}
+
+export const config = {
+ unstable_includeFiles: ['node_modules/**/shiki/**/*.json'],
+}
diff --git a/spec/common-client-libs-sections-old.json b/spec/common-client-libs-sections-old.json
new file mode 100644
index 00000000000..ec7ac40b649
--- /dev/null
+++ b/spec/common-client-libs-sections-old.json
@@ -0,0 +1,807 @@
+{
+ "sections": {
+ "intro": {
+ "js": {
+ "title": "Getting Started",
+ "items": [
+ {
+ "id": "typescript-support",
+ "title": "Typescript Support",
+ "slug": "typescript-support"
+ },
+ {
+ "id": "release-notes",
+ "title": "Release Notes",
+ "slug": "release-notes"
+ }
+ ]
+ },
+ "js_v1": {
+ "title": "Getting Started",
+ "items": [
+ {
+ "id": "release-notes",
+ "title": "Release Notes",
+ "slug": "release-notes"
+ }
+ ]
+ },
+ "dart": {
+ "title": "Getting Started",
+ "items": [
+ {
+ "id": "release-notes",
+ "title": "Release Notes",
+ "slug": "release-notes"
+ }
+ ]
+ },
+ "dart_v0": {
+ "title": "Getting Started",
+ "items": [
+ {
+ "id": "release-notes",
+ "title": "Release Notes",
+ "slug": "release-notes"
+ }
+ ]
+ }
+ },
+ {
+ "id": "select",
+ "title": "Fetch data",
+ "slug": "select",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "insert",
+ "title": "Insert data",
+ "slug": "insert",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ "functions": [
+ {
+ "title": "Database",
+ "items": [
+ {
+ "id": "select",
+ "title": "Fetch data",
+ "slug": "select",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "insert",
+ "title": "Insert data",
+ "slug": "insert",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "update",
+ "title": "Update data",
+ "slug": "update",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "upsert",
+ "title": "Upsert data",
+ "slug": "upsert",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "delete",
+ "title": "Delete data",
+ "slug": "delete",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "rpc",
+ "title": "Call a Postgres function",
+ "slug": "rpc",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "using-filters",
+ "title": "Using filters",
+ "slug": "using-filters",
+ "product": "database",
+ "libs": ["js", "js_v4", "dart", "dart_v0"],
+ "items": [
+ {
+ "id": "eq",
+ "title": "Column is equal to a value",
+ "slug": "eq",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "neq",
+ "title": "Column is not equal to a value",
+ "slug": "neq",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "gt",
+ "title": "Column is greater than a value",
+ "slug": "gt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "gte",
+ "title": "Column is greater than or equal to a value",
+ "slug": "gte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "lt",
+ "title": "Column is less than a value",
+ "slug": "lt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "lte",
+ "title": "Column is less than or equal to a value",
+ "slug": "lte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "like",
+ "title": "Column matches a pattern",
+ "slug": "like",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "ilike",
+ "title": "Column matches a case-insensitive pattern",
+ "slug": "ilike",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "is",
+ "title": "Column is a value",
+ "slug": "is",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "in",
+ "title": "Column is in an array",
+ "slug": "in",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "contains",
+ "title": "Column contains every element in a value",
+ "slug": "contains",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "contained-by",
+ "title": "Contained by value",
+ "slug": "containedby",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range-gt",
+ "title": "Greater than a range",
+ "slug": "rangegt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range-gte",
+ "title": "Greater than or equal to a range",
+ "slug": "rangegte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range-lt",
+ "title": "Less than a range",
+ "slug": "rangelt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range-lte",
+ "title": "Less than or equal to a range",
+ "slug": "rangelte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range-adjacent",
+ "title": "Mutually exclusive to a range",
+ "slug": "rangeadjacent",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "overlaps",
+ "title": "With a common element",
+ "slug": "overlaps",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "text-search",
+ "title": "Match a string",
+ "slug": "textsearch",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "match",
+ "title": "Match an associated value",
+ "slug": "match",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "not",
+ "title": "Don't match the filter",
+ "slug": "not",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "or",
+ "title": "Match at least one filter",
+ "slug": "or",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "filter",
+ "title": "Match the filter",
+ "slug": "filter",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ }
+ ]
+ },
+ {
+ "id": "using-modifiers",
+ "title": "Using Modifiers",
+ "slug": "using-modifiers",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"],
+ "items": [
+ {
+ "id": "db-modifiers-select",
+ "title": "Select the query",
+ "slug": "db-modifiers-select",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "order",
+ "title": "Order the query",
+ "slug": "order",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "limit",
+ "title": "Limit the query",
+ "slug": "limit",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "range",
+ "title": "Limit the query to a range",
+ "slug": "range",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "abort-signal",
+ "title": "Set an abort signal",
+ "slug": "db-abortsignal",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "single",
+ "title": "Retrieve the query as one row",
+ "slug": "single",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
+ },
+ {
+ "id": "maybe-single",
+ "title": "Retrieve the query as 0-1 rows",
+ "slug": "maybesingle",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "csv",
+ "title": "Retrieve the query as a CSV string",
+ "slug": "db-csv",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4"]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "title": "Auth",
+ "items": [
+ {
+ "id": "sign-up",
+ "title": "Create a new user",
+ "slug": "auth-signup",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "sign-in",
+ "title": "Sign in a user",
+ "slug": "auth-signin",
+ "product": "auth",
+ "libs": ["js_v1", "dart_v0"]
+ },
+ {
+ "id": "sign-in-with-provider",
+ "title": "Sign in a user through OAuth",
+ "slug": "auth-signinwithprovider",
+ "product": "auth",
+ "libs": ["js_v4", "dart_v0"]
+ },
+ {
+ "id": "send-mobile-otp",
+ "title": "Send a one-time passcode",
+ "slug": "auth-api-sendmobileotp",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "sign-in-with-password",
+ "title": "Sign in a user",
+ "slug": "auth-signinwithpassword",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-in-with-otp",
+ "title": "Sign in a user through OTP",
+ "slug": "auth-signinwithotp",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-in-with-oauth",
+ "title": "Sign in a user through OAuth",
+ "slug": "auth-signinwithoauth",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-out",
+ "title": "Sign out a user",
+ "slug": "auth-signout",
+ "product": "auth",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "session",
+ "title": "Retrieve a session",
+ "slug": "auth-session",
+ "product": "auth",
+ "libs": ["js_v4"]
+ },
+ {
+ "id": "auth-update",
+ "title": "Update a user",
+ "slug": "auth-update",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "set-auth",
+ "title": "Update the access token",
+ "slug": "auth-setauth",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "user",
+ "title": "Retrieve a user",
+ "slug": "auth-user",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "session",
+ "title": "Retrieve a session",
+ "slug": "auth-session",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "verify-otp",
+ "title": "Verify and log in through OTP",
+ "slug": "auth-verifyotp",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "current-session",
+ "title": "Retrieve a session",
+ "slug": "auth-currentsession",
+ "product": "auth",
+ "libs": ["dart_v8"]
+ },
+ {
+ "id": "current-user",
+ "title": "Retrieve a user",
+ "slug": "auth-currentuser",
+ "product": "auth",
+ "libs": ["dart_v8"]
+ },
+ {
+ "id": "get-session",
+ "title": "Retrieve a session",
+ "slug": "auth-getsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "refresh-session",
+ "title": "Retrieve a new session",
+ "slug": "auth-refreshsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "get-user",
+ "title": "Retrieve a user",
+ "slug": "auth-getuser",
+ "product": "auth",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "update-user",
+ "title": "Update a user",
+ "slug": "auth-updateuser",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "set-session",
+ "title": "Set the session data",
+ "slug": "auth-setsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+
+ {
+ "id": "on-auth-state-change",
+ "title": "Listen to auth events",
+ "slug": "auth-onauthstatechange",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart_v0"]
+ },
+ {
+ "id": "reset-password-for-email",
+ "title": "Send a password reset request",
+ "slug": "auth-resetpasswordforemail",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart_v0"]
+ }
+ ]
+ },
+ {
+ "title": "Auth (server-only)",
+ "items": [
+ {
+ "id": "admin-api",
+ "title": "Overview",
+ "slug": "supabase-auth-admin-api",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "get-user-by-id",
+ "title": "Retrieve a user",
+ "slug": "auth-admin-getuserbyid",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "list-users",
+ "title": "List all users",
+ "slug": "auth-admin-listusers",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "create-user",
+ "title": "Create a user",
+ "slug": "auth-admin-createuser",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "delete-user",
+ "title": "Delete a user",
+ "slug": "auth-admin-deleteuser",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "invite-user-by-email",
+ "title": "Send an email invite link",
+ "slug": "auth-admin-inviteuserbyemail",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "reset-password-for-email",
+ "title": "Send a password reset request",
+ "slug": "auth-admin-resetpasswordforemail",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "generate-link",
+ "title": "Generate an email link",
+ "slug": "auth-admin-generatelink",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "update-user-by-id",
+ "title": "Update a user",
+ "slug": "auth-admin-updateuserbyid",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ }
+ ]
+ },
+ {
+ "title": "Functions",
+ "items": [
+ {
+ "id": "invoke",
+ "title": "Invoke a function",
+ "slug": "auth-admin-invoke",
+ "product": "functions",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ }
+ ]
+ },
+ {
+ "title": "Realtime",
+ "items": [
+ {
+ "id": "stream",
+ "title": "Listen to database changes",
+ "slug": "stream",
+ "product": "realtime",
+ "libs": ["dart", "dart_v0"]
+ },
+ {
+ "id": "subscribe",
+ "title": "Subscribe to database changes",
+ "slug": "subscribe",
+ "product": "realtime",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "remove-subscription",
+ "title": "Remove a subscription",
+ "slug": "removesubscription",
+ "product": "realtime",
+ "libs": ["dart_v0", "js_v1"]
+ },
+ {
+ "id": "remove-all-subscriptions",
+ "title": "Remove all subscriptions",
+ "slug": "removeallsubscriptions",
+ "product": "realtime",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "get-subscriptions",
+ "title": "Retrieve subscriptions",
+ "slug": "getsubscriptions",
+ "product": "realtime",
+ "libs": ["js_v1"]
+ },
+
+ {
+ "id": "remove-channel",
+ "title": "Unsubscribe from a channel",
+ "slug": "removechannel",
+ "product": "realtime",
+ "libs": ["js", "js_v4", "dart"]
+ },
+ {
+ "id": "remove-all-channels",
+ "title": "Unsubscribe from all channels",
+ "slug": "removeallchannels",
+ "product": "realtime",
+ "libs": ["js", "js_v4", "dart"]
+ },
+ {
+ "id": "get-channels",
+ "title": "Retrieve all channels",
+ "slug": "getchannels",
+ "product": "realtime",
+ "libs": ["js2", "js_v4", "dart"]
+ }
+ ]
+ },
+ {
+ "title": "Storage",
+ "items": [
+ {
+ "id": "create-bucket",
+ "title": "Create a bucket",
+ "slug": "storage-createbucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "get-bucket",
+ "title": "Retrieve a bucket",
+ "slug": "storage-getbucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "list-buckets",
+ "title": "List all buckets",
+ "slug": "storage-listbuckets",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "update-bucket",
+ "title": "Update a bucket",
+ "slug": "storage-updatebucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "delete-bucket",
+ "title": "Delete a bucket",
+ "slug": "storage-deletebucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "empty-bucket",
+ "title": "Empty a bucket",
+ "slug": "storage-emptybucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-upload",
+ "title": "Upload a file",
+ "slug": "storage-from-upload",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-download",
+ "title": "Download a file",
+ "slug": "storage-from-download",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-list",
+ "title": "List all files in a bucket",
+ "slug": "storage-from-list",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-update",
+ "title": "Replace an existing file",
+ "slug": "storage-from-update",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-move",
+ "title": "Move an existing file",
+ "slug": "storage-from-move",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-copy",
+ "title": "Copy an existing file",
+ "slug": "storage-from-copy",
+ "product": "storage",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "from-remove",
+ "title": "Delete files in a bucket",
+ "slug": "storage-from-remove",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-create-signed-url",
+ "title": "Create a signed URL",
+ "slug": "storage-from-createsignedurl",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-create-signed-urls",
+ "title": "Create signed URLs",
+ "slug": "storage-from-createsignedurls",
+ "product": "storage",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "from-get-public-url",
+ "title": "Retrieve an asset's URL",
+ "slug": "storage-from-getpublicurl",
+ "product": "storage",
+ "libs": ["js2", "js_v1", "dart", "dart_v0"]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/spec/common-client-libs-sections.json b/spec/common-client-libs-sections.json
index e4f7544e944..5a7daa4a2cb 100644
--- a/spec/common-client-libs-sections.json
+++ b/spec/common-client-libs-sections.json
@@ -1,793 +1,781 @@
-{
- "sections": {
- "intro": {
- "js": {
- "title": "Getting Started",
- "items": [
- {
- "id": "typescript-support",
- "title": "Typescript Support",
- "slug": "typescript-support"
- },
- {
- "id": "release-notes",
- "title": "Release Notes",
- "slug": "release-notes"
- }
- ]
+[
+ {
+ "title": "Introduction",
+ "id": "introduction",
+ "slug": "introduction",
+ "isFunc": false,
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "title": "Installing",
+ "id": "installing",
+ "slug": "installing",
+ "isFunc": false,
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "title": "Typescript Support",
+ "id": "typescript-support",
+ "slug": "typescript-support",
+ "isFunc": false,
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "title": "Database",
+ "items": [
+ {
+ "id": "database",
+ "title": "Database",
+ "slug": "database",
+ "product": "database",
+ "isFunc": false,
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
},
- "js_v1": {
- "title": "Getting Started",
- "items": [
- {
- "id": "release-notes",
- "title": "Release Notes",
- "slug": "release-notes"
- }
- ]
+ {
+ "id": "select",
+ "title": "Fetch data",
+ "slug": "select",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
},
- "dart": {
- "title": "Getting Started",
- "items": [
- {
- "id": "release-notes",
- "title": "Release Notes",
- "slug": "release-notes"
- }
- ]
+ {
+ "id": "insert",
+ "title": "Insert data",
+ "slug": "insert",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
},
- "dart_v0": {
- "title": "Getting Started",
- "items": [
- {
- "id": "release-notes",
- "title": "Release Notes",
- "slug": "release-notes"
- }
- ]
- }
- },
- "functions": [
{
- "title": "Database",
+ "id": "update",
+ "title": "Update data",
+ "slug": "update",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "upsert",
+ "title": "Upsert data",
+ "slug": "upsert",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "delete",
+ "title": "Delete data",
+ "slug": "delete",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "rpc",
+ "title": "Call a Postgres function",
+ "slug": "rpc",
+ "product": "database",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "using-filters",
+ "isFunc": false,
+ "title": "Using filters",
+ "slug": "using-filters",
+ "product": "database",
+ "libs": ["js", "js_v4", "dart", "dart_v0"],
"items": [
{
- "id": "select",
- "title": "Fetch data",
- "slug": "select",
+ "id": "eq",
+ "title": "Column is equal to a value",
+ "slug": "eq",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "insert",
- "title": "Insert data",
- "slug": "insert",
+ "id": "neq",
+ "title": "Column is not equal to a value",
+ "slug": "neq",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "update",
- "title": "Update data",
- "slug": "update",
+ "id": "gt",
+ "title": "Column is greater than a value",
+ "slug": "gt",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "upsert",
- "title": "Upsert data",
- "slug": "upsert",
+ "id": "gte",
+ "title": "Column is greater than or equal to a value",
+ "slug": "gte",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "delete",
- "title": "Delete data",
- "slug": "delete",
+ "id": "lt",
+ "title": "Column is less than a value",
+ "slug": "lt",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "rpc",
- "title": "Call a Postgres function",
- "slug": "rpc",
+ "id": "lte",
+ "title": "Column is less than or equal to a value",
+ "slug": "lte",
"product": "database",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "using-filters",
- "title": "Using filters",
- "slug": "using-filters",
+ "id": "like",
+ "title": "Column matches a pattern",
+ "slug": "like",
"product": "database",
- "libs": ["js", "js_v4", "dart", "dart_v0"],
- "items": [
- {
- "id": "eq",
- "title": "Column is equal to a value",
- "slug": "eq",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "neq",
- "title": "Column is not equal to a value",
- "slug": "neq",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "gt",
- "title": "Column is greater than a value",
- "slug": "gt",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "gte",
- "title": "Column is greater than or equal to a value",
- "slug": "gte",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "lt",
- "title": "Column is less than a value",
- "slug": "lt",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "lte",
- "title": "Column is less than or equal to a value",
- "slug": "lte",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "like",
- "title": "Column matches a pattern",
- "slug": "like",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "ilike",
- "title": "Column matches a case-insensitive pattern",
- "slug": "ilike",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "is",
- "title": "Column is a value",
- "slug": "is",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "in",
- "title": "Column is in an array",
- "slug": "in",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "contains",
- "title": "Column contains every element in a value",
- "slug": "contains",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "contained-by",
- "title": "Contained by value",
- "slug": "containedby",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range-gt",
- "title": "Greater than a range",
- "slug": "rangegt",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range-gte",
- "title": "Greater than or equal to a range",
- "slug": "rangegte",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range-lt",
- "title": "Less than a range",
- "slug": "rangelt",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range-lte",
- "title": "Less than or equal to a range",
- "slug": "rangelte",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range-adjacent",
- "title": "Mutually exclusive to a range",
- "slug": "rangeadjacent",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "overlaps",
- "title": "With a common element",
- "slug": "overlaps",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "text-search",
- "title": "Match a string",
- "slug": "textsearch",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "match",
- "title": "Match an associated value",
- "slug": "match",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "not",
- "title": "Don't match the filter",
- "slug": "not",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "or",
- "title": "Match at least one filter",
- "slug": "or",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "filter",
- "title": "Match the filter",
- "slug": "filter",
- "product": "database",
- "parent": "filters",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- }
- ]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "using-modifiers",
- "title": "Using Modifiers",
- "slug": "using-modifiers",
+ "id": "ilike",
+ "title": "Column matches a case-insensitive pattern",
+ "slug": "ilike",
"product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4", "dart", "dart_v0"],
- "items": [
- {
- "id": "db-modifiers-select",
- "title": "Select the query",
- "slug": "db-modifiers-select",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4"]
- },
- {
- "id": "order",
- "title": "Order the query",
- "slug": "order",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "limit",
- "title": "Limit the query",
- "slug": "limit",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "range",
- "title": "Limit the query to a range",
- "slug": "range",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "abort-signal",
- "title": "Set an abort signal",
- "slug": "db-abortsignal",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4"]
- },
- {
- "id": "single",
- "title": "Retrieve the query as one row",
- "slug": "single",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4", "dart", "dart_v0"]
- },
- {
- "id": "maybe-single",
- "title": "Retrieve the query as 0-1 rows",
- "slug": "maybesingle",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4"]
- },
- {
- "id": "csv",
- "title": "Retrieve the query as a CSV string",
- "slug": "db-csv",
- "product": "database",
- "parent": "modifiers",
- "libs": ["js", "js_v4"]
- }
- ]
- }
- ]
- },
- {
- "title": "Auth",
- "items": [
- {
- "id": "sign-up",
- "title": "Create a new user",
- "slug": "auth-signup",
- "product": "auth",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "sign-in",
- "title": "Sign in a user",
- "slug": "auth-signin",
- "product": "auth",
- "libs": ["js_v1", "dart_v0"]
- },
- {
- "id": "sign-in-with-provider",
- "title": "Sign in a user through OAuth",
- "slug": "auth-signinwithprovider",
- "product": "auth",
- "libs": ["js_v4", "dart_v0"]
- },
- {
- "id": "send-mobile-otp",
- "title": "Send a one-time passcode",
- "slug": "auth-api-sendmobileotp",
- "product": "auth",
- "libs": ["js_v1"]
- },
- {
- "id": "sign-in-with-password",
- "title": "Sign in a user",
- "slug": "auth-signinwithpassword",
- "product": "auth",
- "libs": ["js", "js_v4"]
- },
- {
- "id": "sign-in-with-otp",
- "title": "Sign in a user through OTP",
- "slug": "auth-signinwithotp",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "sign-in-with-oauth",
- "title": "Sign in a user through OAuth",
- "slug": "auth-signinwithoauth",
- "product": "auth",
- "libs": ["js", "js_v4"]
- },
- {
- "id": "sign-out",
- "title": "Sign out a user",
- "slug": "auth-signout",
- "product": "auth",
- "libs": ["js", "js_v1"]
- },
- {
- "id": "session",
- "title": "Retrieve a session",
- "slug": "auth-session",
- "product": "auth",
- "libs": ["js_v4"]
+ "id": "is",
+ "title": "Column is a value",
+ "slug": "is",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "auth-update",
- "title": "Update a user",
- "slug": "auth-update",
- "product": "auth",
- "libs": ["js_v1"]
+ "id": "in",
+ "title": "Column is in an array",
+ "slug": "in",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "set-auth",
- "title": "Update the access token",
- "slug": "auth-setauth",
- "product": "auth",
- "libs": ["js_v1"]
+ "id": "contains",
+ "title": "Column contains every element in a value",
+ "slug": "contains",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "user",
- "title": "Retrieve a user",
- "slug": "auth-user",
- "product": "auth",
- "libs": ["js_v1"]
+ "id": "contained-by",
+ "title": "Contained by value",
+ "slug": "containedby",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "session",
- "title": "Retrieve a session",
- "slug": "auth-session",
- "product": "auth",
- "libs": ["js_v1"]
+ "id": "range-gt",
+ "title": "Greater than a range",
+ "slug": "rangegt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "verify-otp",
- "title": "Verify and log in through OTP",
- "slug": "auth-verifyotp",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "id": "range-gte",
+ "title": "Greater than or equal to a range",
+ "slug": "rangegte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "current-session",
- "title": "Retrieve a session",
- "slug": "auth-currentsession",
- "product": "auth",
- "libs": ["dart_v8"]
+ "id": "range-lt",
+ "title": "Less than a range",
+ "slug": "rangelt",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "current-user",
- "title": "Retrieve a user",
- "slug": "auth-currentuser",
- "product": "auth",
- "libs": ["dart_v8"]
+ "id": "range-lte",
+ "title": "Less than or equal to a range",
+ "slug": "rangelte",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "get-session",
- "title": "Retrieve a session",
- "slug": "auth-getsession",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "id": "range-adjacent",
+ "title": "Mutually exclusive to a range",
+ "slug": "rangeadjacent",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "refresh-session",
- "title": "Retrieve a new session",
- "slug": "auth-refreshsession",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "id": "overlaps",
+ "title": "With a common element",
+ "slug": "overlaps",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "get-user",
- "title": "Retrieve a user",
- "slug": "auth-getuser",
- "product": "auth",
- "libs": ["js", "js_v1"]
+ "id": "text-search",
+ "title": "Match a string",
+ "slug": "textsearch",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "update-user",
- "title": "Update a user",
- "slug": "auth-updateuser",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "id": "match",
+ "title": "Match an associated value",
+ "slug": "match",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "set-session",
- "title": "Set the session data",
- "slug": "auth-setsession",
- "product": "auth",
- "libs": ["js", "js_v4"]
+ "id": "not",
+ "title": "Don't match the filter",
+ "slug": "not",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
-
{
- "id": "on-auth-state-change",
- "title": "Listen to auth events",
- "slug": "auth-onauthstatechange",
- "product": "auth",
- "libs": ["js", "js_v1", "dart_v0"]
+ "id": "or",
+ "title": "Match at least one filter",
+ "slug": "or",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "reset-password-for-email",
- "title": "Send a password reset request",
- "slug": "auth-resetpasswordforemail",
- "product": "auth",
- "libs": ["js", "js_v1", "dart_v0"]
+ "id": "filter",
+ "title": "Match the filter",
+ "slug": "filter",
+ "product": "database",
+ "parent": "filters",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
}
]
},
{
- "title": "Auth (server-only)",
+ "id": "using-modifiers",
+ "isFunc": false,
+ "title": "Using Modifiers",
+ "slug": "using-modifiers",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"],
"items": [
{
- "id": "admin-api",
- "title": "Overview",
- "slug": "supabase-auth-admin-api",
- "product": "auth-admin",
+ "id": "db-modifiers-select",
+ "title": "Select the query",
+ "slug": "db-modifiers-select",
+ "product": "database",
+ "parent": "modifiers",
"libs": ["js", "js_v4"]
},
{
- "id": "get-user-by-id",
- "title": "Retrieve a user",
- "slug": "auth-admin-getuserbyid",
- "product": "auth-admin",
- "libs": ["js", "js_v4"]
+ "id": "order",
+ "title": "Order the query",
+ "slug": "order",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "list-users",
- "title": "List all users",
- "slug": "auth-admin-listusers",
- "product": "auth-admin",
- "libs": ["js", "js_v1"]
+ "id": "limit",
+ "title": "Limit the query",
+ "slug": "limit",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "create-user",
- "title": "Create a user",
- "slug": "auth-admin-createuser",
- "product": "auth-admin",
- "libs": ["js", "js_v1"]
+ "id": "range",
+ "title": "Limit the query to a range",
+ "slug": "range",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "delete-user",
- "title": "Delete a user",
- "slug": "auth-admin-deleteuser",
- "product": "auth-admin",
- "libs": ["js", "js_v1"]
+ "id": "abort-signal",
+ "title": "Set an abort signal",
+ "slug": "db-abortsignal",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4"]
},
{
- "id": "invite-user-by-email",
- "title": "Send an email invite link",
- "slug": "auth-admin-inviteuserbyemail",
- "product": "auth-admin",
- "libs": ["js", "js_v1"]
+ "id": "single",
+ "title": "Retrieve the query as one row",
+ "slug": "single",
+ "product": "database",
+ "parent": "modifiers",
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
- "id": "reset-password-for-email",
- "title": "Send a password reset request",
- "slug": "auth-admin-resetpasswordforemail",
- "product": "auth-admin",
+ "id": "maybe-single",
+ "title": "Retrieve the query as 0-1 rows",
+ "slug": "maybesingle",
+ "product": "database",
+ "parent": "modifiers",
"libs": ["js", "js_v4"]
},
{
- "id": "generate-link",
- "title": "Generate an email link",
- "slug": "auth-admin-generatelink",
- "product": "auth-admin",
+ "id": "csv",
+ "title": "Retrieve the query as a CSV string",
+ "slug": "db-csv",
+ "product": "database",
+ "parent": "modifiers",
"libs": ["js", "js_v4"]
- },
- {
- "id": "update-user-by-id",
- "title": "Update a user",
- "slug": "auth-admin-updateuserbyid",
- "product": "auth-admin",
- "libs": ["js", "js_v1"]
}
]
+ }
+ ]
+ },
+ {
+ "title": "Auth",
+ "items": [
+ {
+ "id": "sign-up",
+ "title": "Create a new user",
+ "slug": "auth-signup",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
},
{
- "title": "Functions",
- "items": [
- {
- "id": "invoke",
- "title": "Invoke a function",
- "slug": "auth-admin-invoke",
- "product": "functions",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- }
- ]
+ "id": "sign-in",
+ "title": "Sign in a user",
+ "slug": "auth-signin",
+ "product": "auth",
+ "libs": ["js_v1", "dart_v0"]
},
{
- "title": "Realtime",
- "items": [
- {
- "id": "stream",
- "title": "Listen to database changes",
- "slug": "stream",
- "product": "realtime",
- "libs": ["dart", "dart_v0"]
- },
- {
- "id": "subscribe",
- "title": "Subscribe to database changes",
- "slug": "subscribe",
- "product": "realtime",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "remove-subscription",
- "title": "Remove a subscription",
- "slug": "removesubscription",
- "product": "realtime",
- "libs": ["dart_v0", "js_v1"]
- },
- {
- "id": "remove-all-subscriptions",
- "title": "Remove all subscriptions",
- "slug": "removeallsubscriptions",
- "product": "realtime",
- "libs": ["js_v1"]
- },
- {
- "id": "get-subscriptions",
- "title": "Retrieve subscriptions",
- "slug": "getsubscriptions",
- "product": "realtime",
- "libs": ["js_v1"]
- },
+ "id": "sign-in-with-provider",
+ "title": "Sign in a user through OAuth",
+ "slug": "auth-signinwithprovider",
+ "product": "auth",
+ "libs": ["js_v4", "dart_v0"]
+ },
+ {
+ "id": "send-mobile-otp",
+ "title": "Send a one-time passcode",
+ "slug": "auth-api-sendmobileotp",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "sign-in-with-password",
+ "title": "Sign in a user",
+ "slug": "auth-signinwithpassword",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-in-with-otp",
+ "title": "Sign in a user through OTP",
+ "slug": "auth-signinwithotp",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-in-with-oauth",
+ "title": "Sign in a user through OAuth",
+ "slug": "auth-signinwithoauth",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "sign-out",
+ "title": "Sign out a user",
+ "slug": "auth-signout",
+ "product": "auth",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "session",
+ "title": "Retrieve a session",
+ "slug": "auth-session",
+ "product": "auth",
+ "libs": ["js_v4"]
+ },
+ {
+ "id": "auth-update",
+ "title": "Update a user",
+ "slug": "auth-update",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "set-auth",
+ "title": "Update the access token",
+ "slug": "auth-setauth",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "user",
+ "title": "Retrieve a user",
+ "slug": "auth-user",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "session",
+ "title": "Retrieve a session",
+ "slug": "auth-session",
+ "product": "auth",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "verify-otp",
+ "title": "Verify and log in through OTP",
+ "slug": "auth-verifyotp",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "current-session",
+ "title": "Retrieve a session",
+ "slug": "auth-currentsession",
+ "product": "auth",
+ "libs": ["dart_v8"]
+ },
+ {
+ "id": "current-user",
+ "title": "Retrieve a user",
+ "slug": "auth-currentuser",
+ "product": "auth",
+ "libs": ["dart_v8"]
+ },
+ {
+ "id": "get-session",
+ "title": "Retrieve a session",
+ "slug": "auth-getsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "refresh-session",
+ "title": "Retrieve a new session",
+ "slug": "auth-refreshsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "get-user",
+ "title": "Retrieve a user",
+ "slug": "auth-getuser",
+ "product": "auth",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "update-user",
+ "title": "Update a user",
+ "slug": "auth-updateuser",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "set-session",
+ "title": "Set the session data",
+ "slug": "auth-setsession",
+ "product": "auth",
+ "libs": ["js", "js_v4"]
+ },
- {
- "id": "remove-channel",
- "title": "Unsubscribe from a channel",
- "slug": "removechannel",
- "product": "realtime",
- "libs": ["js", "js_v4", "dart"]
- },
- {
- "id": "remove-all-channels",
- "title": "Unsubscribe from all channels",
- "slug": "removeallchannels",
- "product": "realtime",
- "libs": ["js", "js_v4", "dart"]
- },
- {
- "id": "get-channels",
- "title": "Retrieve all channels",
- "slug": "getchannels",
- "product": "realtime",
- "libs": ["js2", "js_v4", "dart"]
- }
- ]
+ {
+ "id": "on-auth-state-change",
+ "title": "Listen to auth events",
+ "slug": "auth-onauthstatechange",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart_v0"]
},
{
- "title": "Storage",
- "items": [
- {
- "id": "create-bucket",
- "title": "Create a bucket",
- "slug": "storage-createbucket",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "get-bucket",
- "title": "Retrieve a bucket",
- "slug": "storage-getbucket",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "list-buckets",
- "title": "List all buckets",
- "slug": "storage-listbuckets",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "update-bucket",
- "title": "Update a bucket",
- "slug": "storage-updatebucket",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "delete-bucket",
- "title": "Delete a bucket",
- "slug": "storage-deletebucket",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "empty-bucket",
- "title": "Empty a bucket",
- "slug": "storage-emptybucket",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-upload",
- "title": "Upload a file",
- "slug": "storage-from-upload",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-download",
- "title": "Download a file",
- "slug": "storage-from-download",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-list",
- "title": "List all files in a bucket",
- "slug": "storage-from-list",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-update",
- "title": "Replace an existing file",
- "slug": "storage-from-update",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-move",
- "title": "Move an existing file",
- "slug": "storage-from-move",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-copy",
- "title": "Copy an existing file",
- "slug": "storage-from-copy",
- "product": "storage",
- "libs": ["js", "js_v1"]
- },
- {
- "id": "from-remove",
- "title": "Delete files in a bucket",
- "slug": "storage-from-remove",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-create-signed-url",
- "title": "Create a signed URL",
- "slug": "storage-from-createsignedurl",
- "product": "storage",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
- },
- {
- "id": "from-create-signed-urls",
- "title": "Create signed URLs",
- "slug": "storage-from-createsignedurls",
- "product": "storage",
- "libs": ["js", "js_v1"]
- },
- {
- "id": "from-get-public-url",
- "title": "Retrieve an asset's URL",
- "slug": "storage-from-getpublicurl",
- "product": "storage",
- "libs": ["js2", "js_v1", "dart", "dart_v0"]
- }
- ]
+ "id": "reset-password-for-email",
+ "title": "Send a password reset request",
+ "slug": "auth-resetpasswordforemail",
+ "product": "auth",
+ "libs": ["js", "js_v1", "dart_v0"]
+ }
+ ]
+ },
+ {
+ "title": "Auth (server-only)",
+ "items": [
+ {
+ "id": "admin-api",
+ "isFunc": false,
+ "title": "Overview",
+ "slug": "supabase-auth-admin-api",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "get-user-by-id",
+ "title": "Retrieve a user",
+ "slug": "auth-admin-getuserbyid",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "list-users",
+ "title": "List all users",
+ "slug": "auth-admin-listusers",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "create-user",
+ "title": "Create a user",
+ "slug": "auth-admin-createuser",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "delete-user",
+ "title": "Delete a user",
+ "slug": "auth-admin-deleteuser",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "invite-user-by-email",
+ "title": "Send an email invite link",
+ "slug": "auth-admin-inviteuserbyemail",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "reset-password-for-email",
+ "title": "Send a password reset request",
+ "slug": "auth-admin-resetpasswordforemail",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "generate-link",
+ "title": "Generate an email link",
+ "slug": "auth-admin-generatelink",
+ "product": "auth-admin",
+ "libs": ["js", "js_v4"]
+ },
+ {
+ "id": "update-user-by-id",
+ "title": "Update a user",
+ "slug": "auth-admin-updateuserbyid",
+ "product": "auth-admin",
+ "libs": ["js", "js_v1"]
+ }
+ ]
+ },
+ {
+ "title": "Functions",
+ "items": [
+ {
+ "id": "invoke",
+ "title": "Invoke a function",
+ "slug": "auth-admin-invoke",
+ "product": "functions",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ }
+ ]
+ },
+ {
+ "title": "Realtime",
+ "items": [
+ {
+ "id": "stream",
+ "title": "Listen to database changes",
+ "slug": "stream",
+ "product": "realtime",
+ "libs": ["dart", "dart_v0"]
+ },
+ {
+ "id": "subscribe",
+ "title": "Subscribe to database changes",
+ "slug": "subscribe",
+ "product": "realtime",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "remove-subscription",
+ "title": "Remove a subscription",
+ "slug": "removesubscription",
+ "product": "realtime",
+ "libs": ["dart_v0", "js_v1"]
+ },
+ {
+ "id": "remove-all-subscriptions",
+ "title": "Remove all subscriptions",
+ "slug": "removeallsubscriptions",
+ "product": "realtime",
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "get-subscriptions",
+ "title": "Retrieve subscriptions",
+ "slug": "getsubscriptions",
+ "product": "realtime",
+ "libs": ["js_v1"]
+ },
+
+ {
+ "id": "remove-channel",
+ "title": "Unsubscribe from a channel",
+ "slug": "removechannel",
+ "product": "realtime",
+ "libs": ["js", "js_v4", "dart"]
+ },
+ {
+ "id": "remove-all-channels",
+ "title": "Unsubscribe from all channels",
+ "slug": "removeallchannels",
+ "product": "realtime",
+ "libs": ["js", "js_v4", "dart"]
+ },
+ {
+ "id": "get-channels",
+ "title": "Retrieve all channels",
+ "slug": "getchannels",
+ "product": "realtime",
+ "libs": ["js2", "js_v4", "dart"]
+ }
+ ]
+ },
+ {
+ "title": "Storage",
+ "items": [
+ {
+ "id": "create-bucket",
+ "title": "Create a bucket",
+ "slug": "storage-createbucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "get-bucket",
+ "title": "Retrieve a bucket",
+ "slug": "storage-getbucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "list-buckets",
+ "title": "List all buckets",
+ "slug": "storage-listbuckets",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "update-bucket",
+ "title": "Update a bucket",
+ "slug": "storage-updatebucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "delete-bucket",
+ "title": "Delete a bucket",
+ "slug": "storage-deletebucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "empty-bucket",
+ "title": "Empty a bucket",
+ "slug": "storage-emptybucket",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-upload",
+ "title": "Upload a file",
+ "slug": "storage-from-upload",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-download",
+ "title": "Download a file",
+ "slug": "storage-from-download",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-list",
+ "title": "List all files in a bucket",
+ "slug": "storage-from-list",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-update",
+ "title": "Replace an existing file",
+ "slug": "storage-from-update",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-move",
+ "title": "Move an existing file",
+ "slug": "storage-from-move",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-copy",
+ "title": "Copy an existing file",
+ "slug": "storage-from-copy",
+ "product": "storage",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "from-remove",
+ "title": "Delete files in a bucket",
+ "slug": "storage-from-remove",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-create-signed-url",
+ "title": "Create a signed URL",
+ "slug": "storage-from-createsignedurl",
+ "product": "storage",
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
+ },
+ {
+ "id": "from-create-signed-urls",
+ "title": "Create signed URLs",
+ "slug": "storage-from-createsignedurls",
+ "product": "storage",
+ "libs": ["js", "js_v1"]
+ },
+ {
+ "id": "from-get-public-url",
+ "title": "Retrieve an asset's URL",
+ "slug": "storage-from-getpublicurl",
+ "product": "storage",
+ "libs": ["js2", "js_v1", "dart", "dart_v0"]
}
]
+ },
+ {
+ "title": "Release Notes",
+ "id": "release-notes",
+ "slug": "release-notes",
+ "isFunc": false,
+ "libs": ["js", "js_v1", "dart", "dart_v0"]
}
-}
+]