Skip to content

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

Wire up jsv1

Terry Sutton3378c44b33b8
diff --git a/apps/docs/docs/ref/js/v1/release-notes.mdx b/apps/docs/docs/ref/js/v1/release-notes.mdx
new file mode 100644
index 00000000000..725cbb5201e
--- /dev/null
+++ b/apps/docs/docs/ref/js/v1/release-notes.mdx
@@ -0,0 +1,6 @@
+---
+id: release-notes
+title: Release Notes
+---
+
+## js v1 this is the release notes file.
diff --git a/apps/docs/pages/reference/javascript/v1/[...slug].tsx b/apps/docs/pages/reference/javascript/v1/[...slug].tsx
index c96b10739f9..c90d741caa0 100644
--- a/apps/docs/pages/reference/javascript/v1/[...slug].tsx
+++ b/apps/docs/pages/reference/javascript/v1/[...slug].tsx
@@ -15,11 +15,13 @@ import ReactMarkdown from 'react-markdown'
import jsTypeSpec from '~/../../spec/enrichments/tsdoc_v1/combined.json'
// @ts-ignore
import examples from '~/../../spec/examples/examples.yml' assert { type: 'yml' }
+
// @ts-expect-error
import jsSpec from '~/../../spec/supabase_js_v1_temp_new_shape.yml' assert { type: 'yml' }
+
// @ts-expect-error
import commonLibSpec from '~/../../spec/common-client-libs.yml' assert { type: 'yml' }
-
+import commonLibJson from '~/../../spec/common-client-libs-sections.json'
import { IconDatabase, Tabs } from 'ui'
import CodeBlock from '~/components/CodeBlock/CodeBlock'
@@ -31,17 +33,22 @@ import RefSubLayout from '~/layouts/ref/RefSubLayout'
import OldLayout from '~/layouts/Default'
-export default function JSReference(props) {
- const router = useRouter()
+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'
+const allFunctions = Object.values(clientLibsCommonSections.sections.functions)
+ .map((fn: any) => fn.items)
+ .flat(2)
+
+export default function DartReference(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()
}
})
@@ -59,169 +66,241 @@ export default function JSReference(props) {
}
return (
- <RefSubLayout>
- {jsSpec.functions.map((item, itemIndex) => {
- const hasTsRef = item['$ref'] || null
- const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, jsTypeSpec)
- const parameters = hasTsRef ? generateParameters(tsDefinition) : ''
-
- const functionMarkdownContent = props?.docs[itemIndex]?.content
- const shortText = hasTsRef ? tsDefinition.signatures[0].comment.shortText : ''
-
- return (
- <>
+ <>
+ <RefSubLayout>
+ <div>~~~Preamble pages~~~</div>
+ {props.docs
+ .filter((doc) => doc.introPage)
+ .map((item) => (
<RefSubLayout.Section
key={item.id}
- title={item.title}
+ title={item.meta.title}
id={item.id}
- slug={commonLibSpec.functions.find((commonItem) => commonItem.id === item.id).slug}
+ slug={item.id}
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>
- )}
- </>
+ <MDXRemote {...item.content} components={components} />
</RefSubLayout.Details>
- <RefSubLayout.Examples>
- {item.examples && (
- <>
- <Tabs
- defaultActiveId={item.examples[0].id}
- size="small"
- type="underlined"
- 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}>
- {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>
+ </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 : ''
+
+ // const introFileMarkdownContent =
+ //console.log('props.docs', props.docs)
+ // if (item.id !== 'db-modifiers-select') return <></>
+
+ 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>
- )
- })}
- {sql && (
- <CodeBlock
- className="useless-code-block-class"
- language="sql"
- hideLineNumbers={true}
+ )}
+ </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"
>
- {sql}
- </CodeBlock>
- )}
- <CodeBlock
- className="useless-code-block-class"
- language="js"
- hideLineNumbers={true}
- >
- {exampleString +
- (example.code &&
- example.code
- .replace('```', '')
- .replace('js', '')
- .replace('```', ''))}
- </CodeBlock>
- {response && (
- <CodeBlock
- className="useless-code-block-class"
- language="json"
- hideLineNumbers={true}
- >
- {response}
- </CodeBlock>
- )}
- </Tabs.Panel>
- )
- })}
- </Tabs>
- </>
- )}
- </RefSubLayout.Examples>
- </RefSubLayout.Section>
- </>
- )
- })}
- </RefSubLayout>
+ {((tables && tables.length > 0) || sql) && (
+ <ReferenceDetailCollapse
+ 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>
+ )}
+ </>
+ </ReferenceDetailCollapse>
+ )}
+
+ <CodeBlock
+ className="useless-code-block-class"
+ language="js"
+ hideLineNumbers={true}
+ >
+ {exampleString +
+ (example.code &&
+ example.code
+ .replace('```', '')
+ .replace('js', '')
+ .replace('```', ''))}
+ </CodeBlock>
+ {response && (
+ <ReferenceDetailCollapse
+ 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>
+ </ReferenceDetailCollapse>
+ )}
+ </Tabs.Panel>
+ )
+ })}
+ </Tabs>
+ </>
+ )}
+ </RefSubLayout.Examples>
+ </RefSubLayout.Section>
+ </>
+ )
+ })}
+ </RefSubLayout>
+ </>
)
}
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
- const pages = jsSpec.functions.map((x) => x.id)
+ // 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
@@ -231,7 +310,7 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
*/
const allMarkdownDocs = await Promise.all(
pages.map(async (x, i) => {
- const pathName = `docs/ref/js/${x}.mdx`
+ const pathName = `docs/ref/js/v1/${x}.mdx`
function checkFileExists(x) {
// console.log('checking this ', x)
@@ -244,6 +323,8 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
const markdownExists = checkFileExists(pathName)
+ console.log(x, 'markdownExists', markdownExists)
+
const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
const { data, content } = matter(fileContents)
@@ -252,6 +333,7 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
title: x,
// ...content,
meta: data,
+ introPage: introPages.includes(x),
content: content ? await serialize(content || '') : null,
}
})
@@ -264,9 +346,9 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
let slug
if (params.slug.length > 1) {
- slug = `docs/reference/javascript/${params.slug.join('/')}`
+ slug = `docs/reference/dart/${params.slug.join('/')}`
} else {
- slug = `docs/reference/javascript/${params.slug[0]}`
+ slug = `docs/reference/dart/${params.slug[0]}`
}
/*
diff --git a/spec/common-client-libs-sections.json b/spec/common-client-libs-sections.json
index 7ba65ea2d9f..d6e900ebfe4 100644
--- a/spec/common-client-libs-sections.json
+++ b/spec/common-client-libs-sections.json
@@ -99,7 +99,7 @@
"slug": "using-filters",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "eq",
@@ -107,7 +107,7 @@
"slug": "eq",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "neq",
@@ -115,7 +115,7 @@
"slug": "neq",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "gt",
@@ -123,7 +123,7 @@
"slug": "gt",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "gte",
@@ -131,7 +131,7 @@
"slug": "gte",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "lt",
@@ -139,7 +139,7 @@
"slug": "lt",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "lte",
@@ -147,7 +147,7 @@
"slug": "lte",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "like",
@@ -155,7 +155,7 @@
"slug": "like",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "ilike",
@@ -163,7 +163,7 @@
"slug": "ilike",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "is",
@@ -171,7 +171,7 @@
"slug": "is",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "in",
@@ -179,7 +179,7 @@
"slug": "in",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "contains",
@@ -187,7 +187,7 @@
"slug": "contains",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "contained-by",
@@ -195,7 +195,7 @@
"slug": "containedby",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range-gt",
@@ -203,7 +203,7 @@
"slug": "rangegt",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range-gte",
@@ -211,7 +211,7 @@
"slug": "rangegte",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range-lt",
@@ -219,7 +219,7 @@
"slug": "rangelt",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range-lte",
@@ -227,7 +227,7 @@
"slug": "rangelte",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range-adjacent",
@@ -235,7 +235,7 @@
"slug": "rangeadjacent",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "overlaps",
@@ -243,7 +243,7 @@
"slug": "overlaps",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "text-search",
@@ -251,7 +251,7 @@
"slug": "textsearch",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "match",
@@ -259,7 +259,7 @@
"slug": "match",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "not",
@@ -267,7 +267,7 @@
"slug": "not",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "or",
@@ -275,7 +275,7 @@
"slug": "or",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "filter",
@@ -283,7 +283,7 @@
"slug": "filter",
"product": "database",
"parent": "filters",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "using-modifiers",
@@ -291,7 +291,7 @@
"slug": "using-modifiers",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "db-modifiers-select",
@@ -299,7 +299,7 @@
"slug": "db-modifiers-select",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "order",
@@ -307,7 +307,7 @@
"slug": "order",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "limit",
@@ -315,7 +315,7 @@
"slug": "limit",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "range",
@@ -323,7 +323,7 @@
"slug": "range",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "abort-signal",
@@ -331,7 +331,7 @@
"slug": "db-abortsignal",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "single",
@@ -339,7 +339,7 @@
"slug": "single",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart", "dart_v0"]
+ "libs": ["js", "js_v4", "dart", "dart_v0"]
},
{
"id": "maybe-single",
@@ -347,7 +347,7 @@
"slug": "maybesingle",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "csv",
@@ -355,7 +355,7 @@
"slug": "db-csv",
"product": "database",
"parent": "modifiers",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
}
]
},
@@ -381,71 +381,84 @@
"title": "signInWithProvider()",
"slug": "auth-signinwithprovider",
"product": "auth",
- "libs": ["js_v1", "dart_v0"]
+ "libs": ["js_v4", "dart_v0"]
},
{
"id": "send-mobile-otp",
"title": "sendMobileOTP()",
"slug": "auth-api-sendmobileotp",
"product": "auth",
- "libs": ["js_v1", "dart_v8"]
+ "libs": ["js_v1"]
},
{
"id": "sign-in-with-password",
"title": "Sign in with password",
"slug": "auth-signinwithpassword",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "sign-in-with-otp",
"title": "Sign in with OTP",
"slug": "auth-signinwithotp",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "sign-in-with-oauth",
"title": "Sign in with 0auth",
"slug": "auth-signinwithoauth",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "sign-out",
"title": "signOut()",
"slug": "auth-signout",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v1"]
},
{
"id": "session",
"title": "session()",
"slug": "auth-session",
"product": "auth",
- "libs": ["dart_v8"]
+ "libs": ["js_v4"]
},
{
"id": "auth-update",
"title": "update()",
"slug": "auth-update",
"product": "auth",
- "libs": ["dart_v8"]
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "set-auth",
+ "title": "setAuth()",
+ "slug": "auth-setauth",
+ "product": "auth",
+ "libs": ["js_v1"]
},
-
{
"id": "user",
"title": "user()",
"slug": "auth-user",
"product": "auth",
- "libs": ["dart_v8"]
+ "libs": ["js_v1"]
+ },
+ {
+ "id": "session",
+ "title": "session()",
+ "slug": "auth-session",
+ "product": "auth",
+ "libs": ["js_v1"]
},
{
"id": "verify-otp",
"title": "verifyOtp()",
"slug": "auth-verifyotp",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "current-session",
@@ -466,35 +479,35 @@
"title": "getSession()",
"slug": "auth-getsession",
"product": "auth",
- "libs": ["js", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "refresh-session",
"title": "refreshSession()",
"slug": "auth-refreshsession",
"product": "auth",
- "libs": ["js", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "get-user",
"title": "getUser()",
"slug": "auth-getuser",
"product": "auth",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
},
{
"id": "update-user",
"title": "updateUser()",
"slug": "auth-updateuser",
"product": "auth",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v4"]
},
{
"id": "set-session",
"title": "setSession()",
"slug": "auth-setsession",
"product": "auth",
- "libs": ["js", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
@@ -521,63 +534,63 @@
"title": "Overview",
"slug": "supabase-auth-admin-api",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "get-user-by-id",
"title": "getUserById()",
"slug": "auth-admin-getuserbyid",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "list-users",
"title": "listUsers()",
"slug": "auth-admin-listusers",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
},
{
"id": "create-user",
"title": "createUser()",
"slug": "auth-admin-createuser",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
},
{
"id": "delete-user",
"title": "deleteUser()",
"slug": "auth-admin-deleteuser",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
},
{
"id": "invite-user-by-email",
"title": "inviteUserByEmail()",
"slug": "auth-admin-inviteuserbyemail",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
},
{
"id": "reset-password-for-email",
"title": "resetPasswordForEmail()",
"slug": "auth-admin-resetpasswordforemail",
"product": "auth-admin",
- "libs": ["js", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "generate-link",
"title": "generateLink()",
"slug": "auth-admin-generatelink",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v4"]
},
{
"id": "update-user-by-id",
"title": "updateUserById()",
"slug": "auth-admin-updateuserbyid",
"product": "auth-admin",
- "libs": ["js2", "js_v1"]
+ "libs": ["js", "js_v1"]
}
]
},
@@ -615,21 +628,21 @@
"title": "removeSubscription()",
"slug": "removesubscription",
"product": "realtime",
- "libs": ["dart_v8"]
+ "libs": ["dart_v0", "js_v1"]
},
{
"id": "remove-all-subscriptions",
"title": "removeallsubscriptions()",
"slug": "removeallsubscriptions",
"product": "realtime",
- "libs": ["dart_v8"]
+ "libs": ["js_v1"]
},
{
"id": "get-subscriptions",
"title": "getSubscriptions()",
"slug": "getsubscriptions",
"product": "realtime",
- "libs": ["dart_v0"]
+ "libs": ["js_v1"]
},
{
@@ -637,21 +650,21 @@
"title": "removeChannel()",
"slug": "removechannel",
"product": "realtime",
- "libs": ["js", "js_v1", "dart", "dart_v8"]
+ "libs": ["js", "js_v4", "dart"]
},
{
"id": "remove-all-channels",
"title": "removeAllChannels()",
"slug": "removeallchannels",
"product": "realtime",
- "libs": ["js", "js_v1", "dart", "dart_v8"]
+ "libs": ["js", "js_v4", "dart"]
},
{
"id": "get-channels",
"title": "getChannels()",
"slug": "getchannels",
"product": "realtime",
- "libs": ["js2", "js_v1", "dart", "dart_v8"]
+ "libs": ["js2", "js_v4", "dart"]
}
]
},
@@ -740,7 +753,7 @@
"title": "from.copy()",
"slug": "storage-from-copy",
"product": "storage",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v1"]
},
{
"id": "from-remove",
@@ -761,7 +774,7 @@
"title": "from.createSignedUrls()",
"slug": "storage-from-createsignedurls",
"product": "storage",
- "libs": ["js", "js_v1", "dart_v8"]
+ "libs": ["js", "js_v1"]
},
{
"id": "from-get-public-url",
diff --git a/spec/supabase_js_v1_temp_new_shape.yml b/spec/supabase_js_v1_temp_new_shape.yml
index b0da5b6e1ec..c61976c9743 100644
--- a/spec/supabase_js_v1_temp_new_shape.yml
+++ b/spec/supabase_js_v1_temp_new_shape.yml
@@ -190,7 +190,7 @@ functions:
const { error } = await supabase.auth.signOut()
```
- - id: get-session
+ - id: session
title: 'session()'
$ref: '@supabase/gotrue-js.GoTrueClient.session'
examples:
@@ -202,7 +202,7 @@ functions:
const session = supabase.auth.session()
```
- - id: get-user
+ - id: user
title: 'user()'
$ref: '@supabase/gotrue-js.GoTrueClient.user'
notes: |
@@ -216,7 +216,7 @@ functions:
const user = supabase.auth.user()
```
- - id: update
+ - id: auth-update
title: 'update()'
$ref: '@supabase/gotrue-js.GoTrueClient.update'
notes: |
@@ -497,7 +497,7 @@ functions:
.sendMobileOTP('12345879')
```
- - id: auth-reset-password-for-email
+ - id: reset-password-for-email
title: 'resetPasswordForEmail()'
$ref: '@supabase/gotrue-js.GoTrueApi.resetPasswordForEmail'
notes: |