diff --git a/apps/docs/components/CodeBlock/CodeBlock.tsx b/apps/docs/components/CodeBlock/CodeBlock.tsx index d4710ea9389..bcd472a78d4 100644 --- a/apps/docs/components/CodeBlock/CodeBlock.tsx +++ b/apps/docs/components/CodeBlock/CodeBlock.tsx @@ -39,8 +39,6 @@ const CodeBlock: FC = ({ const { isDarkMode } = useTheme() const monokaiTheme = monokaiCustomTheme(isDarkMode) - console.log(children, hideLineNumbers) - const [copied, setCopied] = useState(false) const handleCopy = () => { @@ -66,8 +64,6 @@ const CodeBlock: FC = ({ if (lang !== 'bash') hideLineNumbers = true const showLineNumbers = !hideLineNumbers - console.log(showLineNumbers) - return (
{title && ( diff --git a/apps/docs/layouts/tutorials/TutorialLayout.tsx b/apps/docs/layouts/tutorials/TutorialLayout.tsx index 943233a787e..0a33ce773bb 100644 --- a/apps/docs/layouts/tutorials/TutorialLayout.tsx +++ b/apps/docs/layouts/tutorials/TutorialLayout.tsx @@ -1,12 +1,10 @@ import { MDXProvider } from '@mdx-js/react' import Head from 'next/head' import { FC, useEffect } from 'react' +import components from '~/components' import Footer from '~/components/Footer' import SideBar from '~/components/Navigation/SideBar' import TableOfContents from '~/components/TableOfContents' -import { Tabs } from 'ui' - -// var toc = require('markdown-toc') interface Props { meta: { title: string; description?: string; hide_table_of_contents?: boolean; video?: string } @@ -17,6 +15,8 @@ interface Props { } const Layout: FC = (props: Props) => { + // const contentString = renderToString(props.children) + useEffect(() => { const key = localStorage.getItem('supabaseDarkMode') if (!key) { @@ -31,13 +31,9 @@ const Layout: FC = (props: Props) => { // const content = serialize(contentString || '') - // console.log(props) + // console.log('contentString', contentString) - // const _toc = /toc(children, { maxdepth: 1, firsth1: false }) - - const MDXComponents = { - Tabs: Tabs, - } + // const _toc = toc('#hello world', { maxdepth: 1, firsth1: false }) const hasTableOfContents = props.toc !== undefined && @@ -72,7 +68,8 @@ const Layout: FC = (props: Props) => {

{props.meta.title}

- + +
{hasTableOfContents && !props.meta?.hide_table_of_contents && ( diff --git a/apps/docs/layouts/tutorials/TutorialLayout2.tsx b/apps/docs/layouts/tutorials/TutorialLayout2.tsx deleted file mode 100644 index 53b2bd3d1d6..00000000000 --- a/apps/docs/layouts/tutorials/TutorialLayout2.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { MDXProvider } from '@mdx-js/react' -import Head from 'next/head' -import { FC, useEffect } from 'react' -import { renderToString } from 'react-dom/server' -import { Tabs } from 'ui' -import Footer from '~/components/Footer' -import SideBar from '~/components/Navigation/SideBar' -import TableOfContents from '~/components/TableOfContents' - -interface Props { - meta: { title: string; description?: string; hide_table_of_contents?: boolean; video?: string } - children: any - toc?: any - menuItems: any - currentPage: string -} - -const Layout: FC = (props: Props) => { - const contentString = renderToString(props.children) - - useEffect(() => { - const key = localStorage.getItem('supabaseDarkMode') - if (!key) { - // Default to dark mode if no preference config - document.documentElement.className = 'dark' - } else { - document.documentElement.className = key === 'true' ? 'dark' : '' - } - }, []) - - // const contentString = renderToString(props.children) - - // const content = serialize(contentString || '') - - console.log('contentString', contentString) - - // const _toc = toc('#hello world', { maxdepth: 1, firsth1: false }) - - const hasTableOfContents = - props.toc !== undefined && - props.toc.json.filter((item) => item.lvl !== 1 && item.lvl <= 3).length > 0 - - const components = { - // img: ResponsiveImage, - // h1: Heading.H1, - // h2: Heading.H2, - // p: Text, - // pre: Pre, - // code: InlineCode, - Tabs: Tabs, - } - return ( - <> - - {props.meta?.title} | Supabase - - - - - - - - - -
- {/* */} -
- -
-
-

Tutorials

-
-

{props.meta.title}

-
- -
-
- {hasTableOfContents && !props.meta?.hide_table_of_contents && ( - - )} -
-
-
-
- - ) -} - -export default Layout diff --git a/apps/docs/pages/ref/js/[...slug].tsx b/apps/docs/pages/ref/js/[...slug].tsx index c305a8d75da..cb400e64599 100644 --- a/apps/docs/pages/ref/js/[...slug].tsx +++ b/apps/docs/pages/ref/js/[...slug].tsx @@ -7,6 +7,7 @@ import { import fs from 'fs' +import remarkGfm from 'remark-gfm' import matter from 'gray-matter' import { MDXRemote } from 'next-mdx-remote' import { serialize } from 'next-mdx-remote/serialize' @@ -17,11 +18,12 @@ import ReactMarkdown from 'react-markdown' // @ts-ignore 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.yml' assert { type: 'yml' } +import jsSpec from '~/../../spec/supabase_js_v2_temp_new_shape.yml' assert { type: 'yml' } -import { Tabs } from '~/../../packages/ui' +import { IconDatabase, Tabs } from '~/../../packages/ui' import CodeBlock from '~/components/CodeBlock/CodeBlock' import { useRouter } from 'next/router' @@ -32,13 +34,15 @@ const marginTop = 256 export default function Ref(props) { // const myRef = useRef(null) + console.log('props', props) + const [offsetY, setOffsetY] = useState(0) const [sections, setSections] = useState([]) - useEffect(() => { - window.scrollTo(0, 0) - setOffsetY(0) - }, []) + // useEffect(() => { + // window.scrollTo(0, 0) + // setOffsetY(0) + // }, []) useEffect(() => { const els: HTMLElement[] = Array.from(document.querySelectorAll('div.ref-container')) @@ -151,16 +155,17 @@ export default function Ref(props) { className="flex flex-col gap-32 mx-auto max-w-5xl" // ref={myRef} > - {props.docs.map((x) => { + {jsSpec.functions.map((item, itemIndex) => { + if (item.id !== 'select()') return
hidden section
// const sectionRef = useRef(null) - // console.log('x', jsSpec.pages[x.id]) - const hasTsRef = jsSpec.pages[x.id]['$ref'] || null + // console.log('x', x) + const hasTsRef = item['$ref'] || null // console.log('hasTsRef', hasTsRef) // console.log('jsTypeSpec', jsTypeSpec) const tsDefinition = hasTsRef && extractTsDocNode(hasTsRef, jsTypeSpec) // console.log('tsDefinition', tsDefinition) - console.log(`tsDefinition for ${x.title ?? x.id}`, tsDefinition) + // console.log(`tsDefinition for ${item.title ?? item.id}`, tsDefinition) // useEffect(() => { // const observer = new IntersectionObserver((entries) => { @@ -181,25 +186,50 @@ export default function Ref(props) { const parameters = hasTsRef ? generateParameters(tsDefinition) : '' + const [serialFunctionMarkdownContent, setSerialFunctionMarkdownContent] = + useState(null) + + const functionMarkdownContent = props?.docs[itemIndex]?.content + + useEffect(() => { + async function makeContent() { + setSerialFunctionMarkdownContent( + await serialize(functionMarkdownContent, { + mdxOptions: { + remarkPlugins: [remarkGfm], + format: 'mdx', + }, + }) + ) + } + makeContent() + }, []) + + console.log('serialFunctionMarkdownContent', serialFunctionMarkdownContent) + return (
-
-

updateUrl(x.id)}> - {x.title ?? x.id} +
+

updateUrl(item.id)}> + {examples.functions[itemIndex].title ?? + examples.functions[itemIndex].id ?? + item.name ?? + item.id}

+

{examples.functions[itemIndex].description}

- {x.content && ( -
- -
+
+ {functionMarkdownContent && ( + )} - {jsSpec.pages[x.id].notes && ( + + {item.notes && (
- {jsSpec.pages[x.id].notes} + {item.notes}
)} @@ -207,59 +237,100 @@ export default function Ref(props) { {parameters &&
}
- {jsSpec.pages[x.id].examples && ( + {item.examples && ( - {jsSpec.pages[x.id].examples && - jsSpec.pages[x.id].examples.map((x, i) => { + {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 = + examples.functions[itemIndex].examples[exampleIndex] + + const response = staticExample.response + const sql = staticExample?.data?.sql + const tables = staticExample?.data?.tables return ( - + + {tables && + tables.length > 0 && + tables.map((table) => { + console.log(table) + + const [content, setContent] = useState(null) + + useEffect(() => { + async function makeContent() { + setContent( + await serialize(table.content, { + mdxOptions: { + remarkPlugins: [remarkGfm], + format: 'mdx', + }, + }) + ) + } + makeContent() + }, []) + + return ( +
+
+
+
+ +
+
+ {table.name} +
+
+
+ + {/* {table.content} */} + {content && } +
+ ) + })} + {sql && ( + + {sql} + + )} {exampleString + - (x.js && - x.js.replace('```', '').replace('js', '').replace('```', ''))} - - - {`{ - data: [ - { - id: 1, - name: "Afghanistan", - }, - { - id: 2, - name: "Albania", - }, - { - id: 3, - name: "Algeria", - }, - ], - status: 200, - statusText: "OK", -} - - `} + (example.code && + example.code + .replace('```', '') + .replace('js', '') + .replace('```', ''))} + {response && ( + + {response} + + )}
) })} @@ -288,8 +359,8 @@ export async function getStaticProps({ params }: { params: { slug: string[] } }) { title: 'Deleting data', id: 'delete()' }, ] - const pages = Object.keys(jsSpec.pages) - // console.log('pages', pages) + const pages = jsSpec.functions.map((x) => x.id) + console.log('pages', pages) /** * Read all the markdown files that might have @@ -306,7 +377,7 @@ export async function getStaticProps({ params }: { params: { slug: string[] } }) const pathName = `docs/ref/js/${x}.mdx` function checkFileExists(x) { - console.log('checking this ', x) + // console.log('checking this ', x) if (fs.existsSync(x)) { return true } else { @@ -316,10 +387,14 @@ 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) - console.log('docBySlug', content) + // console.log('docBySlug', content) // console.log() + + if (content) console.log(content) return { id: x, title: x, @@ -330,7 +405,7 @@ export async function getStaticProps({ params }: { params: { slug: string[] } }) }) ) - console.log('allMarkdownDocs', allMarkdownDocs) + // console.log('allMarkdownDocs', allMarkdownDocs) return { props: { diff --git a/apps/docs/pages/tutorials/nextjs.mdx b/apps/docs/pages/tutorials/nextjs.mdx index 2204d2f8751..5e22b391296 100644 --- a/apps/docs/pages/tutorials/nextjs.mdx +++ b/apps/docs/pages/tutorials/nextjs.mdx @@ -1,6 +1,4 @@ -import TutorialLayout2 from '~/layouts/tutorials/TutorialLayout2' - -import { Tabs } from 'ui' +import Layout from '~/layouts/tutorials/TutorialLayout' export const meta = { title: 'Creating a user management dashboard with NextJS and Supabase', @@ -723,4 +721,4 @@ At this stage you have a fully functional application! - Got a question? [Ask here](https://github.com/supabase/supabase/discussions). - Sign in: [app.supabase.com](https://app.supabase.com) -export default ({ children }) => +export default ({ children }) => diff --git a/spec/Makefile b/spec/Makefile index 030f4ec46cf..c9f0819e4c6 100644 --- a/spec/Makefile +++ b/spec/Makefile @@ -94,6 +94,16 @@ combine.tsdoc.v2: $(REPO_DIR)/enrichments/tsdoc_v2/functions_dereferenced.json \ > $(REPO_DIR)/enrichments/tsdoc_v2/combined.json +combine-raw.tsdoc.v2: + jq -s '{ name: "Combined Specs", children: [.[0], .[1], .[2], .[3], .[4], .[5]] }' \ + $(REPO_DIR)/enrichments/tsdoc_v2/supabase.json \ + $(REPO_DIR)/enrichments/tsdoc_v2/gotrue.json \ + $(REPO_DIR)/enrichments/tsdoc_v2/postgrest.json \ + $(REPO_DIR)/enrichments/tsdoc_v2/realtime.json \ + $(REPO_DIR)/enrichments/tsdoc_v2/storage.json \ + $(REPO_DIR)/enrichments/tsdoc_v2/functions.json \ + > $(REPO_DIR)/enrichments/tsdoc_v2/combined_raw.json + ############################################################################### # Format everything - easier for git to track changes ############################################################################### diff --git a/spec/enrichments/tsdoc_v2/combined_raw.json b/spec/enrichments/tsdoc_v2/combined_raw.json new file mode 100644 index 00000000000..1f91b317be9 --- /dev/null +++ b/spec/enrichments/tsdoc_v2/combined_raw.json @@ -0,0 +1,47299 @@ +{ + "name": "Combined Specs", + "children": [ + { + "id": 0, + "name": "@supabase/supabase-js", + "kind": 1, + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "index", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 194, + "name": "SupabaseClientOptions", + "kind": 16777216, + "kindString": "Reference", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 20, + "character": 14 + } + ], + "target": 61 + }, + { + "id": 104, + "name": "SupabaseClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "Supabase Client.", + "text": "An isomorphic Javascript client for interacting with Postgres.\n" + }, + "children": [ + { + "id": 105, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 82, + "character": 2 + } + ], + "signatures": [ + { + "id": 106, + "name": "new SupabaseClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Create a new client for use in the browser." + }, + "typeParameter": [ + { + "id": 107, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 108, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 107, + "name": "Database" + } + } + ] + } + } + }, + { + "id": 109, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + } + ], + "parameters": [ + { + "id": 110, + "name": "supabaseUrl", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique Supabase URL which is supplied when you create a new project in your project dashboard." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 111, + "name": "supabaseKey", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique Supabase Key which is supplied when you create a new project in your project dashboard." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 112, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 61, + "typeArguments": [ + { + "type": "reference", + "id": 108, + "name": "SchemaName" + } + ], + "name": "SupabaseClientOptions" + } + } + ], + "type": { + "type": "reference", + "id": 104, + "typeArguments": [ + { + "type": "reference", + "id": 107, + "name": "Database" + }, + { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + { + "type": "reference", + "id": 109, + "name": "Schema" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 113, + "name": "auth", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Supabase Auth allows you to create and manage user sessions for access to data that is secured by access policies." + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 54, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "SupabaseAuthClient" + } + }, + { + "id": 115, + "name": "authUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 57, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 126, + "name": "changedAccessToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 64, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "undefined" + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 121, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 63, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 122, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 123, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 124, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 125, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + }, + { + "id": 117, + "name": "functionsUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 59, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 127, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 66, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 128, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 129, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 130, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 118, + "name": "realtime", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 60, + "character": 12 + } + ], + "type": { + "type": "reference", + "qualifiedName": "RealtimeClient", + "package": "@supabase/realtime-js", + "name": "default" + } + }, + { + "id": 114, + "name": "realtimeUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 56, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 119, + "name": "rest", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 61, + "character": 12 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 107, + "name": "Database" + }, + { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "qualifiedName": "GenericSchema", + "package": "@supabase/postgrest-js", + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + ], + "qualifiedName": "PostgrestClient", + "package": "@supabase/postgrest-js", + "name": "default" + } + }, + { + "id": 120, + "name": "storageKey", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 62, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 116, + "name": "storageUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 58, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 132, + "name": "supabaseKey", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 131, + "name": "supabaseUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 133, + "name": "functions", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 137, + "character": 6 + } + ], + "getSignature": [ + { + "id": 134, + "name": "functions", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "comment": { + "shortText": "Supabase Functions allows you to deploy and invoke edge functions." + }, + "type": { + "type": "reference", + "qualifiedName": "FunctionsClient", + "package": "@supabase/functions-js", + "name": "FunctionsClient" + } + } + ] + }, + { + "id": 135, + "name": "storage", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 147, + "character": 6 + } + ], + "getSignature": [ + { + "id": 136, + "name": "storage", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "comment": { + "shortText": "Supabase Storage allows you to manage user-generated content, such as photos or videos." + }, + "type": { + "type": "reference", + "qualifiedName": "StorageClient", + "package": "@supabase/storage-js", + "name": "StorageClient" + } + } + ] + }, + { + "id": 169, + "name": "_getAccessToken", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 234, + "character": 16 + } + ], + "signatures": [ + { + "id": 170, + "name": "_getAccessToken", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 186, + "name": "_handleTokenChanged", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 281, + "character": 10 + } + ], + "signatures": [ + { + "id": 187, + "name": "_handleTokenChanged", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 188, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "AuthChangeEvent", + "package": "@supabase/gotrue-js", + "name": "AuthChangeEvent" + } + }, + { + "id": 189, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "undefined" + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 190, + "name": "source", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "CLIENT" + }, + { + "type": "literal", + "value": "STORAGE" + } + ] + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 180, + "name": "_initRealtimeClient", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 267, + "character": 10 + } + ], + "signatures": [ + { + "id": 181, + "name": "_initRealtimeClient", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 182, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RealtimeClientOptions", + "package": "@supabase/realtime-js", + "name": "RealtimeClientOptions" + } + } + ], + "type": { + "type": "reference", + "qualifiedName": "RealtimeClient", + "package": "@supabase/realtime-js", + "name": "default" + } + } + ] + }, + { + "id": 171, + "name": "_initSupabaseAuthClient", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 240, + "character": 10 + } + ], + "signatures": [ + { + "id": 172, + "name": "_initSupabaseAuthClient", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 173, + "name": "__namedParameters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 59, + "name": "SupabaseAuthClientOptions" + } + }, + { + "id": 174, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 175, + "name": "fetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 176, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 177, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 178, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 179, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "name": "SupabaseAuthClient" + } + } + ] + }, + { + "id": 183, + "name": "_listenForAuthEvents", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 274, + "character": 10 + } + ], + "signatures": [ + { + "id": 184, + "name": "_listenForAuthEvents", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 185, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {} + } + } + } + ] + }, + { + "id": 158, + "name": "channel", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 206, + "character": 2 + } + ], + "signatures": [ + { + "id": 159, + "name": "channel", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a Realtime channel with Broadcast, Presence, and Postgres Changes." + }, + "parameters": [ + { + "id": 160, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The name of the Realtime channel." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 161, + "name": "opts", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The options to pass to the Realtime channel.\n\n" + }, + "type": { + "type": "reference", + "qualifiedName": "RealtimeChannelOptions", + "package": "@supabase/realtime-js", + "name": "RealtimeChannelOptions" + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "qualifiedName": "RealtimeChannel", + "package": "@supabase/realtime-js", + "name": "default" + } + } + ] + }, + { + "id": 137, + "name": "from", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 156, + "character": 2 + } + ], + "signatures": [ + { + "id": 138, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Perform a table operation." + }, + "typeParameter": [ + { + "id": 139, + "name": "TableName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 140, + "name": "Table", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 79, + "name": "GenericTable" + } + } + ], + "parameters": [ + { + "id": 141, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 139, + "name": "TableName" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 109, + "name": "Schema" + }, + { + "type": "reference", + "id": 140, + "name": "Table" + } + ], + "qualifiedName": "PostgrestQueryBuilder", + "package": "@supabase/postgrest-js", + "name": "default" + } + }, + { + "id": 142, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 143, + "name": "ViewName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 144, + "name": "View", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 92, + "name": "GenericView" + } + } + ], + "parameters": [ + { + "id": 145, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 143, + "name": "ViewName" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 109, + "name": "Schema" + }, + { + "type": "reference", + "id": 144, + "name": "View" + } + ], + "qualifiedName": "PostgrestQueryBuilder", + "package": "@supabase/postgrest-js", + "name": "default" + } + }, + { + "id": 146, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 147, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 109, + "name": "Schema" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "qualifiedName": "PostgrestQueryBuilder", + "package": "@supabase/postgrest-js", + "name": "default" + } + } + ] + }, + { + "id": 162, + "name": "getChannels", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 213, + "character": 2 + } + ], + "signatures": [ + { + "id": 163, + "name": "getChannels", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns all Realtime channels." + }, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "RealtimeChannel", + "package": "@supabase/realtime-js", + "name": "default" + } + } + } + ] + }, + { + "id": 167, + "name": "removeAllChannels", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 230, + "character": 2 + } + ], + "signatures": [ + { + "id": 168, + "name": "removeAllChannels", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Unsubscribes and removes all Realtime channels from Realtime client." + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "array", + "elementType": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "ok" + }, + { + "type": "literal", + "value": "timed out" + }, + { + "type": "literal", + "value": "error" + } + ] + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 164, + "name": "removeChannel", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 223, + "character": 2 + } + ], + "signatures": [ + { + "id": 165, + "name": "removeChannel", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Unsubscribes and removes Realtime channel from Realtime client." + }, + "parameters": [ + { + "id": 166, + "name": "channel", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The name of the Realtime channel.\n\n" + }, + "type": { + "type": "reference", + "qualifiedName": "RealtimeChannel", + "package": "@supabase/realtime-js", + "name": "default" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "ok" + }, + { + "type": "literal", + "value": "timed out" + }, + { + "type": "literal", + "value": "error" + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 148, + "name": "rpc", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 177, + "character": 2 + } + ], + "signatures": [ + { + "id": 149, + "name": "rpc", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Perform a function call." + }, + "typeParameter": [ + { + "id": 150, + "name": "FunctionName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 151, + "name": "Function_", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 93, + "name": "GenericFunction" + } + } + ], + "parameters": [ + { + "id": 152, + "name": "fn", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The function name to call." + }, + "type": { + "type": "reference", + "id": 150, + "name": "FunctionName" + } + }, + { + "id": 153, + "name": "args", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The parameters to pass to the function call." + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Args" + }, + "objectType": { + "type": "reference", + "id": 151, + "name": "Function_" + } + }, + "defaultValue": "{}" + }, + { + "id": 154, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 155, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 157, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Count algorithm to use to count rows in a table.\n\n" + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 185, + "character": 6 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + }, + { + "id": 156, + "name": "head", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "When set to true, no data will be returned." + }, + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 184, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 157, + 156 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 109, + "name": "Schema" + }, + { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Returns" + }, + "objectType": { + "type": "reference", + "id": 151, + "name": "Function_" + } + }, + "extendsType": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + }, + "trueType": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "number" + }, + "objectType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + } + }, + "extendsType": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Returns" + }, + "objectType": { + "type": "reference", + "id": 151, + "name": "Function_" + } + } + ], + "qualifiedName": "PostgrestFilterBuilder", + "package": "@supabase/postgrest-js", + "name": "default" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 105 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 113, + 115, + 126, + 121, + 117, + 127, + 118, + 114, + 119, + 120, + 116, + 132, + 131 + ] + }, + { + "title": "Accessors", + "kind": 262144, + "children": [ + 133, + 135 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 169, + 186, + 180, + 171, + 183, + 158, + 137, + 162, + 167, + 164, + 148 + ] + } + ], + "sources": [ + { + "fileName": "src/SupabaseClient.ts", + "line": 42, + "character": 21 + } + ], + "typeParameter": [ + { + "id": 191, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 192, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 107, + "name": "Database" + } + } + ] + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 107, + "name": "Database" + } + } + ] + } + } + }, + { + "id": 193, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 108, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 107, + "name": "Database" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + } + ] + }, + { + "id": 2, + "name": "createClient", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 25, + "character": 13 + } + ], + "signatures": [ + { + "id": 3, + "name": "createClient", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a new Supabase Client." + }, + "typeParameter": [ + { + "id": 4, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 5, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + } + ] + } + } + }, + { + "id": 6, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "id": 97, + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + } + ], + "parameters": [ + { + "id": 7, + "name": "supabaseUrl", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 8, + "name": "supabaseKey", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 9, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 61, + "typeArguments": [ + { + "type": "reference", + "id": 5, + "name": "SchemaName" + } + ], + "name": "SupabaseClientOptions" + } + } + ], + "type": { + "type": "reference", + "id": 104, + "typeArguments": [ + { + "type": "reference", + "id": 4, + "name": "Database" + }, + { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + { + "type": "reference", + "id": 6, + "name": "Schema" + } + ], + "name": "default" + } + } + ] + } + ], + "groups": [ + { + "title": "References", + "kind": 16777216, + "children": [ + 194 + ] + }, + { + "title": "Classes", + "kind": 128, + "children": [ + 104 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 2 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 10, + "name": "lib/constants", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 11, + "name": "DEFAULT_HEADERS", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "sources": [ + { + "fileName": "src/lib/constants.ts", + "line": 3, + "character": 13 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 12, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 13, + "name": "X-Client-Info", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/constants.ts", + "line": 3, + "character": 33 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 13 + ] + } + ] + } + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 11 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/constants.ts", + "line": 2, + "character": 0 + } + ] + }, + { + "id": 14, + "name": "lib/fetch", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 29, + "name": "fetchWithAuth", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/fetch.ts", + "line": 25, + "character": 13 + } + ], + "signatures": [ + { + "id": 30, + "name": "fetchWithAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 31, + "name": "supabaseKey", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 32, + "name": "getAccessToken", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 33, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 34, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + }, + { + "id": 35, + "name": "customFetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 36, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 37, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 38, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 39, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 40, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 41, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 42, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 43, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ] + }, + { + "id": 15, + "name": "resolveFetch", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/fetch.ts", + "line": 5, + "character": 13 + } + ], + "signatures": [ + { + "id": 16, + "name": "resolveFetch", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 17, + "name": "customFetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 18, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 19, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 20, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 21, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 22, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 23, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 24, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 25, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ] + }, + { + "id": 26, + "name": "resolveHeadersConstructor", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/fetch.ts", + "line": 17, + "character": 13 + } + ], + "signatures": [ + { + "id": 27, + "name": "resolveHeadersConstructor", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 28, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {} + } + } + } + ] + } + ], + "groups": [ + { + "title": "Functions", + "kind": 64, + "children": [ + 29, + 15, + 26 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/fetch.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 44, + "name": "lib/helpers", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 50, + "name": "applySettingDefaults", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/helpers.ts", + "line": 18, + "character": 16 + } + ], + "signatures": [ + { + "id": 51, + "name": "applySettingDefaults", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 52, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 53, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 52, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 52, + "name": "Database" + } + } + ] + } + } + } + ], + "parameters": [ + { + "id": 54, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 61, + "typeArguments": [ + { + "type": "reference", + "id": 53, + "name": "SchemaName" + } + ], + "name": "SupabaseClientOptions" + } + }, + { + "id": 55, + "name": "defaults", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 61, + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "SupabaseClientOptions" + } + } + ], + "type": { + "type": "reference", + "id": 61, + "typeArguments": [ + { + "type": "reference", + "id": 53, + "name": "SchemaName" + } + ], + "name": "SupabaseClientOptions" + } + } + ] + }, + { + "id": 56, + "name": "isBrowser", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/helpers.ts", + "line": 16, + "character": 13 + } + ], + "signatures": [ + { + "id": 57, + "name": "isBrowser", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 47, + "name": "stripTrailingSlash", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/helpers.ts", + "line": 12, + "character": 16 + } + ], + "signatures": [ + { + "id": 48, + "name": "stripTrailingSlash", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 49, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 45, + "name": "uuid", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/helpers.ts", + "line": 4, + "character": 16 + } + ], + "signatures": [ + { + "id": 46, + "name": "uuid", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + ], + "groups": [ + { + "title": "Functions", + "kind": 64, + "children": [ + 50, + 56, + 47, + 45 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/helpers.ts", + "line": 2, + "character": 0 + } + ] + }, + { + "id": 58, + "name": "lib/types", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 59, + "name": "SupabaseAuthClientOptions", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 6, + "character": 17 + } + ], + "extendedTypes": [ + { + "type": "reference", + "name": "GoTrueClientOptions" + } + ] + }, + { + "id": 60, + "name": "Fetch", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 8, + "character": 12 + } + ], + "type": { + "type": "query", + "queryType": { + "type": "reference", + "id": 18, + "qualifiedName": "fetch", + "package": "typescript", + "name": "fetch" + } + } + }, + { + "id": 93, + "name": "GenericFunction", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 74, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 94, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 95, + "name": "Args", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 75, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 96, + "name": "Returns", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 76, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 95, + 96 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 74, + "character": 30 + } + ] + } + } + }, + { + "id": 89, + "name": "GenericNonUpdatableView", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 68, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 90, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 91, + "name": "Row", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 69, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 91 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 68, + "character": 38 + } + ] + } + } + }, + { + "id": 97, + "name": "GenericSchema", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 79, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 98, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 101, + "name": "Functions", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 82, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "id": 93, + "name": "GenericFunction" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 99, + "name": "Tables", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 80, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "id": 79, + "name": "GenericTable" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 100, + "name": "Views", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 81, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "id": 92, + "name": "GenericView" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 101, + 99, + 100 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 79, + "character": 28 + } + ] + } + } + }, + { + "id": 79, + "name": "GenericTable", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 56, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 80, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 82, + "name": "Insert", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 58, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 81, + "name": "Row", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 57, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 83, + "name": "Update", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 59, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 82, + 81, + 83 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 56, + "character": 27 + } + ] + } + } + }, + { + "id": 84, + "name": "GenericUpdatableView", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 62, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 85, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 87, + "name": "Insert", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 64, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 86, + "name": "Row", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 63, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 88, + "name": "Update", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 65, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 87, + 86, + 88 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 62, + "character": 35 + } + ] + } + } + }, + { + "id": 92, + "name": "GenericView", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 72, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 84, + "name": "GenericUpdatableView" + }, + { + "type": "reference", + "id": 89, + "name": "GenericNonUpdatableView" + } + ] + } + }, + { + "id": 61, + "name": "SupabaseClientOptions", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 10, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 78, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 62, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 66, + "name": "auth", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 67, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 68, + "name": "autoRefreshToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Automatically refreshes the token for logged in users." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 22, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 71, + "name": "detectSessionInUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Detect a session from the URL. Used for OAuth login callbacks." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 34, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 70, + "name": "persistSession", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Whether to persist a logged in session to storage." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 30, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 72, + "name": "storage", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A storage provider. Used to store the logged in session." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 38, + "character": 4 + } + ], + "type": { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "storage" + }, + "objectType": { + "type": "reference", + "id": 59, + "name": "SupabaseAuthClientOptions" + } + } + }, + { + "id": 69, + "name": "storageKey", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Optional key name used for storing tokens in local storage" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 26, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 68, + 71, + 70, + 72, + 69 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 18, + "character": 9 + } + ] + } + } + }, + { + "id": 63, + "name": "db", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The Postgres schema which your tables belong to. Must be on the list of exposed schemas in Supabase. Defaults to 'public'." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 14, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 64, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 65, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 15, + "character": 4 + } + ], + "type": { + "type": "reference", + "id": 78, + "name": "SchemaName" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 65 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 14, + "character": 7 + } + ] + } + } + }, + { + "id": 74, + "name": "global", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 75, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 76, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom `fetch` implementation." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 48, + "character": 4 + } + ], + "type": { + "type": "reference", + "id": 60, + "name": "Fetch" + } + }, + { + "id": 77, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Optional headers for initializing the client." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 52, + "character": 4 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 76, + 77 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 44, + "character": 11 + } + ] + } + } + }, + { + "id": 73, + "name": "realtime", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Options passed to the realtime-js instance" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "RealtimeClientOptions", + "package": "@supabase/realtime-js", + "name": "RealtimeClientOptions" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 66, + 63, + 74, + 73 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 10, + "character": 48 + } + ] + } + } + } + ], + "groups": [ + { + "title": "Interfaces", + "kind": 256, + "children": [ + 59 + ] + }, + { + "title": "Type Aliases", + "kind": 4194304, + "children": [ + 60, + 93, + 89, + 97, + 79, + 84, + 92, + 61 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 102, + "name": "lib/version", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 103, + "name": "version", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "sources": [ + { + "fileName": "src/lib/version.ts", + "line": 1, + "character": 13 + } + ], + "type": { + "type": "literal", + "value": "0.0.0-automated" + }, + "defaultValue": "'0.0.0-automated'" + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 103 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/version.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "Modules", + "kind": 2, + "children": [ + 1, + 10, + 14, + 44, + 58, + 102 + ] + } + ] + }, + { + "id": 0, + "name": "@supabase/gotrue-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 699, + "name": "AuthApiError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 700, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 17, + "character": 2 + } + ], + "signatures": [ + { + "id": 701, + "name": "new AuthApiError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 702, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 703, + "name": "status", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "id": 699, + "name": "AuthApiError" + }, + "overwrites": { + "type": "reference", + "id": 696, + "name": "AuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 695, + "name": "AuthError.constructor" + } + }, + { + "id": 704, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 15, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 705, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 23, + "character": 2 + } + ], + "signatures": [ + { + "id": 706, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 707, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 709, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 26, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 708, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 25, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 710, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 27, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 709, + 708, + 710 + ] + } + ] + } + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 700 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 704 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 705 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 14, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 694, + "name": "AuthError" + } + ] + }, + { + "id": 694, + "name": "AuthError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 695, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 4, + "character": 2 + } + ], + "signatures": [ + { + "id": 696, + "name": "new AuthError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 697, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + }, + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 695 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 1, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 699, + "name": "AuthApiError" + }, + { + "type": "reference", + "id": 712, + "name": "AuthUnknownError" + }, + { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + } + ] + }, + { + "id": 759, + "name": "AuthImplicitGrantRedirectError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 760, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 74, + "character": 2 + } + ], + "signatures": [ + { + "id": 761, + "name": "new AuthImplicitGrantRedirectError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 762, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 763, + "name": "details", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 764, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 766, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 74, + "character": 57 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 765, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 74, + "character": 42 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 766, + 765 + ] + } + ] + } + } + ] + }, + "defaultValue": "null" + } + ], + "type": { + "type": "reference", + "id": 759, + "name": "AuthImplicitGrantRedirectError" + }, + "overwrites": { + "type": "reference", + "id": 721, + "name": "CustomAuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 720, + "name": "CustomAuthError.constructor" + } + }, + { + "id": 767, + "name": "details", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 73, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 768, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 770, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 73, + "character": 28 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 769, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 73, + "character": 13 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 770, + 769 + ] + } + ] + } + } + ] + }, + "defaultValue": "null" + }, + { + "id": 781, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 725, + "name": "CustomAuthError.name" + } + }, + { + "id": 782, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 726, + "name": "CustomAuthError.status" + } + }, + { + "id": 771, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 79, + "character": 2 + } + ], + "signatures": [ + { + "id": 772, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 773, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 777, + "name": "details", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 84, + "character": 6 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 778, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 780, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 73, + "character": 28 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 779, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 73, + "character": 13 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 780, + 779 + ] + } + ] + } + } + ] + }, + "defaultValue": "..." + }, + { + "id": 775, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 82, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 774, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 81, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 776, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 83, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 777, + 775, + 774, + 776 + ] + } + ] + } + }, + "overwrites": { + "type": "reference", + "id": 728, + "name": "CustomAuthError.toJSON" + } + } + ], + "overwrites": { + "type": "reference", + "id": 727, + "name": "CustomAuthError.toJSON" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 760 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 767, + 781, + 782 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 771 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 72, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + } + ] + }, + { + "id": 746, + "name": "AuthInvalidCredentialsError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 747, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 67, + "character": 2 + } + ], + "signatures": [ + { + "id": 748, + "name": "new AuthInvalidCredentialsError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 749, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 746, + "name": "AuthInvalidCredentialsError" + }, + "overwrites": { + "type": "reference", + "id": 721, + "name": "CustomAuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 720, + "name": "CustomAuthError.constructor" + } + }, + { + "id": 750, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 725, + "name": "CustomAuthError.name" + } + }, + { + "id": 751, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 726, + "name": "CustomAuthError.status" + } + }, + { + "id": 752, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 51, + "character": 2 + } + ], + "signatures": [ + { + "id": 753, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 754, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 756, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 54, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 755, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 53, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 757, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 55, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 756, + 755, + 757 + ] + } + ] + } + }, + "inheritedFrom": { + "type": "reference", + "id": 728, + "name": "CustomAuthError.toJSON" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 727, + "name": "CustomAuthError.toJSON" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 747 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 750, + 751 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 752 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 66, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + } + ] + }, + { + "id": 784, + "name": "AuthRetryableFetchError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 785, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 90, + "character": 2 + } + ], + "signatures": [ + { + "id": 786, + "name": "new AuthRetryableFetchError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 787, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 788, + "name": "status", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "id": 784, + "name": "AuthRetryableFetchError" + }, + "overwrites": { + "type": "reference", + "id": 721, + "name": "CustomAuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 720, + "name": "CustomAuthError.constructor" + } + }, + { + "id": 789, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 725, + "name": "CustomAuthError.name" + } + }, + { + "id": 790, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 726, + "name": "CustomAuthError.status" + } + }, + { + "id": 791, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 51, + "character": 2 + } + ], + "signatures": [ + { + "id": 792, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 793, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 795, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 54, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 794, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 53, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 796, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 55, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 795, + 794, + 796 + ] + } + ] + } + }, + "inheritedFrom": { + "type": "reference", + "id": 728, + "name": "CustomAuthError.toJSON" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 727, + "name": "CustomAuthError.toJSON" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 785 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 789, + 790 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 791 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 89, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + } + ] + }, + { + "id": 734, + "name": "AuthSessionMissingError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 735, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 61, + "character": 2 + } + ], + "signatures": [ + { + "id": 736, + "name": "new AuthSessionMissingError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "type": { + "type": "reference", + "id": 734, + "name": "AuthSessionMissingError" + }, + "overwrites": { + "type": "reference", + "id": 721, + "name": "CustomAuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 720, + "name": "CustomAuthError.constructor" + } + }, + { + "id": 737, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 725, + "name": "CustomAuthError.name" + } + }, + { + "id": 738, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 726, + "name": "CustomAuthError.status" + } + }, + { + "id": 739, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 51, + "character": 2 + } + ], + "signatures": [ + { + "id": 740, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 741, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 743, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 54, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 742, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 53, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 744, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 55, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 743, + 742, + 744 + ] + } + ] + } + }, + "inheritedFrom": { + "type": "reference", + "id": 728, + "name": "CustomAuthError.toJSON" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 727, + "name": "CustomAuthError.toJSON" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 735 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 737, + 738 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 739 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 60, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + } + ] + }, + { + "id": 712, + "name": "AuthUnknownError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 713, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 35, + "character": 2 + } + ], + "signatures": [ + { + "id": 714, + "name": "new AuthUnknownError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 715, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 716, + "name": "originalError", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 712, + "name": "AuthUnknownError" + }, + "overwrites": { + "type": "reference", + "id": 696, + "name": "AuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 695, + "name": "AuthError.constructor" + } + }, + { + "id": 717, + "name": "originalError", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 33, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 713 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 717 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 32, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 694, + "name": "AuthError" + } + ] + }, + { + "id": 719, + "name": "CustomAuthError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 720, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 45, + "character": 2 + } + ], + "signatures": [ + { + "id": 721, + "name": "new CustomAuthError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 722, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 723, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 724, + "name": "status", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "id": 719, + "name": "CustomAuthError" + }, + "overwrites": { + "type": "reference", + "id": 696, + "name": "AuthError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 695, + "name": "AuthError.constructor" + } + }, + { + "id": 725, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "overwrites": { + "type": "reference", + "name": "AuthError.name" + } + }, + { + "id": 726, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 727, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 51, + "character": 2 + } + ], + "signatures": [ + { + "id": 728, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 729, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 731, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 54, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 730, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 53, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 732, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 55, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 731, + 730, + 732 + ] + } + ] + } + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 720 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 725, + 726 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 727 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 42, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 694, + "name": "AuthError" + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 734, + "name": "AuthSessionMissingError" + }, + { + "type": "reference", + "id": 746, + "name": "AuthInvalidCredentialsError" + }, + { + "type": "reference", + "id": 759, + "name": "AuthImplicitGrantRedirectError" + }, + { + "type": "reference", + "id": 784, + "name": "AuthRetryableFetchError" + } + ] + }, + { + "id": 1, + "name": "GoTrueAdminApi", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 2, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 28, + "character": 2 + } + ], + "signatures": [ + { + "id": 3, + "name": "new GoTrueAdminApi", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 4, + "name": "__namedParameters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 5, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 11, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 37, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 12, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 13, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 14, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + }, + { + "type": "reference", + "qualifiedName": "URL", + "package": "typescript", + "name": "URL" + } + ] + } + }, + { + "id": 15, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + }, + { + "id": 7, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 34, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 8, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 9, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 10, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 6, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 33, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 11, + 7, + 6 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "default" + } + } + ] + }, + { + "id": 16, + "name": "mfa", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Contains all MFA administration methods." + }, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 20, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 673, + "name": "GoTrueAdminMFAApi" + } + }, + { + "id": 43, + "name": "createUser", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 139, + "character": 8 + } + ], + "signatures": [ + { + "id": 44, + "name": "createUser", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a new user.\nThis function should only be called on a server. Never expose your `service_role` key in the browser." + }, + "parameters": [ + { + "id": 45, + "name": "attributes", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 395, + "name": "AdminUserAttributes" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 65, + "name": "deleteUser", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 229, + "character": 8 + } + ], + "signatures": [ + { + "id": 66, + "name": "deleteUser", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Delete a user. Requires a `service_role` key." + }, + "parameters": [ + { + "id": 67, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The user id you want to remove.\n\nThis function should only be called on a server. Never expose your `service_role` key in the browser.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 40, + "name": "generateLink", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 105, + "character": 8 + } + ], + "signatures": [ + { + "id": 41, + "name": "generateLink", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Generates email links and OTPs to be sent via a custom email provider." + }, + "parameters": [ + { + "id": 42, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 517, + "name": "GenerateLinkParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 518, + "name": "GenerateLinkResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 58, + "name": "getUserById", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 184, + "character": 8 + } + ], + "signatures": [ + { + "id": 59, + "name": "getUserById", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Get user by id." + }, + "parameters": [ + { + "id": 60, + "name": "uid", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The user's unique identifier\n\nThis function should only be called on a server. Never expose your `service_role` key in the browser.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 33, + "name": "inviteUserByEmail", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 75, + "character": 8 + } + ], + "signatures": [ + { + "id": 34, + "name": "inviteUserByEmail", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Sends an invite link to an email address." + }, + "parameters": [ + { + "id": 35, + "name": "email", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The email address of the user." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 36, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 37, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 39, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Optional user metadata\n" + }, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 79, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 38, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A URL or mobile deeplink to send the user to after they are confirmed." + }, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 78, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 39, + 38 + ] + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 46, + "name": "listUsers", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 160, + "character": 8 + } + ], + "signatures": [ + { + "id": 47, + "name": "listUsers", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Get a list of users.", + "text": "This function should only be called on a server. Never expose your `service_role` key in the browser.\n" + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 48, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 49, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 50, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 51, + "name": "users", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 14 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 368, + "name": "User" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 51 + ] + } + ] + } + } + }, + { + "id": 52, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 31 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 49, + 52 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 53, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 54, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 49 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 55, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 56, + "name": "users", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 57 + } + ], + "type": { + "type": "tuple" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 56 + ] + } + ] + } + } + }, + { + "id": 57, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 161, + "character": 70 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 54, + 57 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 27, + "name": "signOut", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 52, + "character": 8 + } + ], + "signatures": [ + { + "id": 28, + "name": "signOut", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Removes a logged-in session." + }, + "parameters": [ + { + "id": 29, + "name": "jwt", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A valid, logged-in JWT.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 30, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 31, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 52, + "character": 40 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 32, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 52, + "character": 52 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "id": 694, + "name": "AuthError" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 31, + 32 + ] + } + ] + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 61, + "name": "updateUserById", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 206, + "character": 8 + } + ], + "signatures": [ + { + "id": 62, + "name": "updateUserById", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates the user data." + }, + "parameters": [ + { + "id": 63, + "name": "uid", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 64, + "name": "attributes", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The data you want to update.\n\nThis function should only be called on a server. Never expose your `service_role` key in the browser.\n" + }, + "type": { + "type": "reference", + "id": 395, + "name": "AdminUserAttributes" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 2 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 16 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 43, + 65, + 40, + 58, + 33, + 46, + 27, + 61 + ] + } + ], + "sources": [ + { + "fileName": "src/GoTrueAdminApi.ts", + "line": 18, + "character": 21 + } + ] + }, + { + "id": 74, + "name": "GoTrueClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 75, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 124, + "character": 2 + } + ], + "signatures": [ + { + "id": 76, + "name": "new GoTrueClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Create a new client for use in the browser." + }, + "parameters": [ + { + "id": 77, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 281, + "name": "GoTrueClientOptions" + } + } + ], + "type": { + "type": "reference", + "id": 74, + "name": "default" + } + } + ] + }, + { + "id": 78, + "name": "admin", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Namespace for the GoTrue admin methods.\nThese methods should only be used in a trusted server-side environment." + }, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 84, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "default" + } + }, + { + "id": 79, + "name": "mfa", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Namespace for the MFA methods." + }, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 88, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 628, + "name": "GoTrueMFAApi" + } + }, + { + "id": 120, + "name": "getSession", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 440, + "character": 8 + } + ], + "signatures": [ + { + "id": 121, + "name": "getSession", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns the session, refreshing it if necessary.\nThe session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out." + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 122, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 123, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 442, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 124, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 125, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 443, + "character": 10 + } + ], + "type": { + "type": "reference", + "id": 331, + "name": "Session" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 125 + ] + } + ] + } + } + }, + { + "id": 126, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 445, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 123, + 126 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 127, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 128, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 448, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 129, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 130, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 449, + "character": 10 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 130 + ] + } + ] + } + } + }, + { + "id": 131, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 451, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 128, + 131 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 132, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 133, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 454, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 134, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 135, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 455, + "character": 10 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 135 + ] + } + ] + } + } + }, + { + "id": 136, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 457, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 133, + 136 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 137, + "name": "getUser", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 504, + "character": 8 + } + ], + "signatures": [ + { + "id": 138, + "name": "getUser", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Gets the current user details if there is an existing session." + }, + "parameters": [ + { + "id": 139, + "name": "jwt", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Takes in an optional access token jwt. If no jwt is provided, getUser() will attempt to get the jwt from the current session.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 101, + "name": "initialize", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 159, + "character": 2 + } + ], + "signatures": [ + { + "id": 102, + "name": "initialize", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Initializes the client session either from the url or from storage.\nThis method is automatically called when instantiating the client, but should also be called\nmanually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc)." + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 681, + "name": "InitializeResult" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 178, + "name": "onAuthStateChange", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 784, + "character": 2 + } + ], + "signatures": [ + { + "id": 179, + "name": "onAuthStateChange", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Receive a notification every time an auth event happens." + }, + "parameters": [ + { + "id": 180, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A callback function to be invoked when an auth event happens.\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 181, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 182, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 183, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 280, + "name": "AuthChangeEvent" + } + }, + { + "id": 184, + "name": "session", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "id": 331, + "name": "Session" + } + ] + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 185, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 186, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 785, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 187, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 188, + "name": "subscription", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 785, + "character": 12 + } + ], + "type": { + "type": "reference", + "id": 405, + "name": "Subscription" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 188 + ] + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 186 + ] + } + ] + } + } + } + ] + }, + { + "id": 153, + "name": "refreshSession", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 645, + "character": 8 + } + ], + "signatures": [ + { + "id": 154, + "name": "refreshSession", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns a new session, regardless of expiry status.\nTakes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().\nIf the current session's refresh token is invalid, an error will be thrown." + }, + "parameters": [ + { + "id": 155, + "name": "currentSession", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The current session. If passed in, it must contain a refresh token.\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 156, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 157, + "name": "refresh_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 645, + "character": 42 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 157 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 189, + "name": "resetPasswordForEmail", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 807, + "character": 8 + } + ], + "signatures": [ + { + "id": 190, + "name": "resetPasswordForEmail", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Sends a password reset request to an email address." + }, + "parameters": [ + { + "id": 191, + "name": "email", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The email address of the user." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 192, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 193, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 195, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site.\n" + }, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 811, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 194, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The URL to send the user to after they click the password reset link." + }, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 810, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 195, + 194 + ] + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 196, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 197, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 815, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 198, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {} + } + } + }, + { + "id": 199, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 816, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 197, + 199 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 200, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 201, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 818, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 202, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 818, + "character": 20 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 201, + 202 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 150, + "name": "setSession", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 581, + "character": 8 + } + ], + "signatures": [ + { + "id": 151, + "name": "setSession", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.\nIf the refresh token in the current session is invalid and the current session has expired, an error will be thrown.\nIf the current session does not contain at expires_at field, setSession will use the exp claim defined in the access token." + }, + "parameters": [ + { + "id": 152, + "name": "currentSession", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The current session that minimally contains an access token, refresh token and a user.\n" + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 331, + "name": "Session" + }, + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "access_token" + }, + { + "type": "literal", + "value": "refresh_token" + } + ] + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 111, + "name": "signInWithOAuth", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 337, + "character": 8 + } + ], + "signatures": [ + { + "id": 112, + "name": "signInWithOAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Log in an existing user via a third-party provider." + }, + "parameters": [ + { + "id": 113, + "name": "credentials", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 462, + "name": "SignInWithOAuthCredentials" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 307, + "name": "OAuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 114, + "name": "signInWithOtp", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 352, + "character": 8 + } + ], + "signatures": [ + { + "id": 115, + "name": "signInWithOtp", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Log in a user using magiclink or a one-time password (OTP).\nIf the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.\nIf the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.\nIf you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins." + }, + "parameters": [ + { + "id": 116, + "name": "credentials", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 446, + "name": "SignInWithPasswordlessCredentials" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 108, + "name": "signInWithPassword", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 285, + "character": 8 + } + ], + "signatures": [ + { + "id": 109, + "name": "signInWithPassword", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Log in an existing user with an email and password or phone and password." + }, + "parameters": [ + { + "id": 110, + "name": "credentials", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 431, + "name": "SignInWithPasswordCredentials" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 174, + "name": "signOut", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 765, + "character": 8 + } + ], + "signatures": [ + { + "id": 175, + "name": "signOut", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Inside a browser context, `signOut()` will remove the logged in user from the browser session\nand log them out - removing all items from localstorage and then trigger a `\"SIGNED_OUT\"` event.", + "text": "For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.\nThere is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.\n" + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 176, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 177, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 765, + "character": 29 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "id": 694, + "name": "AuthError" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 177 + ] + } + ] + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 105, + "name": "signUp", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 222, + "character": 8 + } + ], + "signatures": [ + { + "id": 106, + "name": "signUp", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a new user.", + "returns": "A logged-in session if the server has \"autoconfirm\" ON" + }, + "parameters": [ + { + "id": 107, + "name": "credentials", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 415, + "name": "SignUpWithPasswordCredentials" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 140, + "name": "updateUser", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 533, + "character": 8 + } + ], + "signatures": [ + { + "id": 141, + "name": "updateUser", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates user data, if there is a logged in user." + }, + "parameters": [ + { + "id": 142, + "name": "attributes", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 390, + "name": "UserAttributes" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 320, + "name": "UserResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 117, + "name": "verifyOtp", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 396, + "character": 8 + } + ], + "signatures": [ + { + "id": 118, + "name": "verifyOtp", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Log in a user given a User supplied OTP received via mobile." + }, + "parameters": [ + { + "id": 119, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 473, + "name": "VerifyOtpParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 294, + "name": "AuthResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 75 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 78, + 79 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 120, + 137, + 101, + 178, + 153, + 189, + 150, + 111, + 114, + 108, + 174, + 105, + 140, + 117 + ] + } + ], + "sources": [ + { + "fileName": "src/GoTrueClient.ts", + "line": 79, + "character": 21 + } + ] + }, + { + "id": 340, + "name": "AMREntry", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "An authentication methord reference (AMR) entry.", + "text": "An entry designates what method was used by the user to verify their\nidentity and at what time.\n", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}.\n" + } + ] + }, + "children": [ + { + "id": 341, + "name": "method", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Authentication method name." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 142, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 342, + "name": "timestamp", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Timestamp when the method was successfully used. Represents number of\nseconds since 1st January 1970 (UNIX epoch) in UTC." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 148, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 341, + 342 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 140, + "character": 17 + } + ] + }, + { + "id": 395, + "name": "AdminUserAttributes", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 397, + "name": "app_metadata", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's application specific metadata. This maps to the `auth.users.app_metadata` column.", + "text": "Only a service role can modify.\n\nThe `app_metadata` should be a JSON object that includes app-specific info, such as identity providers, roles, and other\naccess control information.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 270, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 400, + "name": "ban_duration", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Determines how long a user is banned for.", + "text": "The format for the ban duration follows a strict sequence of decimal numbers with a unit suffix.\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n\nFor example, some possible durations include: '300ms', '2h45m'.\n\nSetting the ban duration to 'none' lifts the ban on the user.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 296, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 404, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 245, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + }, + "inheritedFrom": { + "type": "reference", + "id": 394, + "name": "UserAttributes.data" + } + }, + { + "id": 401, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's email." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 227, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 391, + "name": "UserAttributes.email" + } + }, + { + "id": 398, + "name": "email_confirm", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Confirms the user's email address if set to true.", + "text": "Only a service role can modify.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 277, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 403, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 237, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 393, + "name": "UserAttributes.password" + } + }, + { + "id": 402, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's phone." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 232, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 392, + "name": "UserAttributes.phone" + } + }, + { + "id": 399, + "name": "phone_confirm", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Confirms the user's phone number if set to true.", + "text": "Only a service role can modify.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 284, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 396, + "name": "user_metadata", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "Only a service role can modify.\n\nThe `user_metadata` should be a JSON object that includes user-specific info, such as their first and last name.\n\nNote: When using the GoTrueAdminApi and wanting to modify a user's metadata,\nthis attribute is used instead of UserAttributes data.\n\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 260, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 397, + 400, + 404, + 401, + 398, + 403, + 402, + 399, + 396 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 248, + "character": 17 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 390, + "name": "UserAttributes" + } + ] + }, + { + "id": 354, + "name": "Factor", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "A MFA factor.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#enroll}" + }, + { + "tag": "see", + "text": "{@link GoTrueMFAApi#listFactors}" + }, + { + "tag": "see", + "text": "{@link GoTrueMFAAdminApi#listFactors}\n" + } + ] + }, + "children": [ + { + "id": 359, + "name": "created_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 186, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 357, + "name": "factor_type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Type of factor. Only `totp` supported with this version but may change in\nfuture versions." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 181, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 356, + "name": "friendly_name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Friendly name of the factor, useful to disambiguate between multiple factors." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 175, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 355, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 172, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 358, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Factor's status." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 184, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "verified" + }, + { + "type": "literal", + "value": "unverified" + } + ] + } + }, + { + "id": 360, + "name": "updated_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 187, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 359, + 357, + 356, + 355, + 358, + 360 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 170, + "character": 17 + } + ] + }, + { + "id": 514, + "name": "GenerateLinkOptions", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 515, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 507, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 516, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The URL which will be appended to the email link generated." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 509, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 515, + 516 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 501, + "character": 17 + } + ] + }, + { + "id": 673, + "name": "GoTrueAdminMFAApi", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "Contains the full multi-factor authentication administration API.", + "tags": [ + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "children": [ + { + "id": 677, + "name": "deleteFactor", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 678, + "name": "deleteFactor", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Deletes a factor on a user. This will log the user out of all active\nsessions (if the deleted factor was verified). There's no need to delete\nunverified factors.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#unenroll}\n" + }, + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 679, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 657, + "name": "AuthMFAAdminDeleteFactorParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 648, + "name": "AuthMFAAdminDeleteFactorResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 674, + "name": "listFactors", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 675, + "name": "listFactors", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Lists all factors attached to a user.", + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 676, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 670, + "name": "AuthMFAAdminListFactorsParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 661, + "name": "AuthMFAAdminListFactorsResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 677, + 674 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 900, + "character": 17 + } + ] + }, + { + "id": 628, + "name": "GoTrueMFAApi", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "Contains the full multi-factor authentication API.", + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "children": [ + { + "id": 632, + "name": "challenge", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 633, + "name": "challenge", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Prepares a challenge used to verify that a user has access to a MFA\nfactor. Provide the challenge ID and verification code by calling\n{@link GoTrueMFAApi#verify}.", + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 634, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 552, + "name": "MFAChallengeParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 596, + "name": "AuthMFAChallengeResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 641, + "name": "challengeAndVerify", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 642, + "name": "challengeAndVerify", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Helper method which creates a challenge and immediately uses the given code to verify against it thereafter. The verification code is\nprovided by the user by entering a code seen in their authenticator app.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#challengeAndVerify}\n" + }, + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 643, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 555, + "name": "MFAChallengeAndVerifyParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 559, + "name": "AuthMFAVerifyResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 629, + "name": "enroll", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 630, + "name": "enroll", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Starts the enrollment process for a new Multi-Factor Authentication\nfactor. This method creates a new factor in the 'unverified' state.\nPresent the QR code or secret to the user and ask them to add it to their\nauthenticator app. Ask the user to provide you with an authenticator code\nfrom their app and verify it by calling challenge and then verify.", + "text": "The first successful verification of an unverified factor activates the\nfactor. All other sessions are logged out and the current one gets an\n`aal2` authenticator level.\n", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#challenge}" + }, + { + "tag": "see", + "text": "{@link GoTrueMFAApi#verify}" + }, + { + "tag": "see", + "text": "{@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}\n" + }, + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 631, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 539, + "name": "MFAEnrollParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 572, + "name": "AuthMFAEnrollResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 646, + "name": "getAuthenticatorAssuranceLevel", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 647, + "name": "getAuthenticatorAssuranceLevel", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns the Authenticator Assurance Level (AAL) for the active session.", + "text": "- `aal1` (or `null`) means that the user's identity has been verified only\nwith a conventional login (email+password, OTP, magic link, social login,\netc.).\n- `aal2` means that the user's identity has been verified both with a conventional login and at least one MFA factor.\n\nAlthough this method returns a promise, it's fairly quick (microseconds)\nand rarely uses the network. You can use this to check whether the current\nuser needs to be shown a screen to verify their MFA factors.\n", + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 617, + "name": "AuthMFAGetAuthenticatorAssuranceLevelResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 644, + "name": "listFactors", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 645, + "name": "listFactors", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns the list of MFA factors enabled for this user. For most use cases\nyou should consider using {@link\nGoTrueMFAApi#getAuthenticatorAssuranceLevel}. This uses a cached version\nof the factors and avoids incurring a network call. If you need to update\nthis list, call {@link GoTrueClient#getUser} first.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#enroll}" + }, + { + "tag": "see", + "text": "{@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}" + }, + { + "tag": "see", + "text": "{@link GoTrueClient#getUser}\n" + }, + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 606, + "name": "AuthMFAListFactorsResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 638, + "name": "unenroll", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 639, + "name": "unenroll", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Unenroll removes a MFA factor. Unverified factors can safely be ignored\nand it's not necessary to unenroll them. Unenrolling a verified MFA factor\ncannot be done from a session with an `aal1` authenticator level.", + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 640, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 544, + "name": "MFAUnenrollParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 587, + "name": "AuthMFAUnenrollResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 635, + "name": "verify", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 636, + "name": "verify", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Verifies a verification code against a challenge. The verification code is\nprovided by the user by entering a code seen in their authenticator app.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#challenge}\n" + }, + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "parameters": [ + { + "id": 637, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 547, + "name": "MFAVerifyParams" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 559, + "name": "AuthMFAVerifyResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 632, + 641, + 629, + 646, + 644, + 638, + 635 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 760, + "character": 17 + } + ] + }, + { + "id": 331, + "name": "Session", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 334, + "name": "access_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The access token jwt. It is recommended to set the JWT_EXPIRY to a shorter expiry value." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 115, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 337, + "name": "expires_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A timestamp of when the token will expire. Returned when a login is confirmed." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 127, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 336, + "name": "expires_in", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The number of seconds until the token expires (since it was issued). Returned when a login is confirmed." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 123, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 333, + "name": "provider_refresh_token", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The oauth provider refresh token. If present, this can be used to refresh the provider_token via the oauth provider's API.\nNot all oauth providers return a provider refresh token. If the provider_refresh_token is missing, please refer to the oauth provider's documentation for information on how to obtain the provider refresh token." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 111, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 332, + "name": "provider_token", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The oauth provider token. If present, this can be used to make external API requests to the oauth provider used." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 106, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 335, + "name": "refresh_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "A one-time used refresh token that never expires." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 119, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 338, + "name": "token_type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 128, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 339, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 129, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 368, + "name": "User" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 334, + 337, + 336, + 333, + 332, + 335, + 338, + 339 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 102, + "character": 17 + } + ] + }, + { + "id": 405, + "name": "Subscription", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 406, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The subscriber UUID. This will be set by the client." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 303, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 407, + "name": "callback", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 307, + "character": 2 + } + ], + "signatures": [ + { + "id": 408, + "name": "callback", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "The function to call every time there is an event. eg: (eventName) => {}" + }, + "parameters": [ + { + "id": 409, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 280, + "name": "AuthChangeEvent" + } + }, + { + "id": 410, + "name": "session", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "id": 331, + "name": "Session" + } + ] + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 411, + "name": "unsubscribe", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 311, + "character": 2 + } + ], + "signatures": [ + { + "id": 412, + "name": "unsubscribe", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Call this to remove the listener." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 406 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 407, + 411 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 299, + "character": 17 + } + ] + }, + { + "id": 413, + "name": "UpdatableFactorAttributes", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 414, + "name": "friendlyName", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 315, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 414 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 314, + "character": 17 + } + ] + }, + { + "id": 368, + "name": "User", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 378, + "name": "action_link", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 209, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 370, + "name": "app_metadata", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 201, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 361, + "name": "UserAppMetadata" + } + }, + { + "id": 372, + "name": "aud", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 203, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 373, + "name": "confirmation_sent_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 204, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 382, + "name": "confirmed_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 213, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 381, + "name": "created_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 212, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 379, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 210, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 375, + "name": "email_change_sent_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 206, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 383, + "name": "email_confirmed_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 214, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 389, + "name": "factors", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 220, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 354, + "name": "Factor" + } + } + }, + { + "id": 369, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 200, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 388, + "name": "identities", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 219, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 343, + "name": "UserIdentity" + } + } + }, + { + "id": 377, + "name": "invited_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 208, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 385, + "name": "last_sign_in_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 216, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 376, + "name": "new_email", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 207, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 380, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 211, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 384, + "name": "phone_confirmed_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 215, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 374, + "name": "recovery_sent_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 205, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 386, + "name": "role", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 217, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 387, + "name": "updated_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 218, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 371, + "name": "user_metadata", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 202, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 365, + "name": "UserMetadata" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 378, + 370, + 372, + 373, + 382, + 381, + 379, + 375, + 383, + 389, + 369, + 388, + 377, + 385, + 376, + 380, + 384, + 374, + 386, + 387, + 371 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 199, + "character": 17 + } + ] + }, + { + "id": 361, + "name": "UserAppMetadata", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 362, + "name": "provider", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 191, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 362 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 190, + "character": 17 + } + ], + "indexSignature": { + "id": 363, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 364, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + }, + { + "id": 390, + "name": "UserAttributes", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 394, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 245, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 391, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's email." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 227, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 393, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 237, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 392, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The user's phone." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 232, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 394, + 391, + 393, + 392 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 223, + "character": 17 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 395, + "name": "AdminUserAttributes" + } + ] + }, + { + "id": 343, + "name": "UserIdentity", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 351, + "name": "created_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 158, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 344, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 152, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 346, + "name": "identity_data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 154, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 347, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 348, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 349, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + }, + { + "id": 352, + "name": "last_sign_in_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 159, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 350, + "name": "provider", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 157, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 353, + "name": "updated_at", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 160, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 345, + "name": "user_id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 153, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 351, + 344, + 346, + 352, + 350, + 353, + 345 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 151, + "character": 17 + } + ] + }, + { + "id": 365, + "name": "UserMetadata", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 195, + "character": 17 + } + ], + "indexSignature": { + "id": 366, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 367, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + }, + { + "id": 482, + "name": "VerifyEmailOtpParams", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 483, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email address." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 453, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 486, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 458, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 487, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 489, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 462, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 488, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A URL to send the user to after they are confirmed." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 460, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 489, + 488 + ] + } + ] + } + } + }, + { + "id": 484, + "name": "token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The otp sent to the user's email address." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 455, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 485, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's verification type." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 457, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 491, + "name": "EmailOtpType" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 483, + 486, + 484, + 485 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 451, + "character": 17 + } + ] + }, + { + "id": 474, + "name": "VerifyMobileOtpParams", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 478, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 444, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 479, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 481, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 448, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 480, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A URL to send the user to after they are confirmed." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 446, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 481, + 480 + ] + } + ] + } + } + }, + { + "id": 475, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's phone number." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 439, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 476, + "name": "token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The otp sent to the user's phone number." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 441, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 477, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's verification type." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 443, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 490, + "name": "MobileOtpType" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 478, + 475, + 476, + 477 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 437, + "character": 17 + } + ] + }, + { + "id": 280, + "name": "AuthChangeEvent", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 28, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "PASSWORD_RECOVERY" + }, + { + "type": "literal", + "value": "SIGNED_IN" + }, + { + "type": "literal", + "value": "SIGNED_OUT" + }, + { + "type": "literal", + "value": "TOKEN_REFRESHED" + }, + { + "type": "literal", + "value": "USER_UPDATED" + }, + { + "type": "literal", + "value": "USER_DELETED" + }, + { + "type": "reference", + "id": 279, + "name": "AuthChangeEventMFA" + } + ] + } + }, + { + "id": 279, + "name": "AuthChangeEventMFA", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 26, + "character": 12 + } + ], + "type": { + "type": "literal", + "value": "MFA_CHALLENGE_VERIFIED" + } + }, + { + "id": 657, + "name": "AuthMFAAdminDeleteFactorParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 866, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 658, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 659, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the MFA factor to delete." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 868, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 660, + "name": "userId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the user whose factor is being deleted." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 871, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 659, + 660 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 866, + "character": 45 + } + ] + } + } + }, + { + "id": 648, + "name": "AuthMFAAdminDeleteFactorResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 853, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 649, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 650, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 855, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 651, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 652, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor that was successfully deleted." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 857, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 652 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 855, + "character": 12 + } + ] + } + } + }, + { + "id": 653, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 859, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 650, + 653 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 854, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 654, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 655, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 861, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 656, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 861, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 655, + 656 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 861, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 670, + "name": "AuthMFAAdminListFactorsParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 890, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 671, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 672, + "name": "userId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the user for which to list all MFA factors." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 892, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 672 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 890, + "character": 44 + } + ] + } + } + }, + { + "id": 661, + "name": "AuthMFAAdminListFactorsResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "expermental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 877, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 662, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 663, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 879, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 664, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 665, + "name": "factors", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "All factors attached to the user." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 881, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 354, + "name": "Factor" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 665 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 879, + "character": 12 + } + ] + } + } + }, + { + "id": 666, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 883, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 663, + 666 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 878, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 667, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 668, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 885, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 669, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 885, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 668, + 669 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 885, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 596, + "name": "AuthMFAChallengeResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 693, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 597, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 598, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 695, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 599, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 601, + "name": "expires_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Timestamp in UNIX seconds when this challenge will no longer be usable." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 700, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 600, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the newly created challenge." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 697, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 601, + 600 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 695, + "character": 12 + } + ] + } + } + }, + { + "id": 602, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 702, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 598, + 602 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 694, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 603, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 604, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 704, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 605, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 704, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 604, + 605 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 704, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 572, + "name": "AuthMFAEnrollResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 644, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 573, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 574, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 646, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 575, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 576, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor that was just enrolled (in an unverified state)." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 648, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 578, + "name": "totp", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "TOTP enrollment information." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 654, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 579, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 580, + "name": "qr_code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Contains a QR code encoding the authenticator URI. You can\nconvert it to a URL by prepending `data:image/svg+xml;utf-8,` to\nthe value. Avoid logging this value to the console." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 658, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 581, + "name": "secret", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The TOTP secret (also encoded in the QR code). Show this secret\nin a password-style field to the user, in case they are unable to\nscan the QR code. Avoid logging this value to the console." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 663, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 582, + "name": "uri", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The authenticator URI encoded within the QR code, should you need\nto use it. Avoid loggin this value to the console." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 667, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 580, + 581, + 582 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 654, + "character": 14 + } + ] + } + } + }, + { + "id": 577, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Type of MFA factor. Only `totp` supported for now." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 651, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": "totp" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 576, + 578, + 577 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 646, + "character": 12 + } + ] + } + } + }, + { + "id": 583, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 670, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 574, + 583 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 645, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 584, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 585, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 673, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 586, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 674, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 585, + 586 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 672, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 617, + "name": "AuthMFAGetAuthenticatorAssuranceLevelResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 730, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 618, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 619, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 732, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 620, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 623, + "name": "currentAuthenticationMethods", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "A list of all authentication methods attached to this session. Use\nthe information here to detect the last time a user verified a\nfactor, for example if implementing a step-up scenario." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 749, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 340, + "name": "AMREntry" + } + } + }, + { + "id": 621, + "name": "currentLevel", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Current AAL level of the session." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 734, + "character": 8 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 616, + "name": "AuthenticatorAssuranceLevels" + }, + { + "type": "literal", + "value": null + } + ] + } + }, + { + "id": 622, + "name": "nextLevel", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Next possible AAL level for the session. If the next level is higher\nthan the current one, the user should go through MFA.", + "tags": [ + { + "tag": "see", + "text": "{@link GoTrueMFAApi#challenge}\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 742, + "character": 8 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 616, + "name": "AuthenticatorAssuranceLevels" + }, + { + "type": "literal", + "value": null + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 623, + 621, + 622 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 732, + "character": 12 + } + ] + } + } + }, + { + "id": 624, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 751, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 619, + 624 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 731, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 625, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 626, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 753, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 627, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 753, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 626, + 627 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 753, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 606, + "name": "AuthMFAListFactorsResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 709, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 607, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 608, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 711, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 609, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 610, + "name": "all", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "All available factors (verified and unverified)." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 713, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 354, + "name": "Factor" + } + } + }, + { + "id": 611, + "name": "totp", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Only verified TOTP factors. (A subset of `all`.)" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 716, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 354, + "name": "Factor" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 610, + 611 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 711, + "character": 12 + } + ] + } + } + }, + { + "id": 612, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 718, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 608, + 612 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 710, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 613, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 614, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 720, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 615, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 720, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 614, + 615 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 720, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 587, + "name": "AuthMFAUnenrollResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 680, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 588, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 589, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 682, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 590, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 591, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor that was successfully unenrolled." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 684, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 591 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 682, + "character": 12 + } + ] + } + } + }, + { + "id": 592, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 686, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 589, + 592 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 681, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 593, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 594, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 688, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 595, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 688, + "character": 18 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 594, + 595 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 688, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 559, + "name": "AuthMFAVerifyResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 616, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 560, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 561, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 618, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 562, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 563, + "name": "access_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "New access token (JWT) after successful verification." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 620, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 565, + "name": "expires_in", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Number of seconds in which the access token will expire." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 626, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 566, + "name": "refresh_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Refresh token you can use to obtain new access tokens when expired." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 629, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 564, + "name": "token_type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Type of token, typically `Bearer`." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 623, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 567, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Updated user profile." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 632, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 368, + "name": "User" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 563, + 565, + 566, + 564, + 567 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 618, + "character": 12 + } + ] + } + } + }, + { + "id": 568, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 634, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 561, + 568 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 617, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 569, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 570, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 637, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 571, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 638, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 570, + 571 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 636, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 294, + "name": "AuthResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 56, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 295, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 296, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 58, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 297, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 299, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 60, + "character": 8 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 331, + "name": "Session" + }, + { + "type": "literal", + "value": null + } + ] + } + }, + { + "id": 298, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 59, + "character": 8 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 368, + "name": "User" + }, + { + "type": "literal", + "value": null + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 299, + 298 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 58, + "character": 12 + } + ] + } + } + }, + { + "id": 300, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 62, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 296, + 300 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 57, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 301, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 302, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 65, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 303, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 305, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 67, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 304, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 66, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 305, + 304 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 65, + "character": 12 + } + ] + } + } + }, + { + "id": 306, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 69, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 302, + 306 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 64, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 616, + "name": "AuthenticatorAssuranceLevels", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 725, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "aal1" + }, + { + "type": "literal", + "value": "aal2" + } + ] + } + }, + { + "id": 684, + "name": "CallRefreshTokenResult", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 933, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 685, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 687, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 936, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 686, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 935, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 331, + "name": "Session" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 687, + 686 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 934, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 688, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 690, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 940, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + }, + { + "id": 689, + "name": "session", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 939, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 690, + 689 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 938, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 491, + "name": "EmailOtpType", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 467, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "signup" + }, + { + "type": "literal", + "value": "invite" + }, + { + "type": "literal", + "value": "magiclink" + }, + { + "type": "literal", + "value": "recovery" + }, + { + "type": "literal", + "value": "email_change" + } + ] + } + }, + { + "id": 508, + "name": "GenerateEmailChangeLinkParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 490, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 509, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 511, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 493, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 512, + "name": "newEmail", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's new email. Only required if type is 'email_change_current' or 'email_change_new'." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 497, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 513, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 498, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 514, + "name": "GenerateLinkOptions" + }, + { + "type": "literal", + "value": "redirectTo" + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 510, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 491, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "email_change_current" + }, + { + "type": "literal", + "value": "email_change_new" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 511, + 512, + 513, + 510 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 490, + "character": 44 + } + ] + } + } + }, + { + "id": 498, + "name": "GenerateInviteOrMagiclinkParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 476, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 499, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 501, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 479, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 502, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 480, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 514, + "name": "GenerateLinkOptions" + }, + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "data" + }, + { + "type": "literal", + "value": "redirectTo" + } + ] + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 500, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 477, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "invite" + }, + { + "type": "literal", + "value": "magiclink" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 501, + 502, + 500 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 476, + "character": 46 + } + ] + } + } + }, + { + "id": 517, + "name": "GenerateLinkParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 512, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 492, + "name": "GenerateSignupLinkParams" + }, + { + "type": "reference", + "id": 498, + "name": "GenerateInviteOrMagiclinkParams" + }, + { + "type": "reference", + "id": 503, + "name": "GenerateRecoveryLinkParams" + }, + { + "type": "reference", + "id": 508, + "name": "GenerateEmailChangeLinkParams" + } + ] + } + }, + { + "id": 531, + "name": "GenerateLinkProperties", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "shortText": "The properties related to the email link generated" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 535, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 532, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 533, + "name": "action_link", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The email link to send to the user.\nThe action_link follows the following format: auth/v1/verify?type={verification_type}&token={hashed_token}&redirect_to={redirect_to}" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 540, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 534, + "name": "email_otp", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The raw email OTP.\nYou should send this in the email if you want your users to verify using an OTP instead of the action link." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 545, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 535, + "name": "hashed_token", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The hashed token appended to the action link." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 549, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 536, + "name": "redirect_to", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The URL appended to the action link." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 551, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 537, + "name": "verification_type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The verification type that the email link is associated to." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 553, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 538, + "name": "GenerateLinkType" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 533, + 534, + 535, + 536, + 537 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 535, + "character": 37 + } + ] + } + } + }, + { + "id": 518, + "name": "GenerateLinkResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 518, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 519, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 520, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 520, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 521, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 522, + "name": "properties", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 521, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 531, + "name": "GenerateLinkProperties" + } + }, + { + "id": 523, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 522, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 368, + "name": "User" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 522, + 523 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 520, + "character": 12 + } + ] + } + } + }, + { + "id": 524, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 524, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 520, + 524 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 519, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 525, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 526, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 527, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 527, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 528, + "name": "properties", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 528, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 529, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 529, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 528, + 529 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 527, + "character": 12 + } + ] + } + } + }, + { + "id": 530, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 531, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 526, + 530 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 526, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 538, + "name": "GenerateLinkType", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 556, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "signup" + }, + { + "type": "literal", + "value": "invite" + }, + { + "type": "literal", + "value": "magiclink" + }, + { + "type": "literal", + "value": "recovery" + }, + { + "type": "literal", + "value": "email_change_current" + }, + { + "type": "literal", + "value": "email_change_new" + } + ] + } + }, + { + "id": 503, + "name": "GenerateRecoveryLinkParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 483, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 504, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 506, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 486, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 507, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 487, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 514, + "name": "GenerateLinkOptions" + }, + { + "type": "literal", + "value": "redirectTo" + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 505, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 484, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "recovery" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 506, + 507, + 505 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 483, + "character": 41 + } + ] + } + } + }, + { + "id": 492, + "name": "GenerateSignupLinkParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 469, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 493, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 495, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 471, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 497, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 473, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 514, + "name": "GenerateLinkOptions" + }, + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "data" + }, + { + "type": "literal", + "value": "redirectTo" + } + ] + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 496, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 472, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 494, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 470, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "signup" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 495, + 497, + 496, + 494 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 469, + "character": 39 + } + ] + } + } + }, + { + "id": 281, + "name": "GoTrueClientOptions", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 37, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 282, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 290, + "name": "autoRefreshToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 47, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 289, + "name": "detectSessionInUrl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 45, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 293, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 53, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "Fetch" + } + }, + { + "id": 284, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 41, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 285, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 41, + "character": 12 + } + ], + "indexSignature": { + "id": 286, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 287, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 291, + "name": "persistSession", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 49, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 292, + "name": "storage", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 51, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 680, + "name": "SupportedStorage" + } + }, + { + "id": 288, + "name": "storageKey", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 283, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 39, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 290, + 289, + 293, + 284, + 291, + 292, + 288, + 283 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 37, + "character": 34 + } + ] + } + } + }, + { + "id": 681, + "name": "InitializeResult", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 931, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 682, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 683, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 931, + "character": 33 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 694, + "name": "AuthError" + }, + { + "type": "literal", + "value": null + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 683 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 931, + "character": 31 + } + ] + } + } + }, + { + "id": 555, + "name": "MFAChallengeAndVerifyParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 606, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 556, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 558, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Verification code provided by the user." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 610, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 557, + "name": "factorId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor being verified." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 608, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 558, + 557 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 606, + "character": 42 + } + ] + } + } + }, + { + "id": 552, + "name": "MFAChallengeParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 598, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 553, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 554, + "name": "factorId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor to be challenged." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 600, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 554 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 598, + "character": 33 + } + ] + } + } + }, + { + "id": 539, + "name": "MFAEnrollParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 567, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 540, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 541, + "name": "factorType", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 568, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "totp" + } + }, + { + "id": 543, + "name": "friendlyName", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 570, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 542, + "name": "issuer", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 569, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 541, + 543, + 542 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 567, + "character": 30 + } + ] + } + } + }, + { + "id": 544, + "name": "MFAUnenrollParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 576, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 545, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 546, + "name": "factorId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor being unenrolled." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 578, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 546 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 576, + "character": 32 + } + ] + } + } + }, + { + "id": 547, + "name": "MFAVerifyParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "tags": [ + { + "tag": "experimental", + "text": "\n" + } + ] + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 584, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 548, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 550, + "name": "challengeId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the challenge being verified." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 589, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 551, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "Verification code provided by the user." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 592, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 549, + "name": "factorId", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "ID of the factor being verified." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 586, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 550, + 551, + 549 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 584, + "character": 30 + } + ] + } + } + }, + { + "id": 490, + "name": "MobileOtpType", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 466, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "sms" + }, + { + "type": "literal", + "value": "phone_change" + } + ] + } + }, + { + "id": 307, + "name": "OAuthResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 72, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 308, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 309, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 74, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 310, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 311, + "name": "provider", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 75, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 278, + "name": "Provider" + } + }, + { + "id": 312, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 76, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 311, + 312 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 74, + "character": 12 + } + ] + } + } + }, + { + "id": 313, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 78, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 309, + 313 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 73, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 314, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 315, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 81, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 316, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 317, + "name": "provider", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 82, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 278, + "name": "Provider" + } + }, + { + "id": 318, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 83, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 317, + 318 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 81, + "character": 12 + } + ] + } + } + }, + { + "id": 319, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 85, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 315, + 319 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 80, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 278, + "name": "Provider", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "shortText": "One of the providers supported by GoTrue." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 5, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "apple" + }, + { + "type": "literal", + "value": "azure" + }, + { + "type": "literal", + "value": "bitbucket" + }, + { + "type": "literal", + "value": "discord" + }, + { + "type": "literal", + "value": "facebook" + }, + { + "type": "literal", + "value": "github" + }, + { + "type": "literal", + "value": "gitlab" + }, + { + "type": "literal", + "value": "google" + }, + { + "type": "literal", + "value": "keycloak" + }, + { + "type": "literal", + "value": "linkedin" + }, + { + "type": "literal", + "value": "notion" + }, + { + "type": "literal", + "value": "slack" + }, + { + "type": "literal", + "value": "spotify" + }, + { + "type": "literal", + "value": "twitch" + }, + { + "type": "literal", + "value": "twitter" + }, + { + "type": "literal", + "value": "workos" + } + ] + } + }, + { + "id": 462, + "name": "SignInWithOAuthCredentials", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 423, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 463, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 465, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 426, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 466, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 469, + "name": "queryParams", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "An object of query params" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 432, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 470, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 432, + "character": 18 + } + ], + "indexSignature": { + "id": 471, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 472, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 467, + "name": "redirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A URL to send the user to after they are confirmed." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 428, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 468, + "name": "scopes", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A space-separated list of scopes granted to the OAuth application." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 430, + "character": 4 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 469, + 467, + 468 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 426, + "character": 12 + } + ] + } + } + }, + { + "id": 464, + "name": "provider", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "One of the providers supported by GoTrue." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 425, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 278, + "name": "Provider" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 465, + 464 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 423, + "character": 41 + } + ] + } + } + }, + { + "id": 431, + "name": "SignInWithPasswordCredentials", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 353, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 432, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 433, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email address." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 356, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 435, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 359, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 436, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 438, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 367, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 437, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 365, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 438, + 437 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 359, + "character": 16 + } + ] + } + } + }, + { + "id": 434, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 358, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 433, + 435, + 434 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 354, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 439, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 442, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 375, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 443, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 445, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 383, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 444, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 381, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 445, + 444 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 375, + "character": 16 + } + ] + } + } + }, + { + "id": 441, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 374, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 440, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's phone number." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 372, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 442, + 441, + 440 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 370, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 446, + "name": "SignInWithPasswordlessCredentials", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 387, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 447, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 448, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email address." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 390, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 449, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 391, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 450, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 454, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 403, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 453, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 401, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 451, + "name": "emailRedirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The redirect url embedded in the email link" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 393, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 452, + "name": "shouldCreateUser", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "If set to false, this method will not create a new user. Defaults to true." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 395, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 454, + 453, + 451, + 452 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 391, + "character": 16 + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 448, + 449 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 388, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 455, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 457, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 409, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 458, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 461, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 419, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 460, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 417, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 459, + "name": "shouldCreateUser", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "If set to false, this method will not create a new user. Defaults to true." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 411, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 461, + 460, + 459 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 409, + "character": 16 + } + ] + } + } + }, + { + "id": 456, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's phone number." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 408, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 457, + 456 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 406, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 415, + "name": "SignUpWithPasswordCredentials", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 318, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 416, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 417, + "name": "email", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's email address." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 321, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 419, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 324, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 420, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 423, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 334, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 422, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 332, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 421, + "name": "emailRedirectTo", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The redirect url embedded in the email link" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 326, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 423, + 422, + 421 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 324, + "character": 16 + } + ] + } + } + }, + { + "id": 418, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 323, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 417, + 419, + 418 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 319, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 424, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 427, + "name": "options", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 342, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 428, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 430, + "name": "captchaToken", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Verification token received when the user completes the captcha on the site." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 350, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 429, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.", + "text": "The `data` should be a JSON object that includes user-specific info, such as their first and last name.\n" + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 348, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 430, + 429 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 342, + "character": 16 + } + ] + } + } + }, + { + "id": 426, + "name": "password", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's password." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 341, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 425, + "name": "phone", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The user's phone number." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 339, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 427, + 426, + 425 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 337, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 680, + "name": "SupportedStorage", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 929, + "character": 12 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Storage", + "package": "typescript", + "name": "Storage" + }, + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "getItem" + }, + { + "type": "literal", + "value": "setItem" + }, + { + "type": "literal", + "value": "removeItem" + } + ] + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + ], + "name": "PromisifyMethods" + } + }, + { + "id": 320, + "name": "UserResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 88, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 321, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 322, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 90, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 323, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 324, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 91, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 368, + "name": "User" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 324 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 90, + "character": 12 + } + ] + } + } + }, + { + "id": 325, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 93, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 322, + 325 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 89, + "character": 4 + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 326, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 327, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 96, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 328, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 329, + "name": "user", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 97, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 329 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 96, + "character": 12 + } + ] + } + } + }, + { + "id": 330, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 99, + "character": 6 + } + ], + "type": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 327, + 330 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 95, + "character": 4 + } + ] + } + } + ] + } + }, + { + "id": 473, + "name": "VerifyOtpParams", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 436, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 474, + "name": "VerifyMobileOtpParams" + }, + { + "type": "reference", + "id": 482, + "name": "VerifyEmailOtpParams" + } + ] + } + }, + { + "id": 691, + "name": "isAuthError", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 10, + "character": 16 + } + ], + "signatures": [ + { + "id": 692, + "name": "isAuthError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 693, + "name": "error", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "error", + "asserts": false, + "targetType": { + "type": "reference", + "id": 694, + "name": "AuthError" + } + } + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 699, + 694, + 759, + 746, + 784, + 734, + 712, + 719, + 1, + 74 + ] + }, + { + "title": "Interfaces", + "kind": 256, + "children": [ + 340, + 395, + 354, + 514, + 673, + 628, + 331, + 405, + 413, + 368, + 361, + 390, + 343, + 365, + 482, + 474 + ] + }, + { + "title": "Type Aliases", + "kind": 4194304, + "children": [ + 280, + 279, + 657, + 648, + 670, + 661, + 596, + 572, + 617, + 606, + 587, + 559, + 294, + 616, + 684, + 491, + 508, + 498, + 517, + 531, + 518, + 538, + 503, + 492, + 281, + 681, + 555, + 552, + 539, + 544, + 547, + 490, + 307, + 278, + 462, + 431, + 446, + 415, + 680, + 320, + 473 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 691 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 0, + "name": "@supabase/postgrest-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 498, + "name": "PostgrestBuilder", + "kind": 128, + "kindString": "Class", + "flags": { + "isAbstract": true + }, + "children": [ + { + "id": 499, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 18, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L18" + } + ], + "signatures": [ + { + "id": 500, + "name": "new PostgrestBuilder", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "typeParameter": [ + { + "id": 501, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "parameters": [ + { + "id": 502, + "name": "builder", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "default" + } + } + ], + "type": { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 515, + "name": "allowEmpty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 16, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L16" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 507, + "name": "body", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 12, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L12" + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 510, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 15, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L15" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 511, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 512, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 513, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 514, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + } + }, + { + "id": 505, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 10, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L10" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 503, + "name": "method", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 8, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L8" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "GET" + }, + { + "type": "literal", + "value": "HEAD" + }, + { + "type": "literal", + "value": "POST" + }, + { + "type": "literal", + "value": "PATCH" + }, + { + "type": "literal", + "value": "DELETE" + } + ] + } + }, + { + "id": 506, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 11, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 508, + "name": "shouldThrowOnError", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 13, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L13" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + }, + { + "id": 509, + "name": "signal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 14, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L14" + } + ], + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + } + }, + { + "id": 504, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 9, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L9" + } + ], + "type": { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + }, + { + "id": 518, + "name": "then", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 48, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L48" + } + ], + "signatures": [ + { + "id": 519, + "name": "then", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 520, + "name": "TResult1", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + }, + { + "id": 521, + "name": "TResult2", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "never" + } + } + ], + "parameters": [ + { + "id": 522, + "name": "onfulfilled", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 523, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 50, + "character": 9, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L50" + } + ], + "signatures": [ + { + "id": 524, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 525, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + }, + { + "id": 526, + "name": "onrejected", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 527, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 53, + "character": 18, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L53" + } + ], + "signatures": [ + { + "id": 528, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 529, + "name": "reason", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ] + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "implementationOf": { + "type": "reference", + "name": "PromiseLike.then" + } + } + ], + "implementationOf": { + "type": "reference", + "name": "PromiseLike.then" + } + }, + { + "id": 516, + "name": "throwOnError", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 43, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L43" + } + ], + "signatures": [ + { + "id": 517, + "name": "throwOnError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If there's an error with the query, throwOnError will reject the promise by\nthrowing the error instead of returning it as part of a successful response.\n\n" + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/supabase/supabase-js/issues/92", + "target": "https://github.com/supabase/supabase-js/issues/92" + } + ] + }, + "type": { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "default" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 499 + ] + }, + { + "title": "Properties", + "children": [ + 515, + 507, + 510, + 505, + 503, + 506, + 508, + 509, + 504 + ] + }, + { + "title": "Methods", + "children": [ + 518, + 516 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 5, + "character": 30, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L5" + } + ], + "typeParameters": [ + { + "id": 530, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 401, + "name": "PostgrestTransformBuilder" + } + ], + "implementedTypes": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 501, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + }, + { + "id": 1, + "name": "PostgrestClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "PostgREST client." + } + ] + }, + "children": [ + { + "id": 2, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 41, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L41" + } + ], + "signatures": [ + { + "id": 3, + "name": "new PostgrestClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Creates a PostgREST client." + } + ] + }, + "typeParameter": [ + { + "id": 4, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 5, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + } + ] + } + } + }, + { + "id": 6, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + } + ], + "parameters": [ + { + "id": 7, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "URL of the PostgREST endpoint" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 8, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 9, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 12, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 50, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L50" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 13, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 14, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Custom fetch" + } + ] + }, + "parameters": [ + { + "id": 15, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 16, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + } + }, + { + "id": 10, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Custom headers" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 48, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L48" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 11, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Postgres schema to switch to" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 49, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L49" + } + ], + "type": { + "type": "reference", + "id": 5, + "name": "SchemaName" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 12, + 10, + 11 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 47, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L47" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 1, + "typeArguments": [ + { + "type": "reference", + "id": 4, + "name": "Database" + }, + { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + { + "type": "reference", + "id": 6, + "name": "Schema" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 20, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 29, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L29" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 21, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 22, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 23, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 24, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + } + }, + { + "id": 18, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 27, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L27" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 19, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 28, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L28" + } + ], + "type": { + "type": "reference", + "id": 5, + "name": "SchemaName" + } + }, + { + "id": 17, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 26, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L26" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 25, + "name": "from", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 64, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L64" + }, + { + "fileName": "src/PostgrestClient.ts", + "line": 68, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L68" + }, + { + "fileName": "src/PostgrestClient.ts", + "line": 71, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L71" + }, + { + "fileName": "src/PostgrestClient.ts", + "line": 72, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L72" + } + ], + "signatures": [ + { + "id": 26, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a query on a table or a view." + } + ] + }, + "typeParameter": [ + { + "id": 27, + "name": "TableName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 28, + "name": "Table", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericTable" + } + } + ], + "parameters": [ + { + "id": 29, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The table or view name to query" + } + ] + }, + "type": { + "type": "reference", + "id": 27, + "name": "TableName" + } + } + ], + "type": { + "type": "reference", + "id": 49, + "typeArguments": [ + { + "type": "reference", + "id": 6, + "name": "Schema" + }, + { + "type": "reference", + "id": 28, + "name": "Table" + } + ], + "name": "default" + } + }, + { + "id": 30, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 31, + "name": "ViewName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 32, + "name": "View", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericView" + } + } + ], + "parameters": [ + { + "id": 33, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 31, + "name": "ViewName" + } + } + ], + "type": { + "type": "reference", + "id": 49, + "typeArguments": [ + { + "type": "reference", + "id": 6, + "name": "Schema" + }, + { + "type": "reference", + "id": 32, + "name": "View" + } + ], + "name": "default" + } + }, + { + "id": 34, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 35, + "name": "relation", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 49, + "typeArguments": [ + { + "type": "reference", + "id": 6, + "name": "Schema" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 36, + "name": "rpc", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 102, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L102" + } + ], + "signatures": [ + { + "id": 37, + "name": "rpc", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a function call." + } + ] + }, + "typeParameter": [ + { + "id": 38, + "name": "FunctionName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 39, + "name": "Function_", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericFunction" + } + } + ], + "parameters": [ + { + "id": 40, + "name": "fn", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The function name to call" + } + ] + }, + "type": { + "type": "reference", + "id": 38, + "name": "FunctionName" + } + }, + { + "id": 41, + "name": "args", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The arguments to pass to the function call" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Args" + }, + "objectType": { + "type": "reference", + "id": 39, + "name": "Function_" + } + }, + "defaultValue": "{}" + }, + { + "id": 42, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 43, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 45, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count rows returned by the\nfunction. Only applicable for [set-returning\nfunctions](https://www.postgresql.org/docs/current/functions-srf.html).\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 113, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L113" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + }, + { + "id": 44, + "name": "head", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "When set to " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will not be returned.\nUseful if you only need the count." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 112, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L112" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 45, + 44 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 111, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L111" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 6, + "name": "Schema" + }, + { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Returns" + }, + "objectType": { + "type": "reference", + "id": 39, + "name": "Function_" + } + }, + "extendsType": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + }, + "trueType": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "number" + }, + "objectType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + } + }, + "extendsType": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "intrinsic", + "name": "any" + }, + "objectType": { + "type": "intrinsic", + "name": "any" + } + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Returns" + }, + "objectType": { + "type": "reference", + "id": 39, + "name": "Function_" + } + } + ], + "name": "default" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 2 + ] + }, + { + "title": "Properties", + "children": [ + 20, + 18, + 19, + 17 + ] + }, + { + "title": "Methods", + "children": [ + 25, + 36 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestClient.ts", + "line": 17, + "character": 21, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestClient.ts#L17" + } + ], + "typeParameters": [ + { + "id": 46, + "name": "Database", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Types for the schema from the [type\ngenerator](https://supabase.com/docs/reference/javascript/next/typescript-support)" + } + ] + }, + "default": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 47, + "name": "SchemaName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Postgres schema to switch to. Must be a string\nliteral, the same one passed to the constructor. If the schema is not\n" + }, + { + "kind": "code", + "text": "`\"public\"`" + }, + { + "kind": "text", + "text": ", this must be supplied manually." + } + ] + }, + "type": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + } + ] + }, + "default": { + "type": "conditional", + "checkType": { + "type": "literal", + "value": "public" + }, + "extendsType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "trueType": { + "type": "literal", + "value": "public" + }, + "falseType": { + "type": "intersection", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 4, + "name": "Database" + } + } + ] + } + } + }, + { + "id": 48, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + }, + "default": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "extendsType": { + "type": "reference", + "name": "GenericSchema" + }, + "trueType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 5, + "name": "SchemaName" + }, + "objectType": { + "type": "reference", + "id": 4, + "name": "Database" + } + }, + "falseType": { + "type": "intrinsic", + "name": "any" + } + } + } + ] + }, + { + "id": 112, + "name": "PostgrestFilterBuilder", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 113, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 18, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L18" + } + ], + "signatures": [ + { + "id": 114, + "name": "new PostgrestFilterBuilder", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "typeParameter": [ + { + "id": 115, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 116, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 117, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "parameters": [ + { + "id": 118, + "name": "builder", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 403, + "name": "default.constructor" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 402, + "name": "default.constructor" + } + }, + { + "id": 383, + "name": "allowEmpty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 16, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L16" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "inheritedFrom": { + "type": "reference", + "id": 480, + "name": "default.allowEmpty" + } + }, + { + "id": 375, + "name": "body", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 12, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L12" + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + }, + "inheritedFrom": { + "type": "reference", + "id": 472, + "name": "default.body" + } + }, + { + "id": 378, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 15, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L15" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 379, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 380, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 381, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 382, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + }, + "inheritedFrom": { + "type": "reference", + "id": 475, + "name": "default.fetch" + } + }, + { + "id": 373, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 10, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L10" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 470, + "name": "default.headers" + } + }, + { + "id": 371, + "name": "method", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 8, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L8" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "GET" + }, + { + "type": "literal", + "value": "HEAD" + }, + { + "type": "literal", + "value": "POST" + }, + { + "type": "literal", + "value": "PATCH" + }, + { + "type": "literal", + "value": "DELETE" + } + ] + }, + "inheritedFrom": { + "type": "reference", + "id": 468, + "name": "default.method" + } + }, + { + "id": 374, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 11, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 471, + "name": "default.schema" + } + }, + { + "id": 376, + "name": "shouldThrowOnError", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 13, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L13" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false", + "inheritedFrom": { + "type": "reference", + "id": 473, + "name": "default.shouldThrowOnError" + } + }, + { + "id": 377, + "name": "signal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 14, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L14" + } + ], + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 474, + "name": "default.signal" + } + }, + { + "id": 372, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 9, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L9" + } + ], + "type": { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 469, + "name": "default.url" + } + }, + { + "id": 345, + "name": "abortSignal", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 130, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L130" + } + ], + "signatures": [ + { + "id": 346, + "name": "abortSignal", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set the AbortSignal for the fetch request." + } + ] + }, + "parameters": [ + { + "id": 347, + "name": "signal", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The AbortSignal to use for the fetch request" + } + ] + }, + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 443, + "name": "default.abortSignal" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 442, + "name": "default.abortSignal" + } + }, + { + "id": 207, + "name": "containedBy", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 216, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L216" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 220, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L220" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 221, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L221" + } + ], + "signatures": [ + { + "id": 208, + "name": "containedBy", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for jsonb, array, and range columns. Match only rows where\nevery element appearing in " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is contained by " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 209, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 210, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The jsonb, array, or range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 209, + "name": "ColumnName" + } + }, + { + "id": 211, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The jsonb, array, or range value to filter with" + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + }, + { + "type": "array", + "elementType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 209, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 212, + "name": "containedBy", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 213, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 214, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 199, + "name": "contains", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 189, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L189" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 193, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L193" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 194, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L194" + } + ], + "signatures": [ + { + "id": 200, + "name": "contains", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for jsonb, array, and range columns. Match only rows where\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " contains every element appearing in " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 201, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 202, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The jsonb, array, or range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 201, + "name": "ColumnName" + } + }, + { + "id": 203, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The jsonb, array, or range value to filter with" + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + }, + { + "type": "array", + "elementType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 201, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 204, + "name": "contains", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 205, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 206, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 352, + "name": "csv", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 161, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L161" + } + ], + "signatures": [ + { + "id": 353, + "name": "csv", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a string in CSV format." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 450, + "name": "default.csv" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 449, + "name": "default.csv" + } + }, + { + "id": 119, + "name": "eq", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 41, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L41" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 42, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L42" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 43, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L43" + } + ], + "signatures": [ + { + "id": 120, + "name": "eq", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is equal to " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": ".\n\nTo check if the value of " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is NULL, you should use " + }, + { + "kind": "code", + "text": "`.is()`" + }, + { + "kind": "text", + "text": " instead." + } + ] + }, + "typeParameter": [ + { + "id": 121, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 122, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 121, + "name": "ColumnName" + } + }, + { + "id": 123, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 121, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 124, + "name": "eq", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 125, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 126, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 356, + "name": "explain", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 195, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L195" + } + ], + "signatures": [ + { + "id": 357, + "name": "explain", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as the EXPLAIN plan for the query." + } + ] + }, + "parameters": [ + { + "id": 358, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 359, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 360, + "name": "analyze", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the query will be executed and the\nactual run time will be returned" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 203, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L203" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 363, + "name": "buffers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on buffer usage" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 206, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L206" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 365, + "name": "format", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The format of the output, can be " + }, + { + "kind": "code", + "text": "`\"text\"`" + }, + { + "kind": "text", + "text": " (default)\nor " + }, + { + "kind": "code", + "text": "`\"json\"`" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 208, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L208" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "text" + }, + { + "type": "literal", + "value": "json" + } + ] + } + }, + { + "id": 362, + "name": "settings", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on configuration\nparameters that affect query planning" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 205, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L205" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 361, + "name": "verbose", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the query identifier will be returned\nand " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will include the output columns of the query" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 204, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L204" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 364, + "name": "wal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on WAL record generation" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 207, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L207" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 360, + 363, + 365, + 362, + 361, + 364 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 202, + "character": 5, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L202" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ], + "name": "PostgrestResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + }, + "inheritedFrom": { + "type": "reference", + "id": 454, + "name": "default.explain" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 453, + "name": "default.explain" + } + }, + { + "id": 301, + "name": "filter", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 441, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L441" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 446, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L446" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 447, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L447" + } + ], + "signatures": [ + { + "id": 302, + "name": "filter", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows which satisfy the filter. This is an escape hatch - you\nshould use the specific filter methods wherever possible.\n\nUnlike most filters, " + }, + { + "kind": "code", + "text": "`opearator`" + }, + { + "kind": "text", + "text": " and " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": " are used as-is and need to\nfollow [PostgREST\nsyntax](https://postgrest.org/en/stable/api.html#operators). You also need\nto make sure they are properly sanitized." + } + ] + }, + "typeParameter": [ + { + "id": 303, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 304, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 303, + "name": "ColumnName" + } + }, + { + "id": 305, + "name": "operator", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The operator to filter with, following PostgREST syntax" + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "FilterOperator" + }, + { + "type": "literal", + "value": "not.eq" + }, + { + "type": "literal", + "value": "not.neq" + }, + { + "type": "literal", + "value": "not.gt" + }, + { + "type": "literal", + "value": "not.gte" + }, + { + "type": "literal", + "value": "not.lt" + }, + { + "type": "literal", + "value": "not.lte" + }, + { + "type": "literal", + "value": "not.like" + }, + { + "type": "literal", + "value": "not.ilike" + }, + { + "type": "literal", + "value": "not.is" + }, + { + "type": "literal", + "value": "not.in" + }, + { + "type": "literal", + "value": "not.cs" + }, + { + "type": "literal", + "value": "not.cd" + }, + { + "type": "literal", + "value": "not.sl" + }, + { + "type": "literal", + "value": "not.sr" + }, + { + "type": "literal", + "value": "not.nxl" + }, + { + "type": "literal", + "value": "not.nxr" + }, + { + "type": "literal", + "value": "not.adj" + }, + { + "type": "literal", + "value": "not.ov" + }, + { + "type": "literal", + "value": "not.fts" + }, + { + "type": "literal", + "value": "not.plfts" + }, + { + "type": "literal", + "value": "not.phfts" + }, + { + "type": "literal", + "value": "not.wfts" + } + ] + } + }, + { + "id": 306, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with, following PostgREST syntax" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 307, + "name": "filter", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 308, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 309, + "name": "operator", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 310, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 354, + "name": "geojson", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 169, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L169" + } + ], + "signatures": [ + { + "id": 355, + "name": "geojson", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as an object in [GeoJSON](https://geojson.org) format." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 452, + "name": "default.geojson" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 451, + "name": "default.geojson" + } + }, + { + "id": 135, + "name": "gt", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 67, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L67" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 68, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L68" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 69, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L69" + } + ], + "signatures": [ + { + "id": 136, + "name": "gt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is greater than " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 137, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 138, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 137, + "name": "ColumnName" + } + }, + { + "id": 139, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 137, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 140, + "name": "gt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 141, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 142, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 143, + "name": "gte", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 80, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L80" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 81, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L81" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 82, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L82" + } + ], + "signatures": [ + { + "id": 144, + "name": "gte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is greater than or equal to " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 145, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 146, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 145, + "name": "ColumnName" + } + }, + { + "id": 147, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 145, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 148, + "name": "gte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 149, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 150, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 175, + "name": "ilike", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 132, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L132" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 133, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L133" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 134, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L134" + } + ], + "signatures": [ + { + "id": 176, + "name": "ilike", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " matches " + }, + { + "kind": "code", + "text": "`pattern`" + }, + { + "kind": "text", + "text": " case-insensitively." + } + ] + }, + "typeParameter": [ + { + "id": 177, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 178, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 177, + "name": "ColumnName" + } + }, + { + "id": 179, + "name": "pattern", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The pattern to match with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 180, + "name": "ilike", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 181, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 182, + "name": "pattern", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 191, + "name": "in", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 167, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L167" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 168, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L168" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 169, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L169" + } + ], + "signatures": [ + { + "id": 192, + "name": "in", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is included in the " + }, + { + "kind": "code", + "text": "`values`" + }, + { + "kind": "text", + "text": " array." + } + ] + }, + "typeParameter": [ + { + "id": 193, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 194, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 193, + "name": "ColumnName" + } + }, + { + "id": 195, + "name": "values", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The values array to filter with" + } + ] + }, + "type": { + "type": "array", + "elementType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 193, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 196, + "name": "in", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 197, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 198, + "name": "values", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 183, + "name": "is", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 151, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L151" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 155, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L155" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 156, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L156" + } + ], + "signatures": [ + { + "id": 184, + "name": "is", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " IS " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": ".\n\nFor non-boolean columns, this is only relevant for checking if the value of\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is NULL by setting " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": " to " + }, + { + "kind": "code", + "text": "`null`" + }, + { + "kind": "text", + "text": ".\n\nFor boolean columns, you can also set " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": " to " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": " or " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": " and it\nwill behave the same way as " + }, + { + "kind": "code", + "text": "`.eq()`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 185, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 186, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 185, + "name": "ColumnName" + } + }, + { + "id": 187, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "Object" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 188, + "name": "is", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 189, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 190, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 167, + "name": "like", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 119, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L119" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 120, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L120" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 121, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L121" + } + ], + "signatures": [ + { + "id": 168, + "name": "like", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " matches " + }, + { + "kind": "code", + "text": "`pattern`" + }, + { + "kind": "text", + "text": " case-sensitively." + } + ] + }, + "typeParameter": [ + { + "id": 169, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 170, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 169, + "name": "ColumnName" + } + }, + { + "id": 171, + "name": "pattern", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The pattern to match with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 172, + "name": "like", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 173, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 174, + "name": "pattern", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 332, + "name": "limit", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ], + "signatures": [ + { + "id": 333, + "name": "limit", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Limit the query result by " + }, + { + "kind": "code", + "text": "`count`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "parameters": [ + { + "id": 334, + "name": "count", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The maximum number of rows to return" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 335, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 336, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 337, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to limit rows of foreign tables\ninstead of the current table" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 43, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 337 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 41, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 430, + "name": "default.limit" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 429, + "name": "default.limit" + } + }, + { + "id": 151, + "name": "lt", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 93, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L93" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 94, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L94" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 95, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L95" + } + ], + "signatures": [ + { + "id": 152, + "name": "lt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is less than " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 153, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 154, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 153, + "name": "ColumnName" + } + }, + { + "id": 155, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 153, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 156, + "name": "lt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 157, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 158, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 159, + "name": "lte", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 106, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L106" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 107, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L107" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 108, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L108" + } + ], + "signatures": [ + { + "id": 160, + "name": "lte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is less than or equal to " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 161, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 162, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 161, + "name": "ColumnName" + } + }, + { + "id": 163, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 161, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 164, + "name": "lte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 165, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 166, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 279, + "name": "match", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 376, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L376" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 377, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L377" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 378, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L378" + } + ], + "signatures": [ + { + "id": 280, + "name": "match", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where each column in " + }, + { + "kind": "code", + "text": "`query`" + }, + { + "kind": "text", + "text": " keys is equal to its\nassociated value. Shorthand for multiple " + }, + { + "kind": "code", + "text": "`.eq()`" + }, + { + "kind": "text", + "text": "s." + } + ] + }, + "typeParameter": [ + { + "id": 281, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 282, + "name": "query", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The object to filter with, with column names as keys mapped\nto their filter values" + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 281, + "name": "ColumnName" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 281, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 283, + "name": "match", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 284, + "name": "query", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 350, + "name": "maybeSingle", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 152, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L152" + } + ], + "signatures": [ + { + "id": 351, + "name": "maybeSingle", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a single object instead of an array of objects.\n\nQuery result must be zero or one row (e.g. using " + }, + { + "kind": "code", + "text": "`.limit(1)`" + }, + { + "kind": "text", + "text": "), otherwise\nthis returns an error." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 535, + "typeArguments": [ + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "PostgrestMaybeSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 448, + "name": "default.maybeSingle" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 447, + "name": "default.maybeSingle" + } + }, + { + "id": 127, + "name": "neq", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 54, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L54" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 55, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L55" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 56, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L56" + } + ], + "signatures": [ + { + "id": 128, + "name": "neq", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is not equal to " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 129, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 130, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 129, + "name": "ColumnName" + } + }, + { + "id": 131, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 129, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 132, + "name": "neq", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 133, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 134, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 285, + "name": "not", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 398, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L398" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 403, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L403" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 404, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L404" + } + ], + "signatures": [ + { + "id": 286, + "name": "not", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows which doesn't satisfy the filter.\n\nUnlike most filters, " + }, + { + "kind": "code", + "text": "`opearator`" + }, + { + "kind": "text", + "text": " and " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": " are used as-is and need to\nfollow [PostgREST\nsyntax](https://postgrest.org/en/stable/api.html#operators). You also need\nto make sure they are properly sanitized." + } + ] + }, + "typeParameter": [ + { + "id": 287, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 288, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 287, + "name": "ColumnName" + } + }, + { + "id": 289, + "name": "operator", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The operator to be negated to filter with, following\nPostgREST syntax" + } + ] + }, + "type": { + "type": "reference", + "name": "FilterOperator" + } + }, + { + "id": 290, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to filter with, following PostgREST syntax" + } + ] + }, + "type": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 287, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 291, + "name": "not", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 292, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 293, + "name": "operator", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 294, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 295, + "name": "or", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 422, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L422" + } + ], + "signatures": [ + { + "id": 296, + "name": "or", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Match only rows which satisfy at least one of the filters.\n\nUnlike most filters, " + }, + { + "kind": "code", + "text": "`filters`" + }, + { + "kind": "text", + "text": " is used as-is and needs to follow [PostgREST\nsyntax](https://postgrest.org/en/stable/api.html#operators). You also need\nto make sure it's properly sanitized.\n\nIt's currently not possible to do an " + }, + { + "kind": "code", + "text": "`.or()`" + }, + { + "kind": "text", + "text": " filter across multiple tables." + } + ] + }, + "parameters": [ + { + "id": 297, + "name": "filters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The filters to use, following PostgREST syntax" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 298, + "name": "foreignTable", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to filter on foreign tables instead of the\ncurrent table" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 299, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 300, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 422, + "character": 42, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L422" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 300 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 422, + "character": 40, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L422" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 316, + "name": "order", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 65, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L65" + }, + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 69, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L69" + }, + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 73, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L73" + } + ], + "signatures": [ + { + "id": 317, + "name": "order", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Order the query result by " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": ".\n\nYou can call this method multiple times to order by multiple columns.\n\nYou can order foreign tables, but it doesn't affect the ordering of the\ncurrent table." + } + ] + }, + "typeParameter": [ + { + "id": 318, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 319, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to order by" + } + ] + }, + "type": { + "type": "reference", + "id": 318, + "name": "ColumnName" + } + }, + { + "id": 320, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "type": { + "type": "reflection", + "declaration": { + "id": 321, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 322, + "name": "ascending", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the result will be in ascending order" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 324, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to order a foreign table by foreign\ncolumns" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 59, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "undefined" + } + }, + { + "id": 323, + "name": "nullsFirst", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`null`" + }, + { + "kind": "text", + "text": "s appear first. If " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": ",\n" + }, + { + "kind": "code", + "text": "`null`" + }, + { + "kind": "text", + "text": "s appear last." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 37, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 322, + 324, + 323 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 414, + "name": "default.order" + } + }, + { + "id": 325, + "name": "order", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 326, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 327, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 328, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 329, + "name": "ascending", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 331, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 59, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 330, + "name": "nullsFirst", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 37, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 329, + 331, + 330 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 422, + "name": "default.order" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 413, + "name": "default.order" + } + }, + { + "id": 255, + "name": "overlaps", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 315, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L315" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 319, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L319" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 320, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L320" + } + ], + "signatures": [ + { + "id": 256, + "name": "overlaps", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for array and range columns. Match only rows where\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " and " + }, + { + "kind": "code", + "text": "`value`" + }, + { + "kind": "text", + "text": " have an element in common." + } + ] + }, + "typeParameter": [ + { + "id": 257, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 258, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The array or range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 257, + "name": "ColumnName" + } + }, + { + "id": 259, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The array or range value to filter with" + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "id": 257, + "name": "ColumnName" + }, + "objectType": { + "type": "reference", + "id": 116, + "name": "Row" + } + } + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 260, + "name": "overlaps", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 261, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 262, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 338, + "name": "range", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ], + "signatures": [ + { + "id": 339, + "name": "range", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Limit the query result by " + }, + { + "kind": "code", + "text": "`from`" + }, + { + "kind": "text", + "text": " and " + }, + { + "kind": "code", + "text": "`to`" + }, + { + "kind": "text", + "text": " inclusively." + } + ] + }, + "parameters": [ + { + "id": 340, + "name": "from", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The starting index from which to limit the result" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 341, + "name": "to", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The last index to which to limit the result" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 342, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 343, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 344, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to limit rows of foreign tables\ninstead of the current table" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 54, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 344 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 52, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 436, + "name": "default.range" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 435, + "name": "default.range" + } + }, + { + "id": 247, + "name": "rangeAdjacent", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 301, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L301" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 302, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L302" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 303, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L303" + } + ], + "signatures": [ + { + "id": 248, + "name": "rangeAdjacent", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for range columns. Match only rows where " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is\nmutually exclusive to " + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": " and there can be no element between the two\nranges." + } + ] + }, + "typeParameter": [ + { + "id": 249, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 250, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 249, + "name": "ColumnName" + } + }, + { + "id": 251, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 252, + "name": "rangeAdjacent", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 253, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 254, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 215, + "name": "rangeGt", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 242, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L242" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 243, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L243" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 244, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L244" + } + ], + "signatures": [ + { + "id": 216, + "name": "rangeGt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for range columns. Match only rows where every element in\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is greater than any element in " + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 217, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 218, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 217, + "name": "ColumnName" + } + }, + { + "id": 219, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 220, + "name": "rangeGt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 221, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 222, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 223, + "name": "rangeGte", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 257, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L257" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 258, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L258" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 259, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L259" + } + ], + "signatures": [ + { + "id": 224, + "name": "rangeGte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for range columns. Match only rows where every element in\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is either contained in " + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": " or greater than any element in\n" + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 225, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 226, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 225, + "name": "ColumnName" + } + }, + { + "id": 227, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 228, + "name": "rangeGte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 229, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 230, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 231, + "name": "rangeLt", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 271, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L271" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 272, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L272" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 273, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L273" + } + ], + "signatures": [ + { + "id": 232, + "name": "rangeLt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for range columns. Match only rows where every element in\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is less than any element in " + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 233, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 234, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 233, + "name": "ColumnName" + } + }, + { + "id": 235, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 236, + "name": "rangeLt", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 237, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 238, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 239, + "name": "rangeLte", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 286, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L286" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 287, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L287" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 288, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L288" + } + ], + "signatures": [ + { + "id": 240, + "name": "rangeLte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for range columns. Match only rows where every element in\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " is either contained in " + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": " or less than any element in\n" + }, + { + "kind": "code", + "text": "`range`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 241, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 242, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 241, + "name": "ColumnName" + } + }, + { + "id": 243, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The range to filter with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 244, + "name": "rangeLte", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 245, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 246, + "name": "range", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 368, + "name": "returns", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 249, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L249" + } + ], + "signatures": [ + { + "id": 369, + "name": "returns", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Override the type of the returned " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 370, + "name": "NewResult", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The new result type to override with" + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 370, + "name": "NewResult" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 466, + "name": "default.returns" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 465, + "name": "default.returns" + } + }, + { + "id": 366, + "name": "rollback", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 235, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L235" + } + ], + "signatures": [ + { + "id": 367, + "name": "rollback", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Rollback the query.\n\n" + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will still be returned, but the query is not committed." + } + ] + }, + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 464, + "name": "default.rollback" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 463, + "name": "default.rollback" + } + }, + { + "id": 311, + "name": "select", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 24, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L24" + } + ], + "signatures": [ + { + "id": 312, + "name": "select", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a SELECT on the query result.\n\nBy default, " + }, + { + "kind": "code", + "text": "`.insert()`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`.update()`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`.upsert()`" + }, + { + "kind": "text", + "text": ", and " + }, + { + "kind": "code", + "text": "`.delete()`" + }, + { + "kind": "text", + "text": " do not\nreturn modified rows. By calling this method, modified rows are returned in\n" + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 313, + "name": "Query", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "literal", + "value": "*" + } + }, + { + "id": 314, + "name": "NewResult", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 313, + "name": "Query" + } + ], + "name": "GetResult" + } + } + ], + "parameters": [ + { + "id": 315, + "name": "columns", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The columns to retrieve, separated by commas" + } + ] + }, + "type": { + "type": "reference", + "id": 313, + "name": "Query" + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 314, + "name": "NewResult" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 409, + "name": "default.select" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 408, + "name": "default.select" + } + }, + { + "id": 348, + "name": "single", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 141, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L141" + } + ], + "signatures": [ + { + "id": 349, + "name": "single", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a single object instead of an array of objects.\n\nQuery result must be one row (e.g. using " + }, + { + "kind": "code", + "text": "`.limit(1)`" + }, + { + "kind": "text", + "text": "), otherwise this\nreturns an error." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 446, + "name": "default.single" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 445, + "name": "default.single" + } + }, + { + "id": 263, + "name": "textSearch", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 341, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L341" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 346, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L346" + }, + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 351, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L351" + } + ], + "signatures": [ + { + "id": 264, + "name": "textSearch", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Only relevant for text and tsvector columns. Match only rows where\n" + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": " matches the query string in " + }, + { + "kind": "code", + "text": "`query`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 265, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 266, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The text or tsvector column to filter on" + } + ] + }, + "type": { + "type": "reference", + "id": 265, + "name": "ColumnName" + } + }, + { + "id": 267, + "name": "query", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The query text to match with" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 268, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "type": { + "type": "reflection", + "declaration": { + "id": 269, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 270, + "name": "config", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The text search configuration to use" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 344, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L344" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 271, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Change how the " + }, + { + "kind": "code", + "text": "`query`" + }, + { + "kind": "text", + "text": " text is interpreted" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 344, + "character": 33, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L344" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "plain" + }, + { + "type": "literal", + "value": "phrase" + }, + { + "type": "literal", + "value": "websearch" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 270, + 271 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 344, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L344" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 272, + "name": "textSearch", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 273, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 274, + "name": "query", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 275, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 276, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 277, + "name": "config", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 349, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L349" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 278, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 349, + "character": 33, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L349" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "plain" + }, + { + "type": "literal", + "value": "phrase" + }, + { + "type": "literal", + "value": "websearch" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 277, + 278 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 349, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L349" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 386, + "name": "then", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 48, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L48" + } + ], + "signatures": [ + { + "id": 387, + "name": "then", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 388, + "name": "TResult1", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + }, + { + "id": 389, + "name": "TResult2", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "never" + } + } + ], + "parameters": [ + { + "id": 390, + "name": "onfulfilled", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 391, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 50, + "character": 9, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L50" + } + ], + "signatures": [ + { + "id": 392, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 393, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + }, + { + "id": 394, + "name": "onrejected", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 395, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 53, + "character": 18, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L53" + } + ], + "signatures": [ + { + "id": 396, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 397, + "name": "reason", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ] + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 484, + "name": "default.then" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 483, + "name": "default.then" + } + }, + { + "id": 384, + "name": "throwOnError", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 43, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L43" + } + ], + "signatures": [ + { + "id": 385, + "name": "throwOnError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If there's an error with the query, throwOnError will reject the promise by\nthrowing the error instead of returning it as part of a successful response.\n\n" + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/supabase/supabase-js/issues/92", + "target": "https://github.com/supabase/supabase-js/issues/92" + } + ] + }, + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 482, + "name": "default.throwOnError" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 481, + "name": "default.throwOnError" + } + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 113 + ] + }, + { + "title": "Properties", + "children": [ + 383, + 375, + 378, + 373, + 371, + 374, + 376, + 377, + 372 + ] + }, + { + "title": "Methods", + "children": [ + 345, + 207, + 199, + 352, + 119, + 356, + 301, + 354, + 135, + 143, + 175, + 191, + 183, + 167, + 332, + 151, + 159, + 279, + 350, + 127, + 285, + 295, + 316, + 255, + 338, + 247, + 215, + 223, + 231, + 239, + 368, + 366, + 311, + 348, + 263, + 386, + 384 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestFilterBuilder.ts", + "line": 28, + "character": 21, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestFilterBuilder.ts#L28" + } + ], + "typeParameters": [ + { + "id": 398, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 399, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 400, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 115, + "name": "Schema" + }, + { + "type": "reference", + "id": 116, + "name": "Row" + }, + { + "type": "reference", + "id": 117, + "name": "Result" + } + ], + "name": "default" + } + ] + }, + { + "id": 49, + "name": "PostgrestQueryBuilder", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 50, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 16, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L16" + } + ], + "signatures": [ + { + "id": 51, + "name": "new PostgrestQueryBuilder", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "typeParameter": [ + { + "id": 52, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 53, + "name": "Relation", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "GenericTable" + }, + { + "type": "reference", + "name": "GenericView" + } + ] + } + } + ], + "parameters": [ + { + "id": 54, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + }, + { + "id": 55, + "name": "__namedParameters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 56, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 59, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 25, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L25" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 60, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 61, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 62, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 63, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + } + }, + { + "id": 57, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 23, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L23" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 58, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 24, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L24" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 59, + 57, + 58 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 22, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L22" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 49, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "reference", + "id": 53, + "name": "Relation" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 68, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 14, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L14" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 69, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 70, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 71, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 72, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + } + }, + { + "id": 65, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 11, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L11" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 66, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 12, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L12" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 67, + "name": "signal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 13, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L13" + } + ], + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + } + }, + { + "id": 64, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 10, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L10" + } + ], + "type": { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + }, + { + "id": 105, + "name": "delete", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 299, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L299" + } + ], + "signatures": [ + { + "id": 106, + "name": "delete", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a DELETE on the table or view.\n\nBy default, deleted rows are not returned. To return it, chain the call\nwith " + }, + { + "kind": "code", + "text": "`.select()`" + }, + { + "kind": "text", + "text": " after filters." + } + ] + }, + "parameters": [ + { + "id": 107, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 108, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 109, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count deleted rows.\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 302, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L302" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 109 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 301, + "character": 5, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L301" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "intrinsic", + "name": "undefined" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 82, + "name": "insert", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 120, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L120" + } + ], + "signatures": [ + { + "id": 83, + "name": "insert", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform an INSERT into the table or view.\n\nBy default, inserted rows are not returned. To return it, chain the call\nwith " + }, + { + "kind": "code", + "text": "`.select()`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 84, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + } + ], + "parameters": [ + { + "id": 85, + "name": "values", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The values to insert. Pass an object to insert a single row\nor an array to insert multiple rows." + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 84, + "name": "Row" + }, + { + "type": "array", + "elementType": { + "type": "reference", + "id": 84, + "name": "Row" + } + } + ] + } + }, + { + "id": 86, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 87, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 88, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count inserted rows.\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 125, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L125" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 88 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 124, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L124" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "intrinsic", + "name": "undefined" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 73, + "name": "select", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 55, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L55" + } + ], + "signatures": [ + { + "id": 74, + "name": "select", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a SELECT query on the table or view." + } + ] + }, + "typeParameter": [ + { + "id": 75, + "name": "Query", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "literal", + "value": "*" + } + }, + { + "id": 76, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "reference", + "id": 75, + "name": "Query" + } + ], + "name": "GetResult" + } + } + ], + "parameters": [ + { + "id": 77, + "name": "columns", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The columns to retrieve, separated by commas" + } + ] + }, + "type": { + "type": "reference", + "id": 75, + "name": "Query" + } + }, + { + "id": 78, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 79, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 81, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count rows in the table or view.\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 65, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L65" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + }, + { + "id": 80, + "name": "head", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "When set to " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will not be returned.\nUseful if you only need the count." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 64, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L64" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 81, + 80 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 63, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L63" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "reference", + "id": 76, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 98, + "name": "update", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 250, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L250" + } + ], + "signatures": [ + { + "id": 99, + "name": "update", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform an UPDATE on the table or view.\n\nBy default, updated rows are not returned. To return it, chain the call\nwith " + }, + { + "kind": "code", + "text": "`.select()`" + }, + { + "kind": "text", + "text": " after filters." + } + ] + }, + "typeParameter": [ + { + "id": 100, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + } + ], + "parameters": [ + { + "id": 101, + "name": "values", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The values to update with" + } + ] + }, + "type": { + "type": "reference", + "id": 100, + "name": "Row" + } + }, + { + "id": 102, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 103, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 104, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count updated rows.\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 255, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L255" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 104 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 254, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L254" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "intrinsic", + "name": "undefined" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 89, + "name": "upsert", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 192, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L192" + } + ], + "signatures": [ + { + "id": 90, + "name": "upsert", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform an UPSERT on the table or view. Depending on the column(s) passed\nto " + }, + { + "kind": "code", + "text": "`onConflict`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`.upsert()`" + }, + { + "kind": "text", + "text": " allows you to perform the equivalent of\n" + }, + { + "kind": "code", + "text": "`.insert()`" + }, + { + "kind": "text", + "text": " if a row with the corresponding " + }, + { + "kind": "code", + "text": "`onConflict`" + }, + { + "kind": "text", + "text": " columns doesn't\nexist, or if it does exist, perform an alternative action depending on\n" + }, + { + "kind": "code", + "text": "`ignoreDuplicates`" + }, + { + "kind": "text", + "text": ".\n\nBy default, upserted rows are not returned. To return it, chain the call\nwith " + }, + { + "kind": "code", + "text": "`.select()`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 91, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + } + ], + "parameters": [ + { + "id": 92, + "name": "values", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The values to upsert with. Pass an object to upsert a\nsingle row or an array to upsert multiple rows." + } + ] + }, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 91, + "name": "Row" + }, + { + "type": "array", + "elementType": { + "type": "reference", + "id": 91, + "name": "Row" + } + } + ] + } + }, + { + "id": 93, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 94, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 97, + "name": "count", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Count algorithm to use to count upserted rows.\n\n" + }, + { + "kind": "code", + "text": "`\"exact\"`" + }, + { + "kind": "text", + "text": ": Exact but slow count algorithm. Performs a " + }, + { + "kind": "code", + "text": "`COUNT(*)`" + }, + { + "kind": "text", + "text": " under the\nhood.\n\n" + }, + { + "kind": "code", + "text": "`\"planned\"`" + }, + { + "kind": "text", + "text": ": Approximated but fast count algorithm. Uses the Postgres\nstatistics under the hood.\n\n" + }, + { + "kind": "code", + "text": "`\"estimated\"`" + }, + { + "kind": "text", + "text": ": Uses exact count for low numbers and planned count for high\nnumbers." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 201, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L201" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "exact" + }, + { + "type": "literal", + "value": "planned" + }, + { + "type": "literal", + "value": "estimated" + } + ] + } + }, + { + "id": 96, + "name": "ignoreDuplicates", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", duplicate rows are ignored. If\n" + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": ", duplicate rows are merged with existing rows." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 200, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L200" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 95, + "name": "onConflict", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Comma-separated UNIQUE column(s) to specify how\nduplicate rows are determined. Two rows are duplicates if all the\n" + }, + { + "kind": "code", + "text": "`onConflict`" + }, + { + "kind": "text", + "text": " columns are equal." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 199, + "character": 6, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L199" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 97, + 96, + 95 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 198, + "character": 7, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L198" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 112, + "typeArguments": [ + { + "type": "reference", + "id": 52, + "name": "Schema" + }, + { + "type": "indexedAccess", + "indexType": { + "type": "literal", + "value": "Row" + }, + "objectType": { + "type": "reference", + "id": 53, + "name": "Relation" + } + }, + { + "type": "intrinsic", + "name": "undefined" + } + ], + "name": "default" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 50 + ] + }, + { + "title": "Properties", + "children": [ + 68, + 65, + 66, + 67, + 64 + ] + }, + { + "title": "Methods", + "children": [ + 105, + 82, + 73, + 98, + 89 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestQueryBuilder.ts", + "line": 6, + "character": 21, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestQueryBuilder.ts#L6" + } + ], + "typeParameters": [ + { + "id": 110, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 111, + "name": "Relation", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "GenericTable" + }, + { + "type": "reference", + "name": "GenericView" + } + ] + } + } + ] + }, + { + "id": 401, + "name": "PostgrestTransformBuilder", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 402, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 18, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L18" + } + ], + "signatures": [ + { + "id": 403, + "name": "new PostgrestTransformBuilder", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "typeParameter": [ + { + "id": 404, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 405, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 406, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "parameters": [ + { + "id": 407, + "name": "builder", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 500, + "name": "default.constructor" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 499, + "name": "default.constructor" + } + }, + { + "id": 480, + "name": "allowEmpty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 16, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L16" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "inheritedFrom": { + "type": "reference", + "id": 515, + "name": "default.allowEmpty" + } + }, + { + "id": 472, + "name": "body", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 12, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L12" + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + }, + "inheritedFrom": { + "type": "reference", + "id": 507, + "name": "default.body" + } + }, + { + "id": 475, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 15, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L15" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 476, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "node_modules/typescript/lib/lib.dom.d.ts", + "line": 18044, + "character": 17 + } + ], + "signatures": [ + { + "id": 477, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 478, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "name": "RequestInfo", + "qualifiedName": "RequestInfo", + "package": "typescript" + }, + { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + } + ] + } + }, + { + "id": 479, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "RequestInit", + "qualifiedName": "RequestInit", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "name": "Response", + "qualifiedName": "Response", + "package": "typescript" + } + ], + "name": "Promise", + "qualifiedName": "Promise", + "package": "typescript" + } + } + ] + } + }, + "inheritedFrom": { + "type": "reference", + "id": 510, + "name": "default.fetch" + } + }, + { + "id": 470, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 10, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L10" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 505, + "name": "default.headers" + } + }, + { + "id": 468, + "name": "method", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 8, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L8" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "GET" + }, + { + "type": "literal", + "value": "HEAD" + }, + { + "type": "literal", + "value": "POST" + }, + { + "type": "literal", + "value": "PATCH" + }, + { + "type": "literal", + "value": "DELETE" + } + ] + }, + "inheritedFrom": { + "type": "reference", + "id": 503, + "name": "default.method" + } + }, + { + "id": 471, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 11, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 506, + "name": "default.schema" + } + }, + { + "id": 473, + "name": "shouldThrowOnError", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 13, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L13" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false", + "inheritedFrom": { + "type": "reference", + "id": 508, + "name": "default.shouldThrowOnError" + } + }, + { + "id": 474, + "name": "signal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 14, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L14" + } + ], + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 509, + "name": "default.signal" + } + }, + { + "id": 469, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 9, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L9" + } + ], + "type": { + "type": "reference", + "name": "URL", + "qualifiedName": "URL", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 504, + "name": "default.url" + } + }, + { + "id": 442, + "name": "abortSignal", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 130, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L130" + } + ], + "signatures": [ + { + "id": 443, + "name": "abortSignal", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set the AbortSignal for the fetch request." + } + ] + }, + "parameters": [ + { + "id": 444, + "name": "signal", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The AbortSignal to use for the fetch request" + } + ] + }, + "type": { + "type": "reference", + "name": "AbortSignal", + "qualifiedName": "AbortSignal", + "package": "typescript" + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 449, + "name": "csv", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 161, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L161" + } + ], + "signatures": [ + { + "id": 450, + "name": "csv", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a string in CSV format." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + } + ] + }, + { + "id": 453, + "name": "explain", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 195, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L195" + } + ], + "signatures": [ + { + "id": 454, + "name": "explain", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as the EXPLAIN plan for the query." + } + ] + }, + "parameters": [ + { + "id": 455, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 456, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 457, + "name": "analyze", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the query will be executed and the\nactual run time will be returned" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 203, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L203" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 460, + "name": "buffers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on buffer usage" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 206, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L206" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 462, + "name": "format", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The format of the output, can be " + }, + { + "kind": "code", + "text": "`\"text\"`" + }, + { + "kind": "text", + "text": " (default)\nor " + }, + { + "kind": "code", + "text": "`\"json\"`" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 208, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L208" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "text" + }, + { + "type": "literal", + "value": "json" + } + ] + } + }, + { + "id": 459, + "name": "settings", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on configuration\nparameters that affect query planning" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 205, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L205" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 458, + "name": "verbose", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the query identifier will be returned\nand " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will include the output columns of the query" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 204, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L204" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 461, + "name": "wal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", include information on WAL record generation" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 207, + "character": 4, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L207" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 457, + 460, + 462, + 459, + 458, + 461 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 202, + "character": 5, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L202" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ], + "name": "PostgrestResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + }, + { + "id": 451, + "name": "geojson", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 169, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L169" + } + ], + "signatures": [ + { + "id": 452, + "name": "geojson", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as an object in [GeoJSON](https://geojson.org) format." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + } + ] + }, + { + "id": 429, + "name": "limit", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ], + "signatures": [ + { + "id": 430, + "name": "limit", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Limit the query result by " + }, + { + "kind": "code", + "text": "`count`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "parameters": [ + { + "id": 431, + "name": "count", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The maximum number of rows to return" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 432, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 433, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 434, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to limit rows of foreign tables\ninstead of the current table" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 43, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 434 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 101, + "character": 41, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L101" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 447, + "name": "maybeSingle", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 152, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L152" + } + ], + "signatures": [ + { + "id": 448, + "name": "maybeSingle", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a single object instead of an array of objects.\n\nQuery result must be zero or one row (e.g. using " + }, + { + "kind": "code", + "text": "`.limit(1)`" + }, + { + "kind": "text", + "text": "), otherwise\nthis returns an error." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 535, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "PostgrestMaybeSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + } + ] + }, + { + "id": 413, + "name": "order", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 65, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L65" + }, + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 69, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L69" + }, + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 73, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L73" + } + ], + "signatures": [ + { + "id": 414, + "name": "order", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Order the query result by " + }, + { + "kind": "code", + "text": "`column`" + }, + { + "kind": "text", + "text": ".\n\nYou can call this method multiple times to order by multiple columns.\n\nYou can order foreign tables, but it doesn't affect the ordering of the\ncurrent table." + } + ] + }, + "typeParameter": [ + { + "id": 415, + "name": "ColumnName", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 416, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The column to order by" + } + ] + }, + "type": { + "type": "reference", + "id": 318, + "name": "ColumnName" + } + }, + { + "id": 417, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "type": { + "type": "reflection", + "declaration": { + "id": 418, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 419, + "name": "ascending", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", the result will be in ascending order" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 421, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to order a foreign table by foreign\ncolumns" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 59, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "undefined" + } + }, + { + "id": 420, + "name": "nullsFirst", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`null`" + }, + { + "kind": "text", + "text": "s appear first. If " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": ",\n" + }, + { + "kind": "code", + "text": "`null`" + }, + { + "kind": "text", + "text": "s appear last." + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 37, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 419, + 421, + 420 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 67, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L67" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + }, + { + "id": 422, + "name": "order", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 423, + "name": "column", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 424, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 425, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 426, + "name": "ascending", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 16, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 428, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 59, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 427, + "name": "nullsFirst", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 37, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 426, + 428, + 427 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 71, + "character": 14, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L71" + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 435, + "name": "range", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ], + "signatures": [ + { + "id": 436, + "name": "range", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Limit the query result by " + }, + { + "kind": "code", + "text": "`from`" + }, + { + "kind": "text", + "text": " and " + }, + { + "kind": "code", + "text": "`to`" + }, + { + "kind": "text", + "text": " inclusively." + } + ] + }, + "parameters": [ + { + "id": 437, + "name": "from", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The starting index from which to limit the result" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 438, + "name": "to", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The last index to which to limit the result" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 439, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Named parameters" + } + ] + }, + "originalName": "__namedParameters", + "type": { + "type": "reflection", + "declaration": { + "id": 440, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 441, + "name": "foreignTable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Set this to limit rows of foreign tables\ninstead of the current table" + } + ] + }, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 54, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 441 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 116, + "character": 52, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L116" + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 465, + "name": "returns", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 249, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L249" + } + ], + "signatures": [ + { + "id": 466, + "name": "returns", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Override the type of the returned " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 467, + "name": "NewResult", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The new result type to override with" + } + ] + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 370, + "name": "NewResult" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 463, + "name": "rollback", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 235, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L235" + } + ], + "signatures": [ + { + "id": 464, + "name": "rollback", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Rollback the query.\n\n" + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " will still be returned, but the query is not committed." + } + ] + }, + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 408, + "name": "select", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 24, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L24" + } + ], + "signatures": [ + { + "id": 409, + "name": "select", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Perform a SELECT on the query result.\n\nBy default, " + }, + { + "kind": "code", + "text": "`.insert()`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`.update()`" + }, + { + "kind": "text", + "text": ", " + }, + { + "kind": "code", + "text": "`.upsert()`" + }, + { + "kind": "text", + "text": ", and " + }, + { + "kind": "code", + "text": "`.delete()`" + }, + { + "kind": "text", + "text": " do not\nreturn modified rows. By calling this method, modified rows are returned in\n" + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": "." + } + ] + }, + "typeParameter": [ + { + "id": 410, + "name": "Query", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "default": { + "type": "literal", + "value": "*" + } + }, + { + "id": 411, + "name": "NewResult", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 313, + "name": "Query" + } + ], + "name": "GetResult" + } + } + ], + "parameters": [ + { + "id": 412, + "name": "columns", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The columns to retrieve, separated by commas" + } + ] + }, + "type": { + "type": "reference", + "id": 313, + "name": "Query" + } + } + ], + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 314, + "name": "NewResult" + } + ], + "name": "default" + } + } + ] + }, + { + "id": 445, + "name": "single", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 141, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L141" + } + ], + "signatures": [ + { + "id": 446, + "name": "single", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Return " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": " as a single object instead of an array of objects.\n\nQuery result must be one row (e.g. using " + }, + { + "kind": "code", + "text": "`.limit(1)`" + }, + { + "kind": "text", + "text": "), otherwise this\nreturns an error." + } + ] + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "PostgrestSingleResponse" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + } + ] + }, + { + "id": 483, + "name": "then", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 48, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L48" + } + ], + "signatures": [ + { + "id": 484, + "name": "then", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 485, + "name": "TResult1", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + }, + { + "id": 486, + "name": "TResult2", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "never" + } + } + ], + "parameters": [ + { + "id": 487, + "name": "onfulfilled", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 488, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 50, + "character": 9, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L50" + } + ], + "signatures": [ + { + "id": 489, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 490, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 531, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "PostgrestResponse" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + }, + { + "id": 491, + "name": "onrejected", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reflection", + "declaration": { + "id": 492, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 53, + "character": 18, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L53" + } + ], + "signatures": [ + { + "id": 493, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 494, + "name": "reason", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + } + ] + } + } + ] + } + } + ] + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reference", + "id": 388, + "name": "TResult1" + }, + { + "type": "reference", + "id": 389, + "name": "TResult2" + } + ] + } + ], + "name": "PromiseLike", + "qualifiedName": "PromiseLike", + "package": "typescript" + }, + "inheritedFrom": { + "type": "reference", + "id": 519, + "name": "default.then" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 518, + "name": "default.then" + } + }, + { + "id": 481, + "name": "throwOnError", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/PostgrestBuilder.ts", + "line": 43, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestBuilder.ts#L43" + } + ], + "signatures": [ + { + "id": 482, + "name": "throwOnError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "If there's an error with the query, throwOnError will reject the promise by\nthrowing the error instead of returning it as part of a successful response.\n\n" + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://github.com/supabase/supabase-js/issues/92", + "target": "https://github.com/supabase/supabase-js/issues/92" + } + ] + }, + "type": { + "type": "reference", + "id": 401, + "typeArguments": [ + { + "type": "reference", + "id": 404, + "name": "Schema" + }, + { + "type": "reference", + "id": 405, + "name": "Row" + }, + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + }, + "inheritedFrom": { + "type": "reference", + "id": 517, + "name": "default.throwOnError" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 516, + "name": "default.throwOnError" + } + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 402 + ] + }, + { + "title": "Properties", + "children": [ + 480, + 472, + 475, + 470, + 468, + 471, + 473, + 474, + 469 + ] + }, + { + "title": "Methods", + "children": [ + 442, + 449, + 453, + 451, + 429, + 447, + 413, + 435, + 465, + 463, + 408, + 445, + 483, + 481 + ] + } + ], + "sources": [ + { + "fileName": "src/PostgrestTransformBuilder.ts", + "line": 10, + "character": 21, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/PostgrestTransformBuilder.ts#L10" + } + ], + "typeParameters": [ + { + "id": 495, + "name": "Schema", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "GenericSchema" + } + }, + { + "id": 496, + "name": "Row", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Record", + "qualifiedName": "Record", + "package": "typescript" + } + }, + { + "id": 497, + "name": "Result", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 498, + "typeArguments": [ + { + "type": "reference", + "id": 406, + "name": "Result" + } + ], + "name": "default" + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 112, + "name": "PostgrestFilterBuilder" + } + ] + }, + { + "id": 537, + "name": "PostgrestError", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Error format\n\n" + }, + { + "kind": "inline-tag", + "tag": "@link", + "text": "https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes", + "target": "https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes" + } + ] + }, + "sources": [ + { + "fileName": "src/types.ts", + "line": 8, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L8" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 538, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 542, + "name": "code", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 12, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L12" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 540, + "name": "details", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 10, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L10" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 541, + "name": "hint", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 11, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 539, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 9, + "character": 2, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L9" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 542, + 540, + 541, + 539 + ] + } + ], + "sources": [ + { + "fileName": "src/types.ts", + "line": 8, + "character": 29, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L8" + } + ] + } + } + }, + { + "id": 535, + "name": "PostgrestMaybeSingleResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 45, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L45" + } + ], + "typeParameters": [ + { + "id": 536, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "type": { + "type": "reference", + "id": 533, + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reference", + "id": 536, + "name": "T" + }, + { + "type": "literal", + "value": null + } + ] + } + ], + "name": "PostgrestSingleResponse" + } + }, + { + "id": 531, + "name": "PostgrestResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 35, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L35" + } + ], + "typeParameters": [ + { + "id": 532, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 532, + "name": "T" + } + ], + "name": "PostgrestResponseSuccess" + }, + { + "type": "reference", + "name": "PostgrestResponseFailure" + } + ] + } + }, + { + "id": 533, + "name": "PostgrestSingleResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 42, + "character": 12, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/types.ts#L42" + } + ], + "typeParameters": [ + { + "id": 534, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 534, + "name": "T" + } + ], + "name": "PostgrestSingleResponseSuccess" + }, + { + "type": "reference", + "name": "PostgrestResponseFailure" + } + ] + } + } + ], + "groups": [ + { + "title": "Classes", + "children": [ + 498, + 1, + 112, + 49, + 401 + ] + }, + { + "title": "Type Aliases", + "children": [ + 537, + 535, + 531, + 533 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0, + "url": "https://github.com/supabase/postgrest-js/blob/84f1518/src/index.ts#L1" + } + ] + }, + { + "id": 0, + "name": "@supabase/realtime-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 500, + "name": "REALTIME_LISTEN_TYPES", + "kind": 8, + "kindString": "Enumeration", + "flags": {}, + "children": [ + { + "id": 501, + "name": "BROADCAST", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 77, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "broadcast" + }, + "defaultValue": "\"broadcast\"" + }, + { + "id": 503, + "name": "POSTGRES_CHANGES", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 79, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "postgres_changes" + }, + "defaultValue": "\"postgres_changes\"" + }, + { + "id": 502, + "name": "PRESENCE", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 78, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "presence" + }, + "defaultValue": "\"presence\"" + } + ], + "groups": [ + { + "title": "Enumeration Members", + "kind": 16, + "children": [ + 501, + 503, + 502 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 76, + "character": 12 + } + ] + }, + { + "id": 504, + "name": "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT", + "kind": 8, + "kindString": "Enumeration", + "flags": {}, + "children": [ + { + "id": 505, + "name": "ALL", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 70, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "*" + }, + "defaultValue": "\"*\"" + }, + { + "id": 508, + "name": "DELETE", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 73, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "DELETE" + }, + "defaultValue": "\"DELETE\"" + }, + { + "id": 506, + "name": "INSERT", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 71, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "INSERT" + }, + "defaultValue": "\"INSERT\"" + }, + { + "id": 507, + "name": "UPDATE", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 72, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "UPDATE" + }, + "defaultValue": "\"UPDATE\"" + } + ], + "groups": [ + { + "title": "Enumeration Members", + "kind": 16, + "children": [ + 505, + 508, + 506, + 507 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 69, + "character": 12 + } + ] + }, + { + "id": 509, + "name": "REALTIME_PRESENCE_LISTEN_EVENTS", + "kind": 8, + "kindString": "Enumeration", + "flags": {}, + "children": [ + { + "id": 511, + "name": "JOIN", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 36, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "join" + }, + "defaultValue": "\"join\"" + }, + { + "id": 512, + "name": "LEAVE", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 37, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "leave" + }, + "defaultValue": "\"leave\"" + }, + { + "id": 510, + "name": "SYNC", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 35, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "sync" + }, + "defaultValue": "\"sync\"" + } + ], + "groups": [ + { + "title": "Enumeration Members", + "kind": 16, + "children": [ + 511, + 512, + 510 + ] + } + ], + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 34, + "character": 12 + } + ] + }, + { + "id": 513, + "name": "REALTIME_SUBSCRIBE_STATES", + "kind": 8, + "kindString": "Enumeration", + "flags": {}, + "children": [ + { + "id": 517, + "name": "CHANNEL_ERROR", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 86, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "CHANNEL_ERROR" + }, + "defaultValue": "\"CHANNEL_ERROR\"" + }, + { + "id": 516, + "name": "CLOSED", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 85, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "CLOSED" + }, + "defaultValue": "\"CLOSED\"" + }, + { + "id": 514, + "name": "SUBSCRIBED", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 83, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "SUBSCRIBED" + }, + "defaultValue": "\"SUBSCRIBED\"" + }, + { + "id": 515, + "name": "TIMED_OUT", + "kind": 16, + "kindString": "Enumeration Member", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 84, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "TIMED_OUT" + }, + "defaultValue": "\"TIMED_OUT\"" + } + ], + "groups": [ + { + "title": "Enumeration Members", + "kind": 16, + "children": [ + 517, + 516, + 514, + 515 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 82, + "character": 12 + } + ] + }, + { + "id": 55, + "name": "RealtimeChannel", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A channel is the basic building block of Realtime\nand narrows the scope of data flow to subscribed clients.\nYou can think of a channel as a chatroom where participants are able to see who's online\nand send and receive messages." + }, + "children": [ + { + "id": 66, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 111, + "character": 2 + } + ], + "signatures": [ + { + "id": 67, + "name": "new RealtimeChannel", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 68, + "name": "topic", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 69, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 294, + "name": "RealtimeChannelOptions" + }, + "defaultValue": "..." + }, + { + "id": 70, + "name": "socket", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 306, + "name": "default" + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + } + ] + }, + { + "id": 71, + "name": "bindings", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 95, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 72, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 73, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 74, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reflection", + "declaration": { + "id": 75, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 81, + "name": "callback", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 99, + "character": 6 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 77, + "name": "filter", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 98, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 78, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 98, + "character": 14 + } + ], + "indexSignature": { + "id": 79, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 80, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + }, + { + "id": 82, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 100, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 76, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 97, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 81, + 77, + 82, + 76 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 96, + "character": 19 + } + ] + } + } + } + } + } + }, + "defaultValue": "{}" + }, + { + "id": 86, + "name": "joinPush", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 106, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "default" + } + }, + { + "id": 85, + "name": "joinedOnce", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 105, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + }, + { + "id": 91, + "name": "params", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true + }, + "type": { + "type": "reference", + "id": 294, + "name": "RealtimeChannelOptions" + }, + "defaultValue": "..." + }, + { + "id": 89, + "name": "presence", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 109, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "default" + } + }, + { + "id": 88, + "name": "pushBuffer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 108, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "default" + } + }, + "defaultValue": "[]" + }, + { + "id": 87, + "name": "rejoinTimer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 107, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "default" + } + }, + { + "id": 92, + "name": "socket", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true + }, + "type": { + "type": "reference", + "id": 306, + "name": "default" + } + }, + { + "id": 84, + "name": "state", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 104, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "CHANNEL_STATES" + }, + "defaultValue": "CHANNEL_STATES.closed" + }, + { + "id": 83, + "name": "timeout", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 103, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 90, + "name": "topic", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 119, + "name": "on", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 315, + "character": 2 + } + ], + "signatures": [ + { + "id": 120, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Listen to messages." + }, + "parameters": [ + { + "id": 121, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "broadcast" + } + }, + { + "id": 122, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 123, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 124, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 317, + "character": 14 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 124 + ] + } + ] + } + } + }, + { + "id": 125, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 126, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 127, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 128, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 129, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 131, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 320, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 130, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 319, + "character": 6 + } + ], + "type": { + "type": "literal", + "value": "broadcast" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 131, + 130 + ] + } + ], + "indexSignature": { + "id": 132, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 133, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 134, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 135, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "presence" + } + }, + { + "id": 136, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 137, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 138, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 326, + "character": 14 + } + ], + "type": { + "type": "literal", + "value": "sync" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 138 + ] + } + ] + } + } + }, + { + "id": 139, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 140, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 141, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 142, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 143, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "presence" + } + }, + { + "id": 144, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 145, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 146, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 331, + "character": 14 + } + ], + "type": { + "type": "literal", + "value": "join" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 146 + ] + } + ] + } + } + }, + { + "id": 147, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 148, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 149, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 150, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 483, + "name": "RealtimePresenceJoinPayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 151, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 152, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "presence" + } + }, + { + "id": 153, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 154, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 155, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 336, + "character": 14 + } + ], + "type": { + "type": "literal", + "value": "leave" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 155 + ] + } + ] + } + } + }, + { + "id": 156, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 157, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 158, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 159, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 489, + "name": "RealtimePresenceLeavePayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 160, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 164, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 161, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 162, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 163, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "parameters": [ + { + "id": 165, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "postgres_changes" + } + }, + { + "id": 166, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 442, + "typeArguments": [ + { + "type": "literal", + "value": "*" + } + ], + "name": "RealtimePostgresChangesFilter" + } + }, + { + "id": 167, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 168, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 169, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 170, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 449, + "typeArguments": [ + { + "type": "reference", + "id": 164, + "name": "T" + } + ], + "name": "RealtimePostgresChangesPayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 171, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 175, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 172, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 173, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 174, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "parameters": [ + { + "id": 176, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "postgres_changes" + } + }, + { + "id": 177, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 442, + "typeArguments": [ + { + "type": "literal", + "value": "INSERT" + } + ], + "name": "RealtimePostgresChangesFilter" + } + }, + { + "id": 178, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 179, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 180, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 181, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 454, + "typeArguments": [ + { + "type": "reference", + "id": 175, + "name": "T" + } + ], + "name": "RealtimePostgresInsertPayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 182, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 186, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 183, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 184, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 185, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "parameters": [ + { + "id": 187, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "postgres_changes" + } + }, + { + "id": 188, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 442, + "typeArguments": [ + { + "type": "literal", + "value": "UPDATE" + } + ], + "name": "RealtimePostgresChangesFilter" + } + }, + { + "id": 189, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 190, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 191, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 192, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 464, + "typeArguments": [ + { + "type": "reference", + "id": 186, + "name": "T" + } + ], + "name": "RealtimePostgresUpdatePayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 193, + "name": "on", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "typeParameter": [ + { + "id": 197, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 194, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 195, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 196, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "parameters": [ + { + "id": 198, + "name": "type", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "literal", + "value": "postgres_changes" + } + }, + { + "id": 199, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 442, + "typeArguments": [ + { + "type": "literal", + "value": "DELETE" + } + ], + "name": "RealtimePostgresChangesFilter" + } + }, + { + "id": 200, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 201, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 202, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 203, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 473, + "typeArguments": [ + { + "type": "reference", + "id": 197, + "name": "T" + } + ], + "name": "RealtimePostgresDeletePayload" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + } + ] + }, + { + "id": 101, + "name": "presenceState", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 284, + "character": 2 + } + ], + "signatures": [ + { + "id": 102, + "name": "presenceState", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "id": 495, + "name": "RealtimePresenceState" + } + } + ] + }, + { + "id": 204, + "name": "send", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 367, + "character": 2 + } + ], + "signatures": [ + { + "id": 205, + "name": "send", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 206, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 207, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 208, + "name": "type", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 368, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 208 + ] + } + ], + "indexSignature": { + "id": 209, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 210, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + }, + { + "id": 211, + "name": "opts", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 212, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 213, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 214, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 305, + "name": "RealtimeChannelSendResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 93, + "name": "subscribe", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 171, + "character": 2 + } + ], + "signatures": [ + { + "id": 94, + "name": "subscribe", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Subscribe registers your client with the server" + }, + "parameters": [ + { + "id": 95, + "name": "callback", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 96, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 97, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 98, + "name": "status", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "SUBSCRIBED" + }, + { + "type": "literal", + "value": "TIMED_OUT" + }, + { + "type": "literal", + "value": "CLOSED" + }, + { + "type": "literal", + "value": "CHANNEL_ERROR" + } + ] + } + }, + { + "id": 99, + "name": "err", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + }, + { + "id": 100, + "name": "timeout", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + } + ] + }, + { + "id": 103, + "name": "track", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 288, + "character": 8 + } + ], + "signatures": [ + { + "id": 104, + "name": "track", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 105, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 106, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 107, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 108, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + }, + { + "id": 109, + "name": "opts", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 110, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 111, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 112, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 305, + "name": "RealtimeChannelSendResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 221, + "name": "unsubscribe", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 407, + "character": 2 + } + ], + "signatures": [ + { + "id": 222, + "name": "unsubscribe", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Leaves the channel.", + "text": "Unsubscribes from server events, and instructs channel to terminate on server.\nTriggers onClose() hooks.\n\nTo receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:\nchannel.unsubscribe().receive(\"ok\", () => alert(\"left!\") )\n" + }, + "parameters": [ + { + "id": 223, + "name": "timeout", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": "error" + }, + { + "type": "literal", + "value": "ok" + }, + { + "type": "literal", + "value": "timed out" + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 113, + "name": "untrack", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 302, + "character": 8 + } + ], + "signatures": [ + { + "id": 114, + "name": "untrack", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 115, + "name": "opts", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 116, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 117, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 118, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 305, + "name": "RealtimeChannelSendResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 215, + "name": "updateJoinPayload", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 394, + "character": 2 + } + ], + "signatures": [ + { + "id": 216, + "name": "updateJoinPayload", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 217, + "name": "payload", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 218, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 219, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 220, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 66 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 71, + 86, + 85, + 91, + 89, + 88, + 87, + 92, + 84, + 83, + 90 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 119, + 101, + 204, + 93, + 103, + 221, + 113, + 215 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 94, + "character": 21 + } + ] + }, + { + "id": 306, + "name": "RealtimeClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 307, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 88, + "character": 2 + } + ], + "signatures": [ + { + "id": 308, + "name": "new RealtimeClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Initializes the Socket." + }, + "parameters": [ + { + "id": 309, + "name": "endPoint", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The string WebSocket endpoint, ie, \"ws://example.com/socket\", \"wss://example.com\", \"/socket\" (inherited host & protocol)" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 310, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 418, + "name": "RealtimeClientOptions" + } + } + ], + "type": { + "type": "reference", + "id": 306, + "name": "default" + } + } + ] + }, + { + "id": 311, + "name": "accessToken", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 41, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + }, + "defaultValue": "null" + }, + { + "id": 312, + "name": "channels", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 42, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + "defaultValue": "[]" + }, + { + "id": 333, + "name": "conn", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 57, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "qualifiedName": "WebSocket", + "package": "typescript", + "name": "WebSocket" + } + ] + }, + "defaultValue": "null" + }, + { + "id": 331, + "name": "decode", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 55, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 330, + "name": "encode", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 54, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 313, + "name": "endPoint", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 43, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "''" + }, + { + "id": 342, + "name": "eventsPerSecondLimitMs", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 71, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "100" + }, + { + "id": 314, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 44, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 315, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 316, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 317, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + }, + "defaultValue": "DEFAULT_HEADERS" + }, + { + "id": 324, + "name": "heartbeatIntervalMs", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 48, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "30000" + }, + { + "id": 325, + "name": "heartbeatTimer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 49, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "undefined" + }, + { + "type": "reference", + "qualifiedName": "global.NodeJS.Timer", + "package": "@types/node", + "name": "Timer" + } + ] + }, + "defaultValue": "undefined" + }, + { + "id": 343, + "name": "inThrottle", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 72, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + }, + { + "id": 329, + "name": "logger", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 53, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + }, + "defaultValue": "noop" + }, + { + "id": 318, + "name": "params", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 45, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 319, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 320, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 321, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + }, + "defaultValue": "{}" + }, + { + "id": 326, + "name": "pendingHeartbeatRef", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 50, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + }, + "defaultValue": "null" + }, + { + "id": 332, + "name": "reconnectAfterMs", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 56, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 328, + "name": "reconnectTimer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 52, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "default" + } + }, + { + "id": 327, + "name": "ref", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 51, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "0" + }, + { + "id": 334, + "name": "sendBuffer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 58, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + "defaultValue": "[]" + }, + { + "id": 335, + "name": "serializer", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 59, + "character": 2 + } + ], + "type": { + "type": "reference", + "name": "default" + }, + "defaultValue": "..." + }, + { + "id": 336, + "name": "stateChangeCallbacks", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 60, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 337, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 339, + "name": "close", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 62, + "character": 4 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + } + }, + { + "id": 340, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 63, + "character": 4 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + } + }, + { + "id": 341, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 64, + "character": 4 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + } + }, + { + "id": 338, + "name": "open", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 61, + "character": 4 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 339, + 340, + 341, + 338 + ] + } + ] + } + }, + "defaultValue": "..." + }, + { + "id": 322, + "name": "timeout", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 46, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "DEFAULT_TIMEOUT" + }, + { + "id": 323, + "name": "transport", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 47, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + }, + "defaultValue": "w3cwebsocket" + }, + { + "id": 366, + "name": "channel", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 218, + "character": 2 + } + ], + "signatures": [ + { + "id": 367, + "name": "channel", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 368, + "name": "topic", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 369, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 294, + "name": "RealtimeChannelOptions" + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + } + ] + }, + { + "id": 344, + "name": "connect", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 125, + "character": 2 + } + ], + "signatures": [ + { + "id": 345, + "name": "connect", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Connects the socket, unless already connected." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 362, + "name": "connectionState", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 198, + "character": 2 + } + ], + "signatures": [ + { + "id": 363, + "name": "connectionState", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns the current state of the socket." + }, + "type": { + "type": "reference", + "name": "CONNECTION_STATE" + } + } + ] + }, + { + "id": 346, + "name": "disconnect", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 147, + "character": 2 + } + ], + "signatures": [ + { + "id": 347, + "name": "disconnect", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Disconnects the socket." + }, + "parameters": [ + { + "id": 348, + "name": "code", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A numeric status code to send on disconnect." + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 349, + "name": "reason", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "A custom reason for the disconnect.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 350, + "name": "getChannels", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 162, + "character": 2 + } + ], + "signatures": [ + { + "id": 351, + "name": "getChannels", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 55, + "name": "default" + } + } + } + ] + }, + { + "id": 364, + "name": "isConnected", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 214, + "character": 2 + } + ], + "signatures": [ + { + "id": 365, + "name": "isConnected", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Returns `true` is the connection is open." + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 357, + "name": "log", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 191, + "character": 2 + } + ], + "signatures": [ + { + "id": 358, + "name": "log", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Logs the message.", + "text": "For customized logging, `this.logger` can be overridden.\n" + }, + "parameters": [ + { + "id": 359, + "name": "kind", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 360, + "name": "msg", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 361, + "name": "data", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 370, + "name": "push", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 236, + "character": 2 + } + ], + "signatures": [ + { + "id": 371, + "name": "push", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Push out a message if the socket is connected.", + "text": "If the socket is not connected, the message gets enqueued within a local buffer, and sent out when a connection is next established.\n" + }, + "parameters": [ + { + "id": 372, + "name": "data", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 435, + "name": "RealtimeMessage" + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "void" + }, + { + "type": "literal", + "value": "rate limited" + } + ] + } + } + ] + }, + { + "id": 355, + "name": "removeAllChannels", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 177, + "character": 2 + } + ], + "signatures": [ + { + "id": 356, + "name": "removeAllChannels", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "array", + "elementType": { + "type": "reference", + "id": 499, + "name": "RealtimeRemoveChannelResponse" + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 352, + "name": "removeChannel", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 166, + "character": 2 + } + ], + "signatures": [ + { + "id": 353, + "name": "removeChannel", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 354, + "name": "channel", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 499, + "name": "RealtimeRemoveChannelResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 373, + "name": "setAuth", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 263, + "character": 2 + } + ], + "signatures": [ + { + "id": 374, + "name": "setAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Sets the JWT access token used for channel subscription authorization and Realtime RLS." + }, + "parameters": [ + { + "id": 375, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A JWT string.\n" + }, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 307 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 311, + 312, + 333, + 331, + 330, + 313, + 342, + 314, + 324, + 325, + 343, + 329, + 318, + 326, + 332, + 328, + 327, + 334, + 335, + 336, + 322, + 323 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 366, + 344, + 362, + 346, + 350, + 364, + 357, + 370, + 355, + 352, + 373 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 40, + "character": 21 + } + ] + }, + { + "id": 1, + "name": "RealtimePresence", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 28, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 83, + "character": 2 + } + ], + "signatures": [ + { + "id": 29, + "name": "new RealtimePresence", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Initializes the Presence." + }, + "parameters": [ + { + "id": 30, + "name": "channel", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The RealtimeChannel" + }, + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 31, + "name": "opts", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The options,\n for example `{events: {state: 'state', diff: 'diff'}}`\n" + }, + "type": { + "type": "reference", + "qualifiedName": "PresenceOpts", + "package": "@types/phoenix", + "name": "PresenceOpts" + } + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "default" + } + } + ] + }, + { + "id": 35, + "name": "caller", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 66, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 36, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 37, + "name": "onJoin", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 67, + "character": 4 + } + ], + "type": { + "type": "reference", + "qualifiedName": "PresenceOnJoinCallback", + "package": "@types/phoenix", + "name": "PresenceOnJoinCallback" + } + }, + { + "id": 38, + "name": "onLeave", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 68, + "character": 4 + } + ], + "type": { + "type": "reference", + "qualifiedName": "PresenceOnLeaveCallback", + "package": "@types/phoenix", + "name": "PresenceOnLeaveCallback" + } + }, + { + "id": 39, + "name": "onSync", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 69, + "character": 4 + } + ], + "signatures": [ + { + "id": 40, + "name": "onSync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 37, + 38 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 39 + ] + } + ] + } + }, + "defaultValue": "..." + }, + { + "id": 41, + "name": "channel", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true + }, + "type": { + "type": "reference", + "id": 55, + "name": "default" + } + }, + { + "id": 34, + "name": "joinRef", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 65, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + }, + "defaultValue": "null" + }, + { + "id": 33, + "name": "pendingDiffs", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 64, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "RawPresenceDiff" + } + }, + "defaultValue": "[]" + }, + { + "id": 32, + "name": "state", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 63, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 495, + "name": "RealtimePresenceState" + }, + "defaultValue": "{}" + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 28 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 35, + 41, + 34, + 33, + 32 + ] + } + ], + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 62, + "character": 21 + } + ] + }, + { + "id": 294, + "name": "RealtimeChannelOptions", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 13, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 295, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 296, + "name": "config", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 14, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 297, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 298, + "name": "broadcast", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "self option enables client to receive message it broadcast\nack option instructs server to acknowledge that broadcast message was received" + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 19, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 299, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 301, + "name": "ack", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 19, + "character": 34 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 300, + "name": "self", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 19, + "character": 18 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 301, + 300 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 19, + "character": 16 + } + ] + } + } + }, + { + "id": 302, + "name": "presence", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "key option is used to track presence payload across clients" + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 23, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 303, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 304, + "name": "key", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 23, + "character": 17 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 304 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 23, + "character": 15 + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 298, + 302 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 14, + "character": 10 + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 296 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 13, + "character": 37 + } + ] + } + } + }, + { + "id": 305, + "name": "RealtimeChannelSendResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 67, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "ok" + }, + { + "type": "literal", + "value": "timed out" + }, + { + "type": "literal", + "value": "rate limited" + } + ] + } + }, + { + "id": 418, + "name": "RealtimeClientOptions", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 16, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 419, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 425, + "name": "decode", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 22, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 424, + "name": "encode", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 21, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 427, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 24, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 428, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 24, + "character": 12 + } + ], + "indexSignature": { + "id": 429, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 430, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 422, + "name": "heartbeatIntervalMs", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 19, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 423, + "name": "logger", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 20, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 431, + "name": "params", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 25, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 432, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 25, + "character": 11 + } + ], + "indexSignature": { + "id": 433, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 434, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + }, + { + "id": 426, + "name": "reconnectAfterMs", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 23, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Function", + "package": "typescript", + "name": "Function" + } + }, + { + "id": 421, + "name": "timeout", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 420, + "name": "transport", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 17, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "WebSocket", + "package": "typescript", + "name": "WebSocket" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 425, + 424, + 427, + 422, + 423, + 431, + 426, + 421, + 420 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 16, + "character": 36 + } + ] + } + } + }, + { + "id": 435, + "name": "RealtimeMessage", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 28, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 436, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 438, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 30, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 441, + "name": "join_ref", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 33, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 439, + "name": "payload", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 31, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 440, + "name": "ref", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 32, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 437, + "name": "topic", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 29, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 438, + 441, + 439, + 440, + 437 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 28, + "character": 30 + } + ] + } + } + }, + { + "id": 442, + "name": "RealtimePostgresChangesFilter", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 60, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 448, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 443, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 444, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 61, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 448, + "name": "T" + } + }, + { + "id": 447, + "name": "filter", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 64, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 445, + "name": "schema", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 62, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 446, + "name": "table", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 63, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 444, + 447, + 445, + 446 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 60, + "character": 62 + } + ] + } + } + }, + { + "id": 449, + "name": "RealtimePostgresChangesPayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 55, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 453, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 450, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 55, + "character": 53 + } + ], + "indexSignature": { + "id": 451, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 452, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "id": 454, + "typeArguments": [ + { + "type": "reference", + "id": 453, + "name": "T" + } + ], + "name": "RealtimePostgresInsertPayload" + }, + { + "type": "reference", + "id": 464, + "typeArguments": [ + { + "type": "reference", + "id": 453, + "name": "T" + } + ], + "name": "RealtimePostgresUpdatePayload" + }, + { + "type": "reference", + "id": 473, + "typeArguments": [ + { + "type": "reference", + "id": 453, + "name": "T" + } + ], + "name": "RealtimePostgresDeletePayload" + } + ] + } + }, + { + "id": 473, + "name": "RealtimePostgresDeletePayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 48, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 482, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 479, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 48, + "character": 52 + } + ], + "indexSignature": { + "id": 480, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 481, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "intersection", + "types": [ + { + "type": "reference", + "name": "RealtimePostgresChangesPayloadBase" + }, + { + "type": "reflection", + "declaration": { + "id": 474, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 475, + "name": "eventType", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 50, + "character": 4 + } + ], + "type": { + "type": "template-literal", + "head": "", + "tail": [ + [ + { + "type": "reference", + "id": 508, + "name": "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT.DELETE" + }, + "" + ] + ] + } + }, + { + "id": 476, + "name": "new", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 51, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 477, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 51, + "character": 9 + } + ] + } + } + }, + { + "id": 478, + "name": "old", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 52, + "character": 4 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 482, + "name": "T" + } + ], + "qualifiedName": "Partial", + "package": "typescript", + "name": "Partial" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 475, + 476, + 478 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 49, + "character": 39 + } + ] + } + } + ] + } + }, + { + "id": 454, + "name": "RealtimePostgresInsertPayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 34, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 463, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 460, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 34, + "character": 52 + } + ], + "indexSignature": { + "id": 461, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 462, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "intersection", + "types": [ + { + "type": "reference", + "name": "RealtimePostgresChangesPayloadBase" + }, + { + "type": "reflection", + "declaration": { + "id": 455, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 456, + "name": "eventType", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 36, + "character": 4 + } + ], + "type": { + "type": "template-literal", + "head": "", + "tail": [ + [ + { + "type": "reference", + "id": 506, + "name": "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT.INSERT" + }, + "" + ] + ] + } + }, + { + "id": 457, + "name": "new", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 37, + "character": 4 + } + ], + "type": { + "type": "reference", + "id": 463, + "name": "T" + } + }, + { + "id": 458, + "name": "old", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 38, + "character": 4 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 459, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 38, + "character": 9 + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 456, + 457, + 458 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 35, + "character": 39 + } + ] + } + } + ] + } + }, + { + "id": 464, + "name": "RealtimePostgresUpdatePayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 41, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 472, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 469, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 41, + "character": 52 + } + ], + "indexSignature": { + "id": 470, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 471, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + } + } + } + ], + "type": { + "type": "intersection", + "types": [ + { + "type": "reference", + "name": "RealtimePostgresChangesPayloadBase" + }, + { + "type": "reflection", + "declaration": { + "id": 465, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 466, + "name": "eventType", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 43, + "character": 4 + } + ], + "type": { + "type": "template-literal", + "head": "", + "tail": [ + [ + { + "type": "reference", + "id": 507, + "name": "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT.UPDATE" + }, + "" + ] + ] + } + }, + { + "id": 467, + "name": "new", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 44, + "character": 4 + } + ], + "type": { + "type": "reference", + "id": 472, + "name": "T" + } + }, + { + "id": 468, + "name": "old", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 45, + "character": 4 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 472, + "name": "T" + } + ], + "qualifiedName": "Partial", + "package": "typescript", + "name": "Partial" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 466, + 467, + 468 + ] + } + ], + "sources": [ + { + "fileName": "RealtimeChannel.ts", + "line": 42, + "character": 39 + } + ] + } + } + ] + } + }, + { + "id": 483, + "name": "RealtimePresenceJoinPayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 20, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 484, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 487, + "name": "currentPresences", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 23, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "Presence" + } + } + }, + { + "id": 485, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 21, + "character": 2 + } + ], + "type": { + "type": "template-literal", + "head": "", + "tail": [ + [ + { + "type": "reference", + "id": 511, + "name": "REALTIME_PRESENCE_LISTEN_EVENTS.JOIN" + }, + "" + ] + ] + } + }, + { + "id": 486, + "name": "key", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 22, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 488, + "name": "newPresences", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 24, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "Presence" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 487, + 485, + 486, + 488 + ] + } + ], + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 20, + "character": 42 + } + ] + } + } + }, + { + "id": 489, + "name": "RealtimePresenceLeavePayload", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 27, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 490, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 493, + "name": "currentPresences", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 30, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "Presence" + } + } + }, + { + "id": 491, + "name": "event", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 28, + "character": 2 + } + ], + "type": { + "type": "template-literal", + "head": "", + "tail": [ + [ + { + "type": "reference", + "id": 512, + "name": "REALTIME_PRESENCE_LISTEN_EVENTS.LEAVE" + }, + "" + ] + ] + } + }, + { + "id": 492, + "name": "key", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 29, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 494, + "name": "leftPresences", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 31, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "Presence" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 493, + 491, + 492, + 494 + ] + } + ], + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 27, + "character": 43 + } + ] + } + } + }, + { + "id": 495, + "name": "RealtimePresenceState", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 18, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 496, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "RealtimePresence.ts", + "line": 18, + "character": 36 + } + ], + "indexSignature": { + "id": 497, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 498, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "name": "Presence" + } + } + } + } + } + }, + { + "id": 499, + "name": "RealtimeRemoveChannelResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "RealtimeClient.ts", + "line": 36, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "ok" + }, + { + "type": "literal", + "value": "timed out" + }, + { + "type": "literal", + "value": "error" + } + ] + } + } + ], + "groups": [ + { + "title": "Enumerations", + "kind": 8, + "children": [ + 500, + 504, + 509, + 513 + ] + }, + { + "title": "Classes", + "kind": 128, + "children": [ + 55, + 306, + 1 + ] + }, + { + "title": "Type Aliases", + "kind": 4194304, + "children": [ + 294, + 305, + 418, + 435, + 442, + 449, + 473, + 454, + 464, + 483, + 489, + 495, + 499 + ] + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 0, + "name": "@supabase/storage-js", + "kind": 1, + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "index", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 390, + "name": "StorageApiError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 391, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 17, + "character": 2 + } + ], + "signatures": [ + { + "id": 392, + "name": "new StorageApiError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 393, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 394, + "name": "status", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "id": 390, + "name": "StorageApiError" + }, + "overwrites": { + "type": "reference", + "id": 387, + "name": "StorageError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 386, + "name": "StorageError.constructor" + } + }, + { + "id": 395, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 15, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 396, + "name": "toJSON", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 23, + "character": 2 + } + ], + "signatures": [ + { + "id": 397, + "name": "toJSON", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 398, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 400, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 26, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 399, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 25, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "..." + }, + { + "id": 401, + "name": "status", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 27, + "character": 6 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "..." + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 400, + 399, + 401 + ] + } + ] + } + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 391 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 395 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 396 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 14, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 385, + "name": "StorageError" + } + ] + }, + { + "id": 258, + "name": "StorageClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 259, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/StorageClient.ts", + "line": 6, + "character": 2 + } + ], + "signatures": [ + { + "id": 260, + "name": "new StorageClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 261, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 262, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 263, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 264, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 265, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + }, + "defaultValue": "{}" + }, + { + "id": 266, + "name": "fetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 267, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 268, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 269, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 270, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 258, + "name": "StorageClient" + }, + "overwrites": { + "type": "reference", + "id": 5, + "name": "default.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 4, + "name": "default.constructor" + } + }, + { + "id": 301, + "name": "createBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 79, + "character": 8 + } + ], + "signatures": [ + { + "id": 302, + "name": "createBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a new Storage bucket", + "returns": "newly created bucket id\n" + }, + "parameters": [ + { + "id": 303, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A unique identifier for the bucket you are creating." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 304, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 305, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 306, + "name": "public", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private." + }, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 81, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 306 + ] + } + ] + } + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 307, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 308, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 84, + "character": 8 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 349, + "name": "Bucket" + }, + { + "type": "literal", + "value": "name" + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 309, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 85, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 308, + 309 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 310, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 311, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 88, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 312, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 89, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 311, + 312 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 44, + "name": "default.createBucket" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 43, + "name": "default.createBucket" + } + }, + { + "id": 338, + "name": "deleteBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 185, + "character": 8 + } + ], + "signatures": [ + { + "id": 339, + "name": "deleteBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.\nYou must first `empty()` the bucket." + }, + "parameters": [ + { + "id": 340, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to delete.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 341, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 342, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 189, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 343, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 344, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 189, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 344 + ] + } + ] + } + } + }, + { + "id": 345, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 190, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 342, + 345 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 346, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 347, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 193, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 348, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 194, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 347, + 348 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 81, + "name": "default.deleteBucket" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 80, + "name": "default.deleteBucket" + } + }, + { + "id": 327, + "name": "emptyBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 150, + "character": 8 + } + ], + "signatures": [ + { + "id": 328, + "name": "emptyBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Removes all objects inside a single bucket." + }, + "parameters": [ + { + "id": 329, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to empty.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 330, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 331, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 154, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 332, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 333, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 154, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 333 + ] + } + ] + } + } + }, + { + "id": 334, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 155, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 331, + 334 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 335, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 336, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 158, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 337, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 159, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 336, + 337 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 70, + "name": "default.emptyBucket" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 69, + "name": "default.emptyBucket" + } + }, + { + "id": 271, + "name": "from", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/StorageClient.ts", + "line": 15, + "character": 2 + } + ], + "signatures": [ + { + "id": 272, + "name": "from", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Perform file operation in a bucket." + }, + "parameters": [ + { + "id": 273, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The bucket id to operate on.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 92, + "name": "default" + } + } + ] + }, + { + "id": 292, + "name": "getBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 48, + "character": 8 + } + ], + "signatures": [ + { + "id": 293, + "name": "getBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Retrieves the details of an existing Storage bucket." + }, + "parameters": [ + { + "id": 294, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to retrieve.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 295, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 296, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 52, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 349, + "name": "Bucket" + } + }, + { + "id": 297, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 53, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 296, + 297 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 298, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 299, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 56, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 300, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 57, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 299, + 300 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 35, + "name": "default.getBucket" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 34, + "name": "default.getBucket" + } + }, + { + "id": 284, + "name": "listBuckets", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 21, + "character": 8 + } + ], + "signatures": [ + { + "id": 285, + "name": "listBuckets", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Retrieves the details of all Storage buckets within an existing project." + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 286, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 287, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 23, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 349, + "name": "Bucket" + } + } + }, + { + "id": 288, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 24, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 287, + 288 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 289, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 290, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 27, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 291, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 28, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 290, + 291 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 27, + "name": "default.listBuckets" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 26, + "name": "default.listBuckets" + } + }, + { + "id": 313, + "name": "updateBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 115, + "character": 8 + } + ], + "signatures": [ + { + "id": 314, + "name": "updateBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates a Storage bucket" + }, + "parameters": [ + { + "id": 315, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A unique identifier for the bucket you are updating." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 316, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 317, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 318, + "name": "public", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.\n" + }, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 117, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 318 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 319, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 320, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 120, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 321, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 322, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 120, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 322 + ] + } + ] + } + } + }, + { + "id": 323, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 121, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 320, + 323 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 324, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 325, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 124, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 326, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 125, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 325, + 326 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + }, + "inheritedFrom": { + "type": "reference", + "id": 56, + "name": "default.updateBucket" + } + } + ], + "inheritedFrom": { + "type": "reference", + "id": 55, + "name": "default.updateBucket" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 259 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 301, + 338, + 327, + 271, + 292, + 284, + 313 + ] + } + ], + "sources": [ + { + "fileName": "src/StorageClient.ts", + "line": 5, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 3, + "name": "default" + } + ] + }, + { + "id": 385, + "name": "StorageError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 386, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 4, + "character": 2 + } + ], + "signatures": [ + { + "id": 387, + "name": "new StorageError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 388, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + }, + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 386 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 1, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 390, + "name": "StorageApiError" + }, + { + "type": "reference", + "id": 403, + "name": "StorageUnknownError" + } + ] + }, + { + "id": 403, + "name": "StorageUnknownError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 404, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 35, + "character": 2 + } + ], + "signatures": [ + { + "id": 405, + "name": "new StorageUnknownError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 406, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 407, + "name": "originalError", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reference", + "id": 403, + "name": "StorageUnknownError" + }, + "overwrites": { + "type": "reference", + "id": 387, + "name": "StorageError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 386, + "name": "StorageError.constructor" + } + }, + { + "id": 408, + "name": "originalError", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 33, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 404 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 408 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 32, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 385, + "name": "StorageError" + } + ] + }, + { + "id": 349, + "name": "Bucket", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 353, + "name": "created_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 5, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 350, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 2, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 351, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 3, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 352, + "name": "owner", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 4, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 355, + "name": "public", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 7, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 354, + "name": "updated_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 6, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 353, + 350, + 351, + 352, + 355, + 354 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 1, + "character": 17 + } + ] + }, + { + "id": 378, + "name": "FetchParameters", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 379, + "name": "signal", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "Pass in an AbortController's signal to cancel the request." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 68, + "character": 2 + } + ], + "type": { + "type": "reference", + "qualifiedName": "AbortSignal", + "package": "typescript", + "name": "AbortSignal" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 379 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 64, + "character": 17 + } + ] + }, + { + "id": 356, + "name": "FileObject", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 358, + "name": "bucket_id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 12, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 365, + "name": "buckets", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 19, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 349, + "name": "Bucket" + } + }, + { + "id": 362, + "name": "created_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 16, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 360, + "name": "id", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 14, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 363, + "name": "last_accessed_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 17, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 364, + "name": "metadata", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 357, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 11, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 359, + "name": "owner", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 13, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 361, + "name": "updated_at", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 15, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 358, + 365, + 362, + 360, + 363, + 364, + 357, + 359, + 361 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 10, + "character": 17 + } + ] + }, + { + "id": 369, + "name": "FileOptions", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 370, + "name": "cacheControl", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The number of seconds the asset is cached in the browser and in the Supabase CDN. This is set in the `Cache-Control: max-age=` header. Defaults to 3600 seconds." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 31, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 371, + "name": "contentType", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "the `Content-Type` header value. Should be specified if using a `fileBody` that is neither `Blob` nor `File` nor `FormData`, otherwise will default to `text/plain;charset=UTF-8`." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 35, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 372, + "name": "upsert", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "When upsert is set to true, the file is overwritten if it exists. When set to false, an error is thrown if the object already exists. Defaults to false." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 39, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 370, + 371, + 372 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 27, + "character": 17 + } + ] + }, + { + "id": 380, + "name": "Metadata", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 381, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 73, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 381 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 72, + "character": 17 + } + ] + }, + { + "id": 373, + "name": "SearchOptions", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 374, + "name": "limit", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": " The number of files you want to be returned." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 46, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 375, + "name": "offset", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The starting position." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 51, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 377, + "name": "search", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The search string to filter files by." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 61, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 376, + "name": "sortBy", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The column to sort by. Can be any column inside a FileObject." + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 56, + "character": 2 + } + ], + "type": { + "type": "reference", + "id": 366, + "name": "SortBy" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 374, + 375, + 377, + 376 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 42, + "character": 17 + } + ] + }, + { + "id": 366, + "name": "SortBy", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 367, + "name": "column", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 23, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 368, + "name": "order", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 24, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 367, + 368 + ] + } + ], + "sources": [ + { + "fileName": "src/lib/types.ts", + "line": 22, + "character": 17 + } + ] + }, + { + "id": 382, + "name": "isStorageError", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "src/lib/errors.ts", + "line": 10, + "character": 16 + } + ], + "signatures": [ + { + "id": 383, + "name": "isStorageError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 384, + "name": "error", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "error", + "asserts": false, + "targetType": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 390, + 258, + 385, + 403 + ] + }, + { + "title": "Interfaces", + "kind": 256, + "children": [ + 349, + 378, + 356, + 369, + 380, + 373, + 366 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 382 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 2, + "name": "packages/StorageBucketApi", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 3, + "name": "default", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 4, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 12, + "character": 2 + } + ], + "signatures": [ + { + "id": 5, + "name": "new default", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 6, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 7, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 8, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 9, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 10, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + }, + "defaultValue": "{}" + }, + { + "id": 11, + "name": "fetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 12, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 13, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 14, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 15, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 3, + "name": "default" + } + } + ] + }, + { + "id": 43, + "name": "createBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 79, + "character": 8 + } + ], + "signatures": [ + { + "id": 44, + "name": "createBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a new Storage bucket", + "returns": "newly created bucket id\n" + }, + "parameters": [ + { + "id": 45, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A unique identifier for the bucket you are creating." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 46, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 47, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 48, + "name": "public", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private." + }, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 81, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 48 + ] + } + ] + } + }, + "defaultValue": "..." + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 49, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 50, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 84, + "character": 8 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 349, + "name": "Bucket" + }, + { + "type": "literal", + "value": "name" + } + ], + "qualifiedName": "Pick", + "package": "typescript", + "name": "Pick" + } + }, + { + "id": 51, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 85, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 50, + 51 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 52, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 53, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 88, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 54, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 89, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 53, + 54 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 80, + "name": "deleteBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 185, + "character": 8 + } + ], + "signatures": [ + { + "id": 81, + "name": "deleteBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.\nYou must first `empty()` the bucket." + }, + "parameters": [ + { + "id": 82, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to delete.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 83, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 84, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 189, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 85, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 86, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 189, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 86 + ] + } + ] + } + } + }, + { + "id": 87, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 190, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 84, + 87 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 88, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 89, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 193, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 90, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 194, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 89, + 90 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 69, + "name": "emptyBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 150, + "character": 8 + } + ], + "signatures": [ + { + "id": 70, + "name": "emptyBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Removes all objects inside a single bucket." + }, + "parameters": [ + { + "id": 71, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to empty.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 72, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 73, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 154, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 74, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 75, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 154, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 75 + ] + } + ] + } + } + }, + { + "id": 76, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 155, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 73, + 76 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 77, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 78, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 158, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 79, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 159, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 78, + 79 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 34, + "name": "getBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 48, + "character": 8 + } + ], + "signatures": [ + { + "id": 35, + "name": "getBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Retrieves the details of an existing Storage bucket." + }, + "parameters": [ + { + "id": 36, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The unique identifier of the bucket you would like to retrieve.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 37, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 38, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 52, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 349, + "name": "Bucket" + } + }, + { + "id": 39, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 53, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 38, + 39 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 40, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 41, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 56, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 42, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 57, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 41, + 42 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 26, + "name": "listBuckets", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 21, + "character": 8 + } + ], + "signatures": [ + { + "id": 27, + "name": "listBuckets", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Retrieves the details of all Storage buckets within an existing project." + }, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 28, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 29, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 23, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 349, + "name": "Bucket" + } + } + }, + { + "id": 30, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 24, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 29, + 30 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 31, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 32, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 27, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 33, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 28, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 32, + 33 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 55, + "name": "updateBucket", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 115, + "character": 8 + } + ], + "signatures": [ + { + "id": 56, + "name": "updateBucket", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates a Storage bucket" + }, + "parameters": [ + { + "id": 57, + "name": "id", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "A unique identifier for the bucket you are updating." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 58, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 59, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 60, + "name": "public", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.\n" + }, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 117, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 60 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 61, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 62, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 120, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 63, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 64, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 120, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 64 + ] + } + ] + } + } + }, + { + "id": 65, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 121, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 62, + 65 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 66, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 67, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 124, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 68, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 125, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 67, + 68 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 4 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 43, + 80, + 69, + 34, + 26, + 55 + ] + } + ], + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 7, + "character": 21 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 258, + "name": "StorageClient" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 3 + ] + } + ], + "sources": [ + { + "fileName": "src/packages/StorageBucketApi.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 91, + "name": "packages/StorageFileApi", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 92, + "name": "default", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 93, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 27, + "character": 2 + } + ], + "signatures": [ + { + "id": 94, + "name": "new default", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 95, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 96, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 97, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 98, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 99, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + }, + "defaultValue": "{}" + }, + { + "id": 100, + "name": "bucketId", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 101, + "name": "fetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 102, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 103, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 104, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 105, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 92, + "name": "default" + } + } + ] + }, + { + "id": 169, + "name": "copy", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 226, + "character": 8 + } + ], + "signatures": [ + { + "id": 170, + "name": "copy", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Copies an existing file to a new path in the same bucket." + }, + "parameters": [ + { + "id": 171, + "name": "fromPath", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The original file path, including the current file name. For example `folder/image.png`." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 172, + "name": "toPath", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The new file path, including the new file name. For example `folder/image-copy.png`.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 173, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 174, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 231, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 175, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 176, + "name": "path", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 231, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 176 + ] + } + ] + } + } + }, + { + "id": 177, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 232, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 174, + 177 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 178, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 179, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 235, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 180, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 236, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 179, + 180 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 181, + "name": "createSignedUrl", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 263, + "character": 8 + } + ], + "signatures": [ + { + "id": 182, + "name": "createSignedUrl", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates a signed URL. Use a signed URL to share a file for a fixed amount of time." + }, + "parameters": [ + { + "id": 183, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The file path, including the current file name. For example `folder/image.png`." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 184, + "name": "expiresIn", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute." + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 185, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 186, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 187, + "name": "download", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.\n" + }, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 266, + "character": 16 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 187 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 188, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 189, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 269, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 190, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 191, + "name": "signedUrl", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 269, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 191 + ] + } + ] + } + } + }, + { + "id": 192, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 270, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 189, + 192 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 193, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 194, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 273, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 195, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 274, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 194, + 195 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 196, + "name": "createSignedUrls", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 307, + "character": 8 + } + ], + "signatures": [ + { + "id": 197, + "name": "createSignedUrls", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Creates multiple signed URLs. Use a signed URL to share a file for a fixed amount of time." + }, + "parameters": [ + { + "id": 198, + "name": "paths", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The file paths to be downloaded, including the current file names. For example `['folder/image.png', 'folder2/image2.png']`." + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + { + "id": 199, + "name": "expiresIn", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The number of seconds until the signed URLs expire. For example, `60` for URLs which are valid for one minute." + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 200, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 201, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 202, + "name": "download", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.\n" + }, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 310, + "character": 16 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 202 + ] + } + ] + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 203, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 204, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 313, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reflection", + "declaration": { + "id": 205, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 206, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 313, + "character": 16 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 207, + "name": "path", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 313, + "character": 38 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 208, + "name": "signedUrl", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 313, + "character": 59 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 206, + 207, + 208 + ] + } + ] + } + } + } + }, + { + "id": 209, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 314, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 204, + 209 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 210, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 211, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 317, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 212, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 318, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 211, + 212 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 213, + "name": "download", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 355, + "character": 8 + } + ], + "signatures": [ + { + "id": 214, + "name": "download", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Downloads a file." + }, + "parameters": [ + { + "id": 215, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The full path and file name of the file to be downloaded. For example `folder/image.png`.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 216, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 217, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 359, + "character": 8 + } + ], + "type": { + "type": "reference", + "qualifiedName": "Blob", + "package": "typescript", + "name": "Blob" + } + }, + { + "id": 218, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 360, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 217, + 218 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 219, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 220, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 363, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 221, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 364, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 220, + 221 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 222, + "name": "getPublicUrl", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 391, + "character": 2 + } + ], + "signatures": [ + { + "id": 223, + "name": "getPublicUrl", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Retrieves the URL for an asset in a public bucket.\nThis function does not verify if the bucket is public. If a public URL is created for a bucket which is not public, you will not be able to download the asset." + }, + "parameters": [ + { + "id": 224, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The path and name of the file to generate the public URL for. For example `folder/image.png`." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 225, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 226, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 227, + "name": "download", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "comment": { + "shortText": "triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.\n" + }, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 393, + "character": 16 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 227 + ] + } + ] + } + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 228, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 229, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 394, + "character": 7 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 230, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 231, + "name": "publicUrl", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 394, + "character": 15 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 231 + ] + } + ] + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 229 + ] + } + ] + } + } + } + ] + }, + { + "id": 241, + "name": "list", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 506, + "character": 8 + } + ], + "signatures": [ + { + "id": 242, + "name": "list", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Lists all the files within a bucket." + }, + "parameters": [ + { + "id": 243, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "The folder path.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 244, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 373, + "name": "SearchOptions" + } + }, + { + "id": 245, + "name": "parameters", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 378, + "name": "FetchParameters" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 246, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 247, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 512, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 356, + "name": "FileObject" + } + } + }, + { + "id": 248, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 513, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 247, + 248 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 249, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 250, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 516, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 251, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 517, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 250, + 251 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 157, + "name": "move", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 190, + "character": 8 + } + ], + "signatures": [ + { + "id": 158, + "name": "move", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Moves an existing file to a new path in the same bucket." + }, + "parameters": [ + { + "id": 159, + "name": "fromPath", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The original file path, including the current file name. For example `folder/image.png`." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 160, + "name": "toPath", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The new file path, including the new file name. For example `folder/image-new.png`.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 161, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 162, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 195, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 163, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 164, + "name": "message", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 195, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 164 + ] + } + ] + } + } + }, + { + "id": 165, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 196, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 162, + 165 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 166, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 167, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 199, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 168, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 200, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 167, + 168 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 232, + "name": "remove", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 410, + "character": 8 + } + ], + "signatures": [ + { + "id": 233, + "name": "remove", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Deletes files within the same bucket" + }, + "parameters": [ + { + "id": 234, + "name": "paths", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "An array of files to delete, including the path and file name. For example [`'folder/image.png'`].\n" + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 235, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 236, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 414, + "character": 8 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "id": 356, + "name": "FileObject" + } + } + }, + { + "id": 237, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 415, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 236, + 237 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 238, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 239, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 418, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 240, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 419, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 239, + 240 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 144, + "name": "update", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 157, + "character": 8 + } + ], + "signatures": [ + { + "id": 145, + "name": "update", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Replaces an existing file at the specified path with a new one." + }, + "parameters": [ + { + "id": 146, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to update." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 147, + "name": "fileBody", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The body of the file to be stored in the bucket.\n" + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "qualifiedName": "ArrayBuffer", + "package": "typescript", + "name": "ArrayBuffer" + }, + { + "type": "reference", + "qualifiedName": "ArrayBufferView", + "package": "typescript", + "name": "ArrayBufferView" + }, + { + "type": "reference", + "qualifiedName": "Blob", + "package": "typescript", + "name": "Blob" + }, + { + "type": "reference", + "qualifiedName": "Buffer", + "package": "@types/node", + "name": "Buffer" + }, + { + "type": "reference", + "qualifiedName": "File", + "package": "typescript", + "name": "File" + }, + { + "type": "reference", + "qualifiedName": "FormData", + "package": "typescript", + "name": "FormData" + }, + { + "type": "reference", + "qualifiedName": "NodeJS.ReadableStream", + "package": "@types/node", + "name": "ReadableStream" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Uint8Array", + "package": "typescript", + "name": "Uint8Array" + } + ], + "qualifiedName": "ReadableStream", + "package": "typescript", + "name": "ReadableStream" + }, + { + "type": "reference", + "qualifiedName": "URLSearchParams", + "package": "typescript", + "name": "URLSearchParams" + } + ] + } + }, + { + "id": 148, + "name": "fileOptions", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 369, + "name": "FileOptions" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 149, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 150, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 173, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 151, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 152, + "name": "path", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 173, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 152 + ] + } + ] + } + } + }, + { + "id": 153, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 174, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 150, + 153 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 154, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 155, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 177, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 156, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 178, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 155, + 156 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 131, + "name": "upload", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 124, + "character": 8 + } + ], + "signatures": [ + { + "id": 132, + "name": "upload", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Uploads a file to an existing bucket." + }, + "parameters": [ + { + "id": 133, + "name": "path", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 134, + "name": "fileBody", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "The body of the file to be stored in the bucket.\n" + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "qualifiedName": "ArrayBuffer", + "package": "typescript", + "name": "ArrayBuffer" + }, + { + "type": "reference", + "qualifiedName": "ArrayBufferView", + "package": "typescript", + "name": "ArrayBufferView" + }, + { + "type": "reference", + "qualifiedName": "Blob", + "package": "typescript", + "name": "Blob" + }, + { + "type": "reference", + "qualifiedName": "Buffer", + "package": "@types/node", + "name": "Buffer" + }, + { + "type": "reference", + "qualifiedName": "File", + "package": "typescript", + "name": "File" + }, + { + "type": "reference", + "qualifiedName": "FormData", + "package": "typescript", + "name": "FormData" + }, + { + "type": "reference", + "qualifiedName": "NodeJS.ReadableStream", + "package": "@types/node", + "name": "ReadableStream" + }, + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Uint8Array", + "package": "typescript", + "name": "Uint8Array" + } + ], + "qualifiedName": "ReadableStream", + "package": "typescript", + "name": "ReadableStream" + }, + { + "type": "reference", + "qualifiedName": "URLSearchParams", + "package": "typescript", + "name": "URLSearchParams" + } + ] + } + }, + { + "id": 135, + "name": "fileOptions", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "id": 369, + "name": "FileOptions" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "reflection", + "declaration": { + "id": 136, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 137, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 140, + "character": 8 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 138, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 139, + "name": "path", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 140, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 139 + ] + } + ] + } + } + }, + { + "id": 140, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 141, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 137, + 140 + ] + } + ] + } + }, + { + "type": "reflection", + "declaration": { + "id": 141, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 142, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 144, + "character": 8 + } + ], + "type": { + "type": "literal", + "value": null + } + }, + { + "id": 143, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 145, + "character": 8 + } + ], + "type": { + "type": "reference", + "id": 385, + "name": "StorageError" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 142, + 143 + ] + } + ] + } + } + ] + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 93 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 169, + 181, + 196, + 213, + 222, + 241, + 157, + 232, + 144, + 131 + ] + } + ], + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 21, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 92 + ] + } + ], + "sources": [ + { + "fileName": "src/packages/StorageFileApi.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "Modules", + "kind": 2, + "children": [ + 1, + 2, + 91 + ] + } + ] + }, + { + "id": 0, + "name": "@supabase/functions-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "FunctionsClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 2, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 16, + "character": 2 + } + ], + "signatures": [ + { + "id": 3, + "name": "new FunctionsClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 4, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "__namedParameters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 6, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 8, + "name": "customFetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 23, + "character": 6 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 9, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 10, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 11, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + }, + { + "type": "reference", + "qualifiedName": "URL", + "package": "typescript", + "name": "URL" + } + ] + } + }, + { + "id": 12, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + }, + { + "id": 7, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 22, + "character": 6 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 8, + 7 + ] + } + ] + } + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "FunctionsClient" + } + } + ] + }, + { + "id": 15, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 14, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 16, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 17, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 18, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + }, + { + "type": "reference", + "qualifiedName": "URL", + "package": "typescript", + "name": "URL" + } + ] + } + }, + { + "id": 19, + "name": "init", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "qualifiedName": "RequestInit", + "package": "typescript", + "name": "RequestInit" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "qualifiedName": "Response", + "package": "typescript", + "name": "Response" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + } + } + }, + { + "id": 14, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 13, + "character": 12 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "qualifiedName": "Record", + "package": "typescript", + "name": "Record" + } + }, + { + "id": 13, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 12, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 23, + "name": "invoke", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 43, + "character": 8 + } + ], + "signatures": [ + { + "id": 24, + "name": "invoke", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Invokes a function" + }, + "typeParameter": [ + { + "id": 25, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "default": { + "type": "intrinsic", + "name": "any" + } + } + ], + "parameters": [ + { + "id": 26, + "name": "functionName", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "the name of the function to invoke\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 27, + "name": "invokeOptions", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "FunctionInvokeOptions" + }, + "defaultValue": "{}" + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 50, + "typeArguments": [ + { + "type": "reference", + "id": 25, + "name": "T" + } + ], + "name": "FunctionsResponse" + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 20, + "name": "setAuth", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 35, + "character": 2 + } + ], + "signatures": [ + { + "id": 21, + "name": "setAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates the authorization header" + }, + "parameters": [ + { + "id": 22, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "the new jwt token sent in the authorisation header\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 2 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 15, + 14, + 13 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 23, + 20 + ] + } + ], + "sources": [ + { + "fileName": "src/FunctionsClient.ts", + "line": 11, + "character": 13 + } + ] + }, + { + "id": 28, + "name": "FunctionsError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 29, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 19, + "character": 2 + } + ], + "signatures": [ + { + "id": 30, + "name": "new FunctionsError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 31, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 32, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "'FunctionsError'" + }, + { + "id": 33, + "name": "context", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "id": 28, + "name": "FunctionsError" + }, + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "name": "Error.constructor" + } + }, + { + "id": 34, + "name": "context", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 29 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 34 + ] + } + ], + "sources": [ + { + "fileName": "src/types.ts", + "line": 17, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 35, + "name": "FunctionsFetchError" + }, + { + "type": "reference", + "id": 40, + "name": "FunctionsHttpError" + }, + { + "type": "reference", + "id": 45, + "name": "FunctionsRelayError" + } + ] + }, + { + "id": 35, + "name": "FunctionsFetchError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 36, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 27, + "character": 2 + } + ], + "signatures": [ + { + "id": 37, + "name": "new FunctionsFetchError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 38, + "name": "context", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "id": 35, + "name": "FunctionsFetchError" + }, + "overwrites": { + "type": "reference", + "id": 30, + "name": "FunctionsError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 29, + "name": "FunctionsError.constructor" + } + }, + { + "id": 39, + "name": "context", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + }, + "inheritedFrom": { + "type": "reference", + "id": 34, + "name": "FunctionsError.context" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 36 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 39 + ] + } + ], + "sources": [ + { + "fileName": "src/types.ts", + "line": 26, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 28, + "name": "FunctionsError" + } + ] + }, + { + "id": 40, + "name": "FunctionsHttpError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 41, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 39, + "character": 2 + } + ], + "signatures": [ + { + "id": 42, + "name": "new FunctionsHttpError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 43, + "name": "context", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "id": 40, + "name": "FunctionsHttpError" + }, + "overwrites": { + "type": "reference", + "id": 30, + "name": "FunctionsError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 29, + "name": "FunctionsError.constructor" + } + }, + { + "id": 44, + "name": "context", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + }, + "inheritedFrom": { + "type": "reference", + "id": 34, + "name": "FunctionsError.context" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 41 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 44 + ] + } + ], + "sources": [ + { + "fileName": "src/types.ts", + "line": 38, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 28, + "name": "FunctionsError" + } + ] + }, + { + "id": 45, + "name": "FunctionsRelayError", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 46, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 33, + "character": 2 + } + ], + "signatures": [ + { + "id": 47, + "name": "new FunctionsRelayError", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 48, + "name": "context", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "id": 45, + "name": "FunctionsRelayError" + }, + "overwrites": { + "type": "reference", + "id": 30, + "name": "FunctionsError.constructor" + } + } + ], + "overwrites": { + "type": "reference", + "id": 29, + "name": "FunctionsError.constructor" + } + }, + { + "id": 49, + "name": "context", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 18, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + }, + "inheritedFrom": { + "type": "reference", + "id": 34, + "name": "FunctionsError.context" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 46 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 49 + ] + } + ], + "sources": [ + { + "fileName": "src/types.ts", + "line": 32, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 28, + "name": "FunctionsError" + } + ] + }, + { + "id": 50, + "name": "FunctionsResponse", + "kind": 4194304, + "kindString": "Type alias", + "flags": {}, + "sources": [ + { + "fileName": "src/types.ts", + "line": 15, + "character": 12 + } + ], + "typeParameter": [ + { + "id": 51, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "typeArguments": [ + { + "type": "reference", + "id": 51, + "name": "T" + } + ], + "name": "FunctionsResponseSuccess" + }, + { + "type": "reference", + "name": "FunctionsResponseFailure" + } + ] + } + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 1, + 28, + 35, + 40, + 45 + ] + }, + { + "title": "Type Aliases", + "kind": 4194304, + "children": [ + 50 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] + } + ] +} diff --git a/spec/examples/examples.yml b/spec/examples/examples.yml new file mode 100644 index 00000000000..71dc1646a71 --- /dev/null +++ b/spec/examples/examples.yml @@ -0,0 +1,5501 @@ +openref: 0.1 + +info: + id: reference/supabase-js + title: Supabase Client + description: | + + Supabase JavaScript. + + definition: ../../spec/enrichments/tsdoc_v2/combined.json + specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2.yml + slugPrefix: '/' + libraries: + - id: 'JavaScript' + version: '0.0.1' + +functions: + - id: initializing + $ref: '@supabase/supabase-js.index.SupabaseClient.constructor' + description: | + You can initialize a new Supabase client using the `createClient()` method. + + The Supabase client is your entrypoint to the rest of the Supabase functionality + and is the easiest way to interact with everything we offer within the Supabase ecosystem. + + examples: + - id: create-client + name: createClient() + js: | + ```js + 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') + ``` + response: | + { + "hello":"world" + } + - id: with-additional-parameters + name: With additional parameters + js: | + ```js + import { createClient } from '@supabase/supabase-js' + + const options = { + db: { + schema: 'public', + }, + auth: { + autoRefreshToken: true, + persistSession: true, + detectSessionInUrl: true + }, + global: { + headers: { 'x-my-custom-header': 'my-app-name' }, + }, + } + const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", options) + ``` + response: | + { + "hello":"jonny" + } + - id: api-schemas + name: API schemas + js: | + ```js + import { createClient } from '@supabase/supabase-js' + + // Provide a custom schema. Defaults to "public". + const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', { + db: { schema: 'other_schema' } + }) + ``` + + By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard. + Go to `Settings > API > Schema` and add the schema which you want to expose to the API. + + Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema. + - id: custom-fetch-implementation + name: Custom `fetch` implementation + js: | + ```js + import { createClient } from '@supabase/supabase-js' + + const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', { + global: { fetch: fetch.bind(globalThis) } + }) + ``` + + `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, + but an alternative `fetch` implementation can be provided as an option. + This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers). + - id: react-native-options + name: React Native options + js: | + ```js + import { createClient } from '@supabase/supabase-js' + import AsyncStorage from "@react-native-async-storage/async-storage"; + + const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", { + auth: { + storage: AsyncStorage, + autoRefreshToken: true, + persistSession: true, + detectSessionInUrl: false, + }, + }); + ``` + + For React Native we recommend using `AsyncStorage` as the storage implementation for Supabase Auth. + - id: auth.signUp() + title: 'signUp()' + $ref: '@supabase/gotrue-js.GoTrueClient.signUp' + notes: | + - By default, the user needs to verify their email address before logging in. To turn this off, disable **Confirm email** in [your project](https://app.supabase.com/project/_/auth/settings). + - **Confirm email** determines if users need to confirm their email address after signing up. + - If **Confirm email** is enabled, a `user` is returned but `session` is null. + - If **Confirm email** is disabled, both a `user` and a `session` are returned. + - When the user confirms their email address, they are redirected to the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url) by default. You can modify your `SITE_URL` or add additional redirect URLs in [your project](https://app.supabase.com/project/_/auth/settings). + - If signUp() is called for an existing confirmed user: + - If **Confirm email** is enabled in [your project](https://app.supabase.com/project/_/auth/settings), an obfuscated/fake user object is returned. + - If **Confirm email** is disabled, the error message, `User already registered` is returned. + - To fetch the currently logged-in user, refer to [`getUser()`](/docs/reference/javascript/auth-getuser). + examples: + - id: sign-up. + name: Sign up. + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.signUp({ + email: 'example@email.com', + password: 'example-password', + }) + ``` + - id: sign-up-with-additional-user-metadata. + name: Sign up with additional user metadata. + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.signUp( + { + email: 'example@email.com', + password: 'example-password', + options: { + data: { + first_name: 'John', + age: 27, + } + } + } + ) + ``` + - id: auth.signInWithPassword() + title: 'signInWithPassword()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithPassword' + notes: | + - Requires either an email and password or a phone number and password. + examples: + - id: sign-in-with-email-and-password + name: Sign in with email and password + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.signInWithPassword({ + email: 'example@email.com', + password: 'example-password', + }) + ``` + - id: sign-in-with-phone-and-password + name: Sign in with phone and password + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.signInWithPassword({ + phone: '+13334445555', + password: 'some-password', + }) + + // After receiving a SMS with a OTP. + const { data, error } = await supabase.auth.verifyOtp({ + phone: '+13334445555', + token: '123456', + }) + ``` + - id: auth.signInWithOtp() + title: 'signInWithOtp()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithOtp' + notes: | + - Requires either an email or phone number. + - This method is used for passwordless sign-ins where a OTP is sent to the user's email or phone number. + - If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP. + - If you're using phone, you can configure whether you want the user to receive a OTP. + - The magic link's destination URL is determined by the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url). You can modify the `SITE_URL` or add additional redirect urls in [your project](https://app.supabase.com/project/_/auth/settings). + examples: + - id: sign-in-with-email. + name: Sign in with email. + isSpotlight: true + description: The user will be sent an email which contains either a magiclink or a OTP or both. By default, a given user can only request a OTP once every 60 seconds. + js: | + ```js + const { data, error } = await supabase.auth.signInWithOtp({ + email: 'example@email.com', + }) + ``` + - id: sign-in-with-sms-otp. + name: Sign in with SMS OTP. + isSpotlight: false + description: The user will be sent a SMS which contains a OTP. By default, a given user can only request a OTP once every 60 seconds. + js: | + ```js + const { data, error } = await supabase.auth.signInWithOtp({ + phone: '+13334445555', + }) + ``` + - id: auth.signInWithOAuth() + title: 'signInWithOAuth()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithOAuth' + notes: | + - This method is used for signing in using a third-party provider. + - Supabase supports many different [third-party providers](https://supabase.com/docs/guides/auth#providers). + examples: + - id: sign-in-using-a-third-party-provider + name: Sign in using a third-party provider + + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + }) + ``` + - id: sign-in-using-a-third-party-provider-with-redirect + name: Sign in using a third-party provider with redirect + isSpotlight: false + description: | + When the third-party provider successfully authenticates the user, the provider will redirect the user to the URL specified in the `redirectTo` parameter. This parameter defaults to the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url). It does not redirect the user immediately after invoking this method. + You can modify the `SITE_URL` or add additional redirect urls in [your project](https://app.supabase.com/project/_/auth/settings). + js: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + options: { + redirectTo: 'https://example.com/welcome' + } + } + ``` + - id: sign-in-with-scopes + name: Sign in with scopes + isSpotlight: false + description: | + If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token. + You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider. The list of scopes will be documented by the third-party provider you are using and specifying scopes will enable you to use the OAuth provider token to call additional APIs supported by the third-party provider to get more information. + js: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + options: { + scopes: 'repo gist notifications' + } + }) + const oAuthToken = data.session.provider_token // use to access provider API + ``` + - id: auth.signOut() + title: 'signOut()' + $ref: '@supabase/gotrue-js.GoTrueClient.signOut' + notes: | + - In order to use the `signOut()` method, the user needs to be signed in first. + examples: + - id: sign-out + name: Sign out + isSpotlight: true + js: | + ```js + const { error } = await supabase.auth.signOut() + ``` + - id: auth.verifyOtp() + title: 'verifyOtp()' + $ref: '@supabase/gotrue-js.GoTrueClient.verifyOtp' + notes: | + - The `verifyOtp` method takes in different verification types. If a phone number is used, the type can either be `sms` or `phone_change`. If an email address is used, the type can be one of the following: `signup`, `magiclink`, `recovery`, `invite` or `email_change`. + - The verification type used should be determined based on the corresponding auth method called before `verifyOtp` to sign up / sign-in a user. + examples: + - id: verify-sms-one-time-password(otp) + name: Verify Sms One-Time Password (OTP) + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.verifyOtp({ phone, token, type: 'sms'}) + ``` + - id: verify-signup-one-time-password(otp) + name: Verify Signup One-Time Password (OTP) + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'signup'}) + ``` + - id: auth.getSession() + title: 'getSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.getSession' + examples: + - id: get-the-session-data + name: Get the session data + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.getSession() + ``` + - id: auth.getUser() + title: 'getUser()' + $ref: '@supabase/gotrue-js.GoTrueClient.getUser' + notes: | + - This method gets the user object from the current session. + - Fetches the user object from the database instead of local session. + examples: + - id: get-the-logged-in-user-with-the-current-existing-session + name: Get the logged in user with the current existing session + isSpotlight: true + js: | + ```js + const { data: { user } } = await supabase.auth.getUser() + ``` + - id: get-the-logged-in-user-with-a-custom-access-token-jwt + name: Get the logged in user with a custom access token jwt. + isSpotlight: false + js: | + ```js + const { data: { user } } = await supabase.auth.getUser(jwt) + ``` + - id: auth.updateUser() + title: 'updateUser()' + $ref: '@supabase/gotrue-js.GoTrueClient.updateUser' + notes: | + - In order to use the `updateUser()` method, the user needs to be signed in first. + - By Default, email updates sends a confirmation link to both the user's current and new email. + To only send a confirmation link to the user's new email, disable **Secure email change** in your project's [email auth provider settings](https://app.supabase.com/project/_/auth/settings). + examples: + - id: update-the-email-for-an-authenticated-user + name: Update the email for an authenticated user + description: Sends a "Confirm Email Change" email to the new email address. + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.updateUser({email: 'new@email.com'}) + ``` + - id: update-the-password-for-an-authenticated-user + name: Update the password for an authenticated user + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.updateUser({password: 'new password'}) + ``` + - id: update-the-user's-metadata + name: Update the user's metadata + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.updateUser({ + data: { hello: 'world' } + }) + ``` + - id: auth.setSession() + title: 'setSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.setSession' + notes: | + - `setSession()` takes in a refresh token and uses it to get a new session. + - The refresh token can only be used once to obtain a new session. + - [Refresh token rotation](/docs/reference/auth/config#refresh_token_rotation_enabled) is enabled by default on all projects to guard against replay attacks. + - You can configure the [`REFRESH_TOKEN_REUSE_INTERVAL`](https://supabase.com/docs/reference/auth/config#refresh_token_reuse_interval) which provides a short window in which the same refresh token can be used multiple times in the event of concurrency or offline issues. + examples: + - id: refresh-the-session + name: Refresh the session + description: Sets the session data from refresh_token and returns current session or an error if the refresh_token is invalid. + isSpotlight: true + js: | + ```js + const { data, error } = supabase.auth.setSession(refresh_token) + ``` + - id: auth.refreshSession() + title: 'refreshSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.refreshSession' + notes: | + - This method will refresh the session whether the current one is expired or not. + - Both examples destructure `user` and `session` from `data`. This is not required; so `const { data, error } =` is also valid. + examples: + - id: refresh-session-using-the-current-session + name: Refresh session using the current session + isSpotlight: true + js: | + ```js + const { data: { user, session }, error } = await supabase.auth.refreshSession() + ``` + - id: refresh-session-using-a-passed-in-session + name: Refresh session using a passed-in session + isSpotlight: true + js: | + ```js + const { data: { user, session }, error } = await supabase.auth.refreshSession({ refresh_token }) + ``` + - id: auth.onAuthStateChange() + title: 'onAuthStateChange()' + $ref: '@supabase/gotrue-js.GoTrueClient.onAuthStateChange' + notes: | + - Types of auth events: `SIGNED_IN`, `SIGNED_OUT`, `TOKEN_REFRESHED`, `USER_UPDATED`, `USER_DELETED`, `PASSWORD_RECOVERY` + examples: + - id: listen-to-auth-changes + name: Listen to auth changes + isSpotlight: true + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + console.log(event, session) + }) + ``` + - id: listen-to-sign-in + name: Listen to sign in + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'SIGNED_IN') console.log('SIGNED_IN', session) + }) + ``` + - id: listen-to-sign-out + name: Listen to sign out + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'SIGNED_OUT') console.log('SIGNED_OUT', session) + }) + ``` + - id: listen-to-token-refresh + name: Listen to token refresh + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'TOKEN_REFRESHED') console.log('TOKEN_REFRESHED', session) + }) + ``` + - id: listen-to-user-updates + name: Listen to user updates + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'USER_UPDATED') console.log('USER_UPDATED', session) + }) + ``` + - id: listen-to-user-deleted + name: Listen to user deleted + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'USER_DELETED') console.log('USER_DELETED', session) + }) + ``` + - id: listen-to-password-recovery-events + name: Listen to password recovery events + js: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'PASSWORD_RECOVERY') console.log('PASSWORD_RECOVERY', session) + }) + ``` + - id: Supabase Auth Admin Api + title: 'Overview' + notes: | + - Any method under the `supabase.auth.admin` namespace requires a `service_role` key. + - These methods are considered admin methods and should be called on a trusted server. Never expose your `service_role` key in the browser. + + - id: auth.admin.getUserById() + title: 'getUserById()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.getUserById' + notes: | + - Fetches the user object from the database based on the user's id. + - The `getUserById()` method requires the user's id which maps to the `auth.users.id` column. + examples: + - id: fetch-the-user-object-using-the-access-token-jwt + name: Fetch the user object using the access_token jwt. + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.admin.getUserById(1) + ``` + + - id: auth.admin.listUsers() + title: 'listUsers()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.listUsers' + examples: + - id: get-a-full-list-of-users. + name: Get a full list of users. + isSpotlight: true + js: | + ```js + const { data: { users }, error } = await supabase.auth.admin.listUsers() + ``` + - id: auth.admin.createUser() + title: 'createUser()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.createUser' + notes: | + - To confirm the user's email address or phone number, set `email_confirm` or `phone_confirm` to true. Both arguments default to false. + examples: + - id: create-a-new-user-with-custom-user-metadata + name: Create a new user with custom user metadata + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + email: 'user@email.com', + password: 'password', + user_metadata: { name: 'Yoda' } + }) + ``` + - id: auto-confirm-the-user's-email + name: Auto-confirm the user's email + js: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + email: 'user@email.com', + email_confirm: true + }) + ``` + - id: auto-confirm-the-user's-phone-number + name: Auto-confirm the user's phone number + js: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + phone: '1234567890', + phone_confirm: true + }) + ``` + - id: auth.admin.deleteUser() + title: 'deleteUser()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.deleteUser' + notes: | + - The `deleteUser()` method requires the user's ID, which maps to the `auth.users.id` column. + examples: + - id: removes-a-user + name: Removes a user + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.admin.deleteUser( + '715ed5db-f090-4b8c-a067-640ecee36aa0' + ) + ``` + + - id: auth.admin.inviteUserByEmail() + title: 'inviteUserByEmail()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.inviteUserByEmail' + notes: | + - Sends an invite link to the user's email address. + examples: + - id: invite-a-user + name: Invite a user + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.admin.inviteUserByEmail('email@example.com') + ``` + + - id: auth.resetPasswordForEmail() + title: 'resetPasswordForEmail()' + $ref: '@supabase/gotrue-js.GoTrueClient.resetPasswordForEmail' + notes: | + Sends a password reset request to an email address. + When the user clicks the reset link in the email they are redirected back to your application. + Prompt the user for a new password and call `auth.updateUser()`: + ```js + const { data, error } = await supabase.auth + .updateUser({ password: new_password }) + ``` + examples: + - id: reset-password + name: Reset password + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.resetPasswordForEmail(email, { + redirectTo: 'https://example.com/update-password', + }) + ``` + - id: reset-password(react) + name: Reset password (React) + isSpotlight: true + js: | + ```js + /** + * Step 1: Send the user an email to get a password reset token. + * This email contains a link which sends the user back to your application. + */ + const { data, error } = await supabase.auth + .resetPasswordForEmail('user@email.com') + + /** + * Step 2: Once the user is redirected back to your application, + * ask the user to reset their password. + */ + useEffect(() => { + supabase.auth.onAuthStateChange(async (event, session) => { + if (event == "PASSWORD_RECOVERY") { + const newPassword = prompt("What would you like your new password to be?"); + const { data, error } = await supabase.auth + .updateUser({ password: newPassword }) + + if (data) alert("Password updated successfully!") + if (error) alert("There was an error updating your password.") + } + }) + }, []) + ``` + + - id: auth.admin.generateLink() + title: 'generateLink()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.generateLink' + examples: + - id: generate-a-signup-link + name: Generate a signup link + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'signup', + email: 'email@example.com', + options: { + 'password': 'secret' + } + }) + ``` + - id: generate-an-invite-link + name: Generate an invite link + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'invite', + email: 'email@example.com' + }) + ``` + - id: generate-a-magic-link + name: Generate a magic link + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'magiclink', + email: 'email@example.com' + }) + ``` + - id: generate-a-recovery-link + name: Generate a recovery link + isSpotlight: false + js: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'recovery', + email: 'email@example.com' + }) + ``` + - id: generate-links-to-change-current-email-address + name: Generate links to change current email address + isSpotlight: false + js: | + ```js + // generate an email change link to be sent to the current email address + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'email_change_current', + email: 'current.email@example.com', + newEmail: 'new.email@example.com' + }) + + // generate an email change link to be sent to the new email address + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'email_change_new', + email: 'current.email@example.com', + newEmail: 'new.email@example.com' + }) + ``` + + - id: auth.admin.updateUserById() + title: 'updateUserById()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.updateUserById' + examples: + - id: updates-a-users-email. + name: Updates a user's email. + isSpotlight: false + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { email: 'new@email.com' } + ) + ``` + - id: updates-a-users-password. + name: Updates a user's password. + isSpotlight: false + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { password: 'new_password' } + ) + ``` + - id: updates-a-users-metadata. + name: Updates a user's metadata. + isSpotlight: true + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { user_metadata: { hello: 'world' } } + ) + ``` + - id: updates-a-users-app-metadata. + name: Updates a user's app_metadata. + isSpotlight: false + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { app_metadata: { plan: 'trial' } } + ) + ``` + - id: confirms-a-users-email-address. + name: Confirms a user's email address. + isSpotlight: false + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { email_confirm: true } + ) + ``` + - id: confirms-a-users-phone-number. + name: Confirms a user's phone number. + isSpotlight: false + js: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { phone_confirm: true } + ) + ``` + + - id: select() + title: 'Fetching data' + description: 'This is the description' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.select' + notes: | + - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](https://app.supabase.com/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data. + - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters) + - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers) + - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/hosting/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). + examples: + - id: getting-your-data + name: Getting your data + data: + sql: | + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + tables: + - schema: public + name: countries + content: | + | name | id | + | :-----------------------|------:| + | Afghanistan | 1 | + | Albania | 2 | + | Algeria | 3 | + response: | + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + - id: selecting-specific-columns + name: Selecting specific columns + description: | + You can select specific fields from your tables. + data: + sql: | + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + tables: + - schema: public + name: countries + content: | + | name | id | + | :-----------------------|------:| + | Afghanistan | 1 | + | Albania | 2 | + | Algeria | 3 | + response: | + { + "data": [ + { + "name": "Afghanistan" + }, + { + "name": "Albania" + }, + { + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + hideCodeBlock: true + - id: query-foreign-tables + name: Query foreign tables + description: | + If your database has foreign key relationships, you can query related tables too. + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities ( + name + ) + `) + ``` + data: + sql: | + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + tables: + - schema: public + name: countries + content: | + | name | id | + | :-----------------------|------:| + | Germany | 1 | + | Indonesia | 2 | + - schema: public + name: cities + content: | + | name | id | + | :-----------------------|------:| + | Bali | 1 | + | Munich | 2 | + response: | + { + "data": [ + { + "name": "Germany", + "cities": [ + { + "name": "Munich" + } + ] + }, + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + + - id: query-foreign-tables-through-a-join-table + name: Query foreign tables through a join table + data: + sql: | + create table + users ( + id int8 primary key, + name text + ); + create table + teams ( + id int8 primary key, + name text + ); + -- join table + create table + users_teams ( + user_id int8 not null references users, + team_id int8 not null references teams, + -- both foreign keys must be part of a composite primary key + primary key (user_id, team_id) + ); + + insert into + users (id, name) + values + (1, 'Kiran'), + (2, 'Evan'); + insert into + teams (id, name) + values + (1, 'Green'), + (2, 'Blue'); + insert into + users_teams (user_id, team_id) + values + (1, 1), + (1, 2), + (2, 2); + response: | + { + "data": [ + { + "name": "Kiran", + "teams": [ + { + "name": "Green" + }, + { + "name": "Blue" + } + ] + }, + { + "name": "Evan", + "teams": [ + { + "name": "Blue" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + description: | + If you're in a situation where your tables are **NOT** directly + related, but instead are joined by a _join table_, you can still use + the `select()` method to query the related data. The join table needs + to have the foreign keys as part of its composite primary key. + code: | + ```ts + const { data, error } = await supabase + .from('users') + .select(` + name, + teams ( + name + ) + `) + ``` + - id: query-the-same-foreign-table-multiple-times + name: Query the same foreign table multiple times + description: | + If you need to query the same foreign table twice, use the name of the + joined column to identify which join to use. You can also give each + column an alias. + + + + + ```sql + create table + users (id int8 primary key, name text); + + create table + messages ( + sender_id int8 not null references users, + receiver_id int8 not null references users, + content text + ); + + insert into + users (id, name) + values + (1, 'Kiran'), + (2, 'Evan'); + + insert into + messages (sender_id, receiver_id, content) + values + (1, 2, '👋'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('messages') + .select(` + content, + from:sender_id(name), + to:receiver_id(name) + `) + ``` + + + + + ```json + { + "data": [ + { + "content": "👋", + "from": { + "name": "Kiran" + }, + "to": { + "name": "Evan" + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: filtering-through-foreign-tables + name: Filtering through foreign tables + description: | + If the filter on a foreign table's column is not satisfied, the foreign + table returns `[]` or `null` but the parent table is not filtered out. + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, countries(*)') + .eq('countries.name', 'Estonia') + ``` + + + + + ```json + { + "data": [ + { + "name": "Bali", + "countries": null + }, + { + "name": "Munich", + "countries": null + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + If you want to filter out the parent table rows, use the `!inner` hint: + + + + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, countries!inner(*)') + .eq('countries.name', 'Estonia') + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: querying-with-count-option + name: Querying with count option + description: | + You can get the number of rows by using the + [count](/docs/reference/javascript/select#parameters) option. For + example, to get the table count without returning all rows: + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { count, error } = await supabase + .from('countries') + .select('*', { count: 'exact', head: true }) + ``` + + + + + ```json + { + "count": 3, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: querying-json-data + name: Querying JSON data + description: | + You can select and filter data inside of + [JSON](/docs/guides/database/json) columns. Postgres offers some + [operators](/docs/guides/database/json#query-the-jsonb-data) for + querying JSON data. + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Avdotya', '{"city":"Saint Petersburg"}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select(` + id, name, + address->city + `) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Avdotya", + "city": "Saint Petersburg" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: insert() + title: 'Create data: insert()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.insert' + examples: + - id: create-a-record + name: Create a record + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + ``` + + + + + ```json + { + "status": 201, + "statusText": "Created" + } + ``` + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Denmark" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + ``` + - id: create-a-record-and-return-it + name: Create a record and return it + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Denmark" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + - id: bulk-create + name: Bulk create + description: | + A bulk create operation is handled in a single transaction. + If any of the inserts fail, none of the rows are inserted. + + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .insert([ + { id: 1, name: 'Nepal' }, + { id: 1, name: 'Vietnam' }, + ]) + ``` + + + + + ```json + { + "error": { + "code": "23505", + "details": "Key (id)=(1) already exists.", + "hint": null, + "message": "duplicate key value violates unique constraint \"countries_pkey\"" + }, + "status": 409, + "statusText": "Conflict" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: update() + title: 'Modify data: update()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.update' + notes: | + - `update()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to update. + examples: + - id: updating-your-data + name: Updating your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Taiwan'); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + ``` + + + + + ```json + { + "status": 204, + "statusText": "No Content" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Australia" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + ``` + - id: update-a-record-and-return-it + name: Update a record and return it + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Taiwan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Australia" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: updating-json-data + name: Updating JSON data + description: | + Postgres offers some + [operators](/docs/guides/database/json#query-the-jsonb-data) for + working with JSON data. + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210 }'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .update({ + address: { + street: 'Melrose Place', + postcode: 90210 + } + }) + .eq('address->postcode', 90210) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Michael", + "address": { + "street": "Melrose Place", + "postcode": 90210 + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + Currently, it is only possible to update the entire JSON document. + hideCodeBlock: true + + - id: upsert() + title: 'Upsert data: upsert()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.upsert' + notes: | + - Primary keys must be included in `values` to use upsert. + examples: + - id: upsert-your-data + name: Upsert your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Albania" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + .select() + ``` + - id: bulk-upsert-your-data + name: Bulk Upsert your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert([ + { id: 1, name: 'Albania' }, + { id: 2, name: 'Algeria' }, + ]) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Albania" + }, + { + "id": 2, + "name": "Algeria" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + - id: upserting-into-tables-with-constraints + name: Upserting into tables with constraints + description: | + In the following query, `upsert()` implicitly uses the `id` + (primary key) column to determine conflicts. If there is no existing + row with the same `id`, `upsert()` inserts a new row, which + will fail in this case as there is already a row with `handle` `"saoirse"`. + + + + + ```sql + create table + users ( + id int8 generated by default as identity primary key, + handle text not null unique, + display_name text + ); + + insert into + users (id, handle, display_name) + values + (1, 'saoirse', null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' }) + .select() + ``` + + + + + ```json + { + "error": { + "code": "23505", + "details": "Key (handle)=(saoirse) already exists.", + "hint": null, + "message": "duplicate key value violates unique constraint \"users_handle_key\"" + }, + "status": 409, + "statusText": "Conflict" + } + ``` + + + + + Using the `onConflict` option, you can instruct `upsert()` to use + another column with a unique constraint to determine conflicts: + + + + + ```ts + await supabase + .from('users') + .upsert( + { id: 42, handle: 'saoirse', display_name: 'Saoirse' }, + { onConflict: 'handle' }, + ) + const { data, error } = await supabase + .from('users') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 42, + "handle": "saoirse", + "display_name": "Saoirse" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: delete() + title: 'Delete data: delete()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.delete' + notes: | + - `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete. + - If you use `delete()` with filters and you have + [RLS](/docs/learn/auth-deep-dive/auth-row-level-security) enabled, only + rows visible through `SELECT` policies are deleted. Note that by default + no rows are visible, so you need at least one `SELECT`/`ALL` policy that + makes the rows visible. + examples: + - id: delete-records + name: Delete records + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Spain'); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .delete() + .eq('id', 1) + ``` + + + + + ```json + { + "status": 204, + "statusText": "No Content" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { error } = await supabase + .from('countries') + .delete() + .eq('id', 1) + ``` + + - id: rpc() + title: 'Postgres functions: rpc()' + description: | + You can call Postgres functions as _Remote Procedure Calls_, logic in your database that you can execute from anywhere. + Functions are useful when the logic rarely changes—like for password resets and updates. + + ```sql + create or replace function hello_world() returns text as $$ + select 'Hello world'; + $$ language sql; + ``` + $ref: '@supabase/postgrest-js.PostgrestClient.rpc' + examples: + - id: call-a-postgres-function-without-arguments + name: Call a Postgres function without arguments + description: | + + + + ```sql + create function hello_world() returns text as $$ + select 'Hello world'; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('hello_world') + ``` + + + + + ```json + { + "data": "Hello world", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase.rpc('hello_world') + ``` + - id: call-a-postgres-function-with-arguments + name: Call a Postgres function with arguments + description: | + + + + ```sql + create function echo(say text) returns text as $$ + select say; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('echo', { say: '👋' }) + ``` + + + + + ```json + { + "data": "👋", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: bulk-processing + name: Bulk processing + description: | + You can process large payloads by passing in an array as an argument: + + + + + ```sql + create function add_one_each(arr int[]) returns int[] as $$ + select array_agg(n + 1) from unnest(arr) as n; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('add_one_each', { arr: [1, 2, 3] }) + ``` + + + + + ```json + { + "data": [ + 2, + 3, + 4 + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: call-a-postgres-function-with-filters + name: Call a Postgres function with filters + description: | + Postgres functions that return tables can also be combined with + [Filters](/docs/reference/javascript/using-filters) and + [Modifiers](/docs/reference/javascript/using-modifiers). + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'France'), + (2, 'United Kingdom'); + + create function list_stored_countries() returns setof countries as $$ + select * from countries; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase + .rpc('list_stored_countries') + .eq('id', 1) + .single() + ``` + + + + + ```json + { + "data": { + "id": 1, + "name": "France" + }, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: Using Filters + description: | + Filters allow you to only return rows that match certain conditions. + + Filters can be used on `select()`, `update()`, `upsert()`, and `delete()` queries. + + If a Postgres function returns a table response, you can also apply filters. + + ### Applying Filters + + Filters must be applied after any of `select()`, `update()`, `upsert()`, + `delete()`, and `rpc()` and before + [modifiers](/docs/reference/javascript/using-modifiers). + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, country_id') + .eq('name', 'The Shire') // Correct + + const { data, error } = await supabase + .from('cities') + .eq('name', 'The Shire') // Incorrect + .select('name, country_id') + ``` + + ### Chaining + + Filters can be chained together to produce advanced queries. For example, + to query cities with population between 1,000 and 10,000: + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, country_id') + .gte('population', 1000) + .lt('population', 10000) + ``` + + ### Conditional Chaining + + Filters can be built up one step at a time and then executed. For example: + + ```ts + const filterByName = null + const filterPopLow = 1000 + const filterPopHigh = 10000 + + let query = supabase + .from('cities') + .select('name, country_id') + + if (filterByName) { query = query.eq('name', filterByName) } + if (filterPopLow) { query = query.gte('population', filterPopLow) } + if (filterPopHigh) { query = query.lt('population', filterPopHigh) } + + const { data, error } = await query + ``` + + ### Filter by values within a JSON column + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210 }'), + (2, 'Jane', null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select() + .eq('address->postcode', 90210) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Michael", + "address": { + "postcode": 90210 + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + ### Filter Foreign Tables + + You can filter on foreign tables in your `select()` query using dot + notation: + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .eq('cities.name', 'Bali') + ``` + + + + + ```json + { + "data": [ + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + - id: eq() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.eq' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Albania') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Albania') + ``` + + - id: neq() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.neq' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .neq('name', 'Albania') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .neq('name', 'Albania') + ``` + + - id: gt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.gt' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gt('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gt('id', 2) + ``` + + - id: gte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.gte' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gte('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gte('id', 2) + ``` + + - id: lt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.lt' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lt('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lt('id', 2) + ``` + + - id: lte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.lte' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lte('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lte('id', 2) + ``` + + - id: like() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.like' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%Alba%') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%Alba%') + ``` + + - id: ilike() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.ilike' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%alba%') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%alba%') + ``` + + - id: is() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.is' + examples: + - id: checking-nullness + name: Checking nullness + description: | + Using the `eq()` filter doesn't work when filtering for `null`: + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'null'), + (2, null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "null" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + Instead, you need to use `is()`: + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .is('name', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": null + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .is('name', null) + ``` + + - id: in() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.in' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .in('name', ['Albania', 'Algeria']) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .in('name', ['Albania', 'Algeria']) + ``` + + - id: contains() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.contains' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + issues ( + id int8 primary key, + title text, + tags text[] + ); + + insert into + issues (id, title, tags) + values + (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']), + (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .contains('tags', ['is:open', 'severity:high']) + ``` + + + + + ```json + { + "data": [ + { + "title": "Cache invalidation is not working" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('users') + .select() + .contains('name', ['is:online', 'faction:red']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .contains('during', '[2000-01-01 13:00, 2000-01-01 13:30)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: on`jsonb`columns + name: On `jsonb` columns + description: | + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'), + (2, 'Jane', '{}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select('name') + .contains('address', { postcode: 90210 }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Michael" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: containedBy() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.containedBy' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + classes ( + id int8 primary key, + name text, + days text[] + ); + + insert into + classes (id, name, days) + values + (1, 'Chemistry', array['monday', 'friday']), + (2, 'History', array['monday', 'wednesday', 'thursday']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('classes') + .select('name') + .containedBy('days', ['monday', 'tuesday', 'wednesday', 'friday']) + ``` + + + + + ```json + { + "data": [ + { + "name": "Chemistry" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('classes') + .select('name') + .containedBy('days', ['monday', 'tuesday', 'wednesday', 'friday']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .containedBy('during', '[2000-01-01 00:00, 2000-01-01 23:59)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: on`jsonb`columns + name: On `jsonb` columns + description: | + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'), + (2, 'Jane', '{}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select('name') + .containedBy('address', {}) + ``` + + + + + ```json + { + "data": [ + { + "name": "Jane" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: rangeGt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeGt' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGt('during', '[2000-01-02 08:00, 2000-01-02 09:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "room_name": "Topaz", + "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGt('during', '[2000-01-02 08:00, 2000-01-02 09:00)') + ``` + + - id: rangeGte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeGte' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGte('during', '[2000-01-02 08:30, 2000-01-02 09:30)') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "room_name": "Topaz", + "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGte('during', '[2000-01-02 08:30, 2000-01-02 09:30)') + ``` + + - id: rangeLt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeLt' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)') + ``` + + - id: rangeLte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeLte' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLte('during', '[2000-01-01 14:00, 2000-01-01 16:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLte('during', '[2000-01-01 14:00, 2000-01-01 16:00)') + ``` + + - id: rangeAdjacent() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeAdjacent' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeAdjacent('during', '[2000-01-01 12:00, 2000-01-01 13:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeAdjacent('during', '[2000-01-01 12:00, 2000-01-01 13:00)') + ``` + + - id: overlaps() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.overlaps' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + issues ( + id int8 primary key, + title text, + tags text[] + ); + + insert into + issues (id, title, tags) + values + (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']), + (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .overlaps('tags', ['is:closed', 'severity:high']) + ``` + + + + + ```json + { + "data": [ + { + "title": "Cache invalidation is not working" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .overlaps('tags', ['is:closed', 'severity:high']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .overlaps('during', '[2000-01-01 12:45, 2000-01-01 13:15)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + # TODO: schema & result + - id: textSearch() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.textSearch' + notes: + - For more information, see [Postgres full text search](/docs/guides/database/full-text-search). + examples: + - id: text-search + name: Text search + js: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + config: 'english' + }) + ``` + - id: basic-normalization + name: Basic normalization + description: Uses PostgreSQL's `plainto_tsquery` function. + js: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + type: 'plain', + config: 'english' + }) + ``` + - id: full-normalization + name: Full normalization + description: Uses PostgreSQL's `phraseto_tsquery` function. + js: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + type: 'phrase', + config: 'english' + }) + ``` + - id: websearch + name: Websearch + description: | + Uses PostgreSQL's `websearch_to_tsquery` function. + This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used + with advanced operators. + + - `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery. + - `"quoted text"`: text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery. + - `OR`: the word “or” will be converted to the | operator. + - `-`: a dash will be converted to the ! operator. + + js: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat or cat'`, { + type: 'websearch', + config: 'english' + }) + ``` + + - id: match() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.match' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .match({ id: 2, name: 'Albania' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .match({ id: 2, name: 'Albania' }) + ``` + + - id: not() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.not' + notes: | + not() expects you to use the raw PostgREST syntax for the filter values. + + ```ts + .not('id', 'in', '(5,6,7)') // Use `()` for `in` filter + .not('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'null'), + (2, null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .not('name', 'is', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "null" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .not('name', 'is', null) + ``` + + - id: or() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.or' + notes: | + or() expects you to use the raw PostgREST syntax for the filter names and values. + + ```ts + .or('id.in.(5,6,7), arraycol.cs.{"a","b"}') // Use `()` for `in` filter, `{}` for array values and `cs` for `contains()`. + .or('id.in.(5,6,7), arraycol.cd.{"a","b"}') // Use `cd` for `containedBy()` + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.eq.2,name.eq.Algeria') + ``` + + + + + ```json + { + "data": [ + { + "name": "Albania" + }, + { + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.eq.2,name.eq.Algeria') + ``` + - id: use`or`with`and` + name: Use `or` with `and` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.gt.3,and(id.eq.1,name.eq.Afghanistan)') + ``` + + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: use`or`on-foreign-tables + name: Use `or` on foreign tables + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .or('country_id.eq.1,name.eq.Beijing', { foreignTable: 'cities' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Germany", + "cities": [ + { + "name": "Munich" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: filter() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.filter' + notes: | + filter() expects you to use the raw PostgREST syntax for the filter values. + + ```ts + .filter('id', 'in', '(5,6,7)') // Use `()` for `in` filter + .filter('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .filter('name', 'in', '("Algeria","Japan")') + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .filter('name', 'in', '("Algeria","Japan")') + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .filter('cities.name', 'eq', 'Bali') + ``` + + + + + ```json + { + "data": [ + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .filter('cities.name', 'eq', 'Bali') + ``` + + - id: Using Modifiers + description: | + Filters work on the row level—they allows you to return rows that + only match certain conditions without changing the shape of the rows. + Modifiers are everything that don't fit that definition—allowing you to + change the format of the response (e.g., returning a CSV string). + + Modifiers must be specified after filters. Some modifiers only apply for + queries that return rows (e.g., `select()` or `rpc()` on a function that + returns a table response). + + - id: db.modifiers.select() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.select' + title: select() + examples: + - id: with`upsert()` + name: With `upsert()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + ``` + + + + + ```json + { + "status": 201, + "statusText": "Created" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Algeria' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Algeria" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Algeria' }) + .select() + ``` + + - id: order() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.order' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .order('name', { ascending: false }) + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + }, + { + "id": 2, + "name": "Albania" + }, + { + "id": 1, + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('cities') + .select('name', 'country_id') + .order('id', { ascending: false }) + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + Ordering on foreign tables doesn't affect the ordering of + the parent table. + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'United States'), + (2, 'Vanuatu'); + insert into + cities (id, country_id, name) + values + (1, 1, 'Atlanta'), + (2, 1, 'New York City'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities ( + name + ) + `) + .order('name', { foreignTable: 'cities', ascending: false }) + ``` + + + + + ```json + { + "data": [ + { + "name": "United States", + "cities": [ + { + "name": "New York City" + }, + { + "name": "Atlanta" + } + ] + }, + { + "name": "Vanuatu", + "cities": [] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: limit() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.limit' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + ``` + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'United States'); + insert into + cities (id, country_id, name) + values + (1, 1, 'Atlanta'), + (2, 1, 'New York City'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities ( + name + ) + `) + .limit(1, { foreignTable: 'cities' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "United States", + "cities": [ + { + "name": "Atlanta" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: range() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.range' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .range(0, 1) + ``` + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + }, + { + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .range(0, 1) + ``` + + - id: db.abortSignal() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.abortSignal' + title: abortSignal() + examples: + - id: aborting-requests-in-flight + name: Aborting requests in-flight + description: | + You can use an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to abort requests. Note that `status` and `statusText` don't mean anything for aborted requests as the request wasn't fulfilled. + + + + + ```ts + const ac = new AbortController() + ac.abort() + const { data, error } = await supabase + .from('very_big_table') + .select() + .abortSignal(ac.signal) + ``` + + + + + ```json + { + "error": { + "message": "FetchError: The user aborted a request.", + "details": "", + "hint": "", + "code": "" + }, + "status": 400, + "statusText": "Bad Request" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const ac = new AbortController() + ac.abort() + const { data, error } = await supabase + .from('very_big_table') + .select() + .abortSignal(ac.signal) + ``` + + - id: single() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.single' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + .single() + ``` + + + + + ```json + { + "data": { + "name": "Afghanistan" + }, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + .single() + ``` + + - id: maybeSingle() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.maybeSingle' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Singapore') + .maybeSingle() + ``` + + + + + ```json + { + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Singapore') + .maybeSingle() + ``` + + - id: db.csv() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.csv' + title: csv() + examples: + - id: return-data-as-csv + name: Return data as CSV + description: | + By default, the data is returned in JSON format, but can also be returned as Comma Separated Values. + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .csv() + ``` + + + + + ```json + { + "data": "id,name\n1,Afghanistan\n2,Albania\n3,Algeria", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + js: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .csv() + ``` + + # NOTE: Not available on currently deployed PostgREST + # db.geojson(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.geojson' + # title: geojson() + + # NOTE: Not available on currently deployed PostgREST + # db.explain(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.explain' + # title: explain() + + # NOTE: Not available on currently deployed PostgREST + # db.rollback(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.rollback' + # title: rollback() + # examples: + # - id: With `delete()` + # description: | + #
+ # Schema + + # ```sql + # create table + # countries (id int8 primary key, name text); + + # insert into + # countries (id, name) + # values + # (1, 'Spain'); + # ``` + #
+ + # ```ts + # const { error } = await supabase + # .from('countries') + # .delete() + # .eq('id', 1) + # .rollback() + # ``` + + #
+ # Result + + # ```json + # { + # "status": 204, + # "statusText": "No Content" + # } + # ``` + #
+ + # ```ts + # const { data, error } = await supabase + # .from('countries') + # .select() + # ``` + + #
+ # Result + + # ```json + # { + # "data": [ + # { + # "id": 1, + # "name": "Spain" + # } + # ], + # "status": 200, + # "statusText": "OK" + # } + # ``` + #
+ # hideCodeBlock: true + # isSpotlight: true + # js: | + # ```ts + # const { error } = await supabase + # .from('countries') + # .delete() + # .eq('id', 1) + # ``` + + - id: invoke() + title: 'invoke()' + description: | + Invoke a Supabase Function. + $ref: '@supabase/functions-js.FunctionsClient.invoke' + notes: | + - Requires an Authorization header. + - Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec. + - When you pass in a body to your function, we automatically attach the Content-Type header for `Blob`, `ArrayBuffer`, `File`, `FormData` and `String`. If it doesn't match any of these types we assume the payload is `json`, serialise it and attach the `Content-Type` header as `application/json`. You can override this behaviour by passing in a `Content-Type` header of your own. + - Responses are automatically parsed as `json`, `blob` and `form-data` depending on the `Content-Type` header sent by your function. Responses are parsed as `text` by default. + examples: + - id: basic-invocation. + name: Basic invocation. + description: + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + body: { foo: 'bar' } + }) + ``` + - id: error-handling. + name: Error handling. + description: | + A `FunctionsHttpError` error is returned if your function throws an error, `FunctionsRelayError` if the Supabase Relay has an error processing your function and `FunctionsFetchError` if there is a network error in calling your function. + isSpotlight: true + js: | + ```js + import { FunctionsHttpError, FunctionsRelayError, FunctionsFetchError } from "@supabase/supabase-js"; + + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + body: { foo: 'bar' } + }) + + if (error instanceof FunctionsHttpError) { + console.log('Function returned an error', error.message) + } else if (error instanceof FunctionsRelayError) { + console.log('Relay error:', error.message) + } else if (error instanceof FunctionsFetchError) { + console.log('Fetch error:', error.message) + } + ``` + - id: passing-custom-headers. + name: Passing custom headers. + description: | + You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT. + isSpotlight: true + js: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + body: { foo: 'bar' } + }) + ``` + + - id: subscribe() + title: 'on().subscribe()' + $ref: '@supabase/realtime-js.RealtimeChannel.on' + notes: | + - Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime). + - Row level security is not applied to delete statements. + - If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;` + - When a delete occurs, the contents of old_record will be broadcast to all subscribers to that table so ensure that each table's replica identity only contains information that is safe to expose publicly. + - The channel name must exactly match the schema/table/filter you want to listen to separated by colons. See below examples for additional context. + examples: + - id: listen-to-all-database-changes + name: Listen to all database changes + isSpotlight: true + js: | + ```js + supabase + .channel('*') + .on('postgres_changes', { event: '*', schema: '*' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-a-specific-table + name: Listening to a specific table + js: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: '*', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-inserts + name: Listening to inserts + js: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-updates + name: Listening to updates + description: | + By default, Supabase will send only the updated record. If you want to receive the previous values as well you can + enable full replication for the table you are listening to: + + ```sql + alter table "your_table" replica identity full; + ``` + js: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-deletes + name: Listening to deletes + description: | + By default, Supabase does not send deleted records. If you want to receive the deleted record you can + enable full replication for the table you are listening too: + + ```sql + alter table "your_table" replica identity full; + ``` + js: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-multiple-events + name: Listening to multiple events + description: You can chain listeners if you want to listen to multiple events for each table. + js: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, handleRecordInserted) + .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, handleRecordDeleted) + .subscribe() + ``` + - id: listening-to-row-level-changes + name: Listening to row level changes + description: You can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match. + notes: | + - ``eq`` filter works with all database types as under the hood, it's casting both the filter value and the database value to the correct type and then comparing them. + js: | + ```js + supabase + .channel('public:countries:id=eq.200') + .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries', filter: 'id=eq.200' }, handleRecordUpdated) + .subscribe() + ``` + + - id: getChannels() + title: 'getChannels()' + $ref: '@supabase/supabase-js.index.SupabaseClient.getChannels' + examples: + - id: get-all-channels + name: Get all channels + isSpotlight: true + js: | + ```js + const channels = supabase.getChannels() + ``` + + - id: removeChannel() + title: 'removeChannel()' + $ref: '@supabase/supabase-js.index.SupabaseClient.removeChannel' + notes: | + - Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed. + examples: + - id: removes-a-channel + name: Removes a channel + isSpotlight: true + js: | + ```js + supabase.removeChannel(myChannel) + ``` + + - id: removeAllChannels() + title: 'removeAllChannels()' + $ref: '@supabase/supabase-js.index.SupabaseClient.removeAllChannels' + notes: | + - Removing channels is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed. + examples: + - id: remove-all-channels + name: Remove all channels + isSpotlight: true + js: | + ```js + supabase.removeAllChannels() + ``` + + - id: storage.listBuckets() + title: 'listBuckets()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.listBuckets' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: list-buckets + name: List buckets + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .listBuckets() + ``` + + - id: storage.getBucket() + title: 'getBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.getBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: get-bucket + name: Get bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .getBucket('avatars') + ``` + + - id: storage.createBucket() + title: 'createBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.createBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `insert` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-bucket + name: Create bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .createBucket('avatars', { public: false }) + ``` + + - id: storage.emptyBucket() + title: 'emptyBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.emptyBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: `select` and `delete` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: empty-bucket + name: Empty bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .emptyBucket('avatars') + ``` + - id: storage.updateBucket() + title: 'updateBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.updateBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `update` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: update-bucket + name: Update bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .updateBucket('avatars', { public: false }) + ``` + + - id: storage.deleteBucket() + title: 'deleteBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.deleteBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` and `delete` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: delete-bucket + name: Delete bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .deleteBucket('avatars') + ``` + + - id: storage.from.upload() + title: 'from.upload()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.upload' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `insert` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below. + examples: + - id: upload-file + name: Upload file + isSpotlight: true + js: | + ```js + const avatarFile = event.target.files[0] + const { data, error } = await supabase + .storage + .from('avatars') + .upload('public/avatar1.png', avatarFile, { + cacheControl: '3600', + upsert: false + }) + ``` + - id: upload-file-using`arraybuffer`from-base64-file-data + name: Upload file using `ArrayBuffer` from base64 file data + js: | + ```js + import { decode } from 'base64-arraybuffer' + + const { data, error } = await supabase + .storage + .from('avatars') + .upload('public/avatar1.png', decode('base64FileData'), { + contentType: 'image/png' + }) + ``` + + - id: storage.from.update() + title: 'from.update()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.update' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `update` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below. + examples: + - id: update-file + name: Update file + isSpotlight: true + js: | + ```js + const avatarFile = event.target.files[0] + const { data, error } = await supabase + .storage + .from('avatars') + .update('public/avatar1.png', avatarFile, { + cacheControl: '3600', + upsert: false + }) + ``` + - id: update-file-using`arraybuffer`from-base64-file-data + name: Update file using `ArrayBuffer` from base64 file data + js: | + ```js + import {decode} from 'base64-arraybuffer' + + const { data, error } = await supabase + .storage + .from('avatars') + .update('public/avatar1.png', decode('base64FileData'), { + contentType: 'image/png' + }) + ``` + + - id: storage.from.move() + title: 'from.move()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.move' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `update` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: move-file + name: Move file + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .move('public/avatar1.png', 'private/avatar2.png') + ``` + + - id: storage.from.copy() + title: 'from.copy()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.copy' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `insert` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: copy-file + name: Copy file + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .copy('public/avatar1.png', 'private/avatar2.png') + ``` + + - id: storage.from.createSignedUrl() + title: 'from.createSignedUrl()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.createSignedUrl' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-signed-url + name: Create Signed URL + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .createSignedUrl('folder/avatar1.png', 60) + ``` + + - id: storage.from.createSignedUrls() + title: 'from.createSignedUrls()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.createSignedUrls' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-signed-urls + name: Create Signed URLs + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60) + ``` + + - id: storage.from.getPublicUrl() + title: 'from.getPublicUrl()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.getPublicUrl' + notes: | + - The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.com](https://app.supabase.com), clicking the overflow menu on a bucket and choosing "Make public" + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: returns-the-url-for-an-asset-in-a-public-bucket + name: Returns the URL for an asset in a public bucket + isSpotlight: true + js: | + ```js + const { data } = supabase + .storage + .from('public-bucket') + .getPublicUrl('folder/avatar1.png') + ``` + + - id: storage.from.download() + title: 'from.download()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.download' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: download-file + name: Download file + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .download('folder/avatar1.png') + ``` + + - id: storage.from.remove() + title: 'from.remove()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.remove' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `delete` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: delete-file + name: Delete file + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .remove(['folder/avatar1.png']) + ``` + + - id: storage.from.list() + title: 'from.list()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.list' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: list-files-in-a-bucket + name: List files in a bucket + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .list('folder', { + limit: 100, + offset: 0, + sortBy: { column: 'name', order: 'asc' }, + }) + ``` + - id: search-files-in-a-bucket + name: Search files in a bucket + js: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .list('folder', { + limit: 100, + offset: 0, + sortBy: { column: 'name', order: 'asc' }, + search: 'jon' + }) + ``` diff --git a/spec/supabase_js_v2_temp_new_shape.yml b/spec/supabase_js_v2_temp_new_shape.yml new file mode 100644 index 00000000000..29da1f13dde --- /dev/null +++ b/spec/supabase_js_v2_temp_new_shape.yml @@ -0,0 +1,5367 @@ +openref: 0.1 + +info: + id: reference/supabase-js + title: Supabase Client + description: | + + Supabase JavaScript. + + definition: ../../spec/enrichments/tsdoc_v2/combined.json + specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2.yml + slugPrefix: '/' + libraries: + - id: 'JavaScript' + version: '0.0.1' + +functions: + - id: initializing + $ref: '@supabase/supabase-js.index.SupabaseClient.constructor' + description: | + You can initialize a new Supabase client using the `createClient()` method. + + The Supabase client is your entrypoint to the rest of the Supabase functionality + and is the easiest way to interact with everything we offer within the Supabase ecosystem. + + examples: + - id: create-client + name: createClient() + code: | + ```js + 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') + ``` + - id: with-additional-parameters + name: With additional parameters + code: | + ```js + import { createClient } from '@supabase/supabase-js' + + const options = { + db: { + schema: 'public', + }, + auth: { + autoRefreshToken: true, + persistSession: true, + detectSessionInUrl: true + }, + global: { + headers: { 'x-my-custom-header': 'my-app-name' }, + }, + } + const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", options) + ``` + - id: api-schemas + name: API schemas + code: | + ```js + import { createClient } from '@supabase/supabase-js' + + // Provide a custom schema. Defaults to "public". + const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', { + db: { schema: 'other_schema' } + }) + ``` + + By default the API server points to the `public` schema. You can enable other database schemas within the Dashboard. + Go to `Settings > API > Schema` and add the schema which you want to expose to the API. + + Note: each client connection can only access a single schema, so the code above can access the `other_schema` schema but cannot access the `public` schema. + - id: custom-fetch-implementation + name: Custom `fetch` implementation + code: | + ```js + import { createClient } from '@supabase/supabase-js' + + const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', { + global: { fetch: fetch.bind(globalThis) } + }) + ``` + + `supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, + but an alternative `fetch` implementation can be provided as an option. + This is most useful in environments where `cross-fetch` is not compatible (for instance Cloudflare Workers). + - id: react-native-options + name: React Native options + code: | + ```js + import { createClient } from '@supabase/supabase-js' + import AsyncStorage from "@react-native-async-storage/async-storage"; + + const supabase = createClient("https://xyzcompany.supabase.co", "public-anon-key", { + auth: { + storage: AsyncStorage, + autoRefreshToken: true, + persistSession: true, + detectSessionInUrl: false, + }, + }); + ``` + + For React Native we recommend using `AsyncStorage` as the storage implementation for Supabase Auth. + - id: auth.signUp() + title: 'signUp()' + $ref: '@supabase/gotrue-js.GoTrueClient.signUp' + notes: | + - By default, the user needs to verify their email address before logging in. To turn this off, disable **Confirm email** in [your project](https://app.supabase.com/project/_/auth/settings). + - **Confirm email** determines if users need to confirm their email address after signing up. + - If **Confirm email** is enabled, a `user` is returned but `session` is null. + - If **Confirm email** is disabled, both a `user` and a `session` are returned. + - When the user confirms their email address, they are redirected to the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url) by default. You can modify your `SITE_URL` or add additional redirect URLs in [your project](https://app.supabase.com/project/_/auth/settings). + - If signUp() is called for an existing confirmed user: + - If **Confirm email** is enabled in [your project](https://app.supabase.com/project/_/auth/settings), an obfuscated/fake user object is returned. + - If **Confirm email** is disabled, the error message, `User already registered` is returned. + - To fetch the currently logged-in user, refer to [`getUser()`](/docs/reference/javascript/auth-getuser). + examples: + - id: sign-up. + name: Sign up. + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.signUp({ + email: 'example@email.com', + password: 'example-password', + }) + ``` + - id: sign-up-with-additional-user-metadata. + name: Sign up with additional user metadata. + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.signUp( + { + email: 'example@email.com', + password: 'example-password', + options: { + data: { + first_name: 'John', + age: 27, + } + } + } + ) + ``` + - id: auth.signInWithPassword() + title: 'signInWithPassword()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithPassword' + notes: | + - Requires either an email and password or a phone number and password. + examples: + - id: sign-in-with-email-and-password + name: Sign in with email and password + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.signInWithPassword({ + email: 'example@email.com', + password: 'example-password', + }) + ``` + - id: sign-in-with-phone-and-password + name: Sign in with phone and password + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.signInWithPassword({ + phone: '+13334445555', + password: 'some-password', + }) + + // After receiving a SMS with a OTP. + const { data, error } = await supabase.auth.verifyOtp({ + phone: '+13334445555', + token: '123456', + }) + ``` + - id: auth.signInWithOtp() + title: 'signInWithOtp()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithOtp' + notes: | + - Requires either an email or phone number. + - This method is used for passwordless sign-ins where a OTP is sent to the user's email or phone number. + - If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP. + - If you're using phone, you can configure whether you want the user to receive a OTP. + - The magic link's destination URL is determined by the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url). You can modify the `SITE_URL` or add additional redirect urls in [your project](https://app.supabase.com/project/_/auth/settings). + examples: + - id: sign-in-with-email. + name: Sign in with email. + isSpotlight: true + description: The user will be sent an email which contains either a magiclink or a OTP or both. By default, a given user can only request a OTP once every 60 seconds. + code: | + ```js + const { data, error } = await supabase.auth.signInWithOtp({ + email: 'example@email.com', + }) + ``` + - id: sign-in-with-sms-otp. + name: Sign in with SMS OTP. + isSpotlight: false + description: The user will be sent a SMS which contains a OTP. By default, a given user can only request a OTP once every 60 seconds. + code: | + ```js + const { data, error } = await supabase.auth.signInWithOtp({ + phone: '+13334445555', + }) + ``` + - id: auth.signInWithOAuth() + title: 'signInWithOAuth()' + $ref: '@supabase/gotrue-js.GoTrueClient.signInWithOAuth' + notes: | + - This method is used for signing in using a third-party provider. + - Supabase supports many different [third-party providers](https://supabase.com/docs/guides/auth#providers). + examples: + - id: sign-in-using-a-third-party-provider + name: Sign in using a third-party provider + + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + }) + ``` + - id: sign-in-using-a-third-party-provider-with-redirect + name: Sign in using a third-party provider with redirect + isSpotlight: false + description: | + When the third-party provider successfully authenticates the user, the provider will redirect the user to the URL specified in the `redirectTo` parameter. This parameter defaults to the [`SITE_URL`](https://supabase.com/docs/reference/auth/config#site_url). It does not redirect the user immediately after invoking this method. + You can modify the `SITE_URL` or add additional redirect urls in [your project](https://app.supabase.com/project/_/auth/settings). + code: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + options: { + redirectTo: 'https://example.com/welcome' + } + } + ``` + - id: sign-in-with-scopes + name: Sign in with scopes + isSpotlight: false + description: | + If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token. + You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider. The list of scopes will be documented by the third-party provider you are using and specifying scopes will enable you to use the OAuth provider token to call additional APIs supported by the third-party provider to get more information. + code: | + ```js + const { data, error } = await supabase.auth.signInWithOAuth({ + provider: 'github' + options: { + scopes: 'repo gist notifications' + } + }) + const oAuthToken = data.session.provider_token // use to access provider API + ``` + - id: auth.signOut() + title: 'signOut()' + $ref: '@supabase/gotrue-js.GoTrueClient.signOut' + notes: | + - In order to use the `signOut()` method, the user needs to be signed in first. + examples: + - id: sign-out + name: Sign out + isSpotlight: true + code: | + ```js + const { error } = await supabase.auth.signOut() + ``` + - id: auth.verifyOtp() + title: 'verifyOtp()' + $ref: '@supabase/gotrue-js.GoTrueClient.verifyOtp' + notes: | + - The `verifyOtp` method takes in different verification types. If a phone number is used, the type can either be `sms` or `phone_change`. If an email address is used, the type can be one of the following: `signup`, `magiclink`, `recovery`, `invite` or `email_change`. + - The verification type used should be determined based on the corresponding auth method called before `verifyOtp` to sign up / sign-in a user. + examples: + - id: verify-sms-one-time-password(otp) + name: Verify Sms One-Time Password (OTP) + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.verifyOtp({ phone, token, type: 'sms'}) + ``` + - id: verify-signup-one-time-password(otp) + name: Verify Signup One-Time Password (OTP) + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'signup'}) + ``` + - id: auth.getSession() + title: 'getSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.getSession' + examples: + - id: get-the-session-data + name: Get the session data + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.getSession() + ``` + - id: auth.getUser() + title: 'getUser()' + $ref: '@supabase/gotrue-js.GoTrueClient.getUser' + notes: | + - This method gets the user object from the current session. + - Fetches the user object from the database instead of local session. + examples: + - id: get-the-logged-in-user-with-the-current-existing-session + name: Get the logged in user with the current existing session + isSpotlight: true + code: | + ```js + const { data: { user } } = await supabase.auth.getUser() + ``` + - id: get-the-logged-in-user-with-a-custom-access-token-jwt + name: Get the logged in user with a custom access token jwt. + isSpotlight: false + code: | + ```js + const { data: { user } } = await supabase.auth.getUser(jwt) + ``` + - id: auth.updateUser() + title: 'updateUser()' + $ref: '@supabase/gotrue-js.GoTrueClient.updateUser' + notes: | + - In order to use the `updateUser()` method, the user needs to be signed in first. + - By Default, email updates sends a confirmation link to both the user's current and new email. + To only send a confirmation link to the user's new email, disable **Secure email change** in your project's [email auth provider settings](https://app.supabase.com/project/_/auth/settings). + examples: + - id: update-the-email-for-an-authenticated-user + name: Update the email for an authenticated user + description: Sends a "Confirm Email Change" email to the new email address. + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.updateUser({email: 'new@email.com'}) + ``` + - id: update-the-password-for-an-authenticated-user + name: Update the password for an authenticated user + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.updateUser({password: 'new password'}) + ``` + - id: update-the-user's-metadata + name: Update the user's metadata + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.updateUser({ + data: { hello: 'world' } + }) + ``` + - id: auth.setSession() + title: 'setSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.setSession' + notes: | + - `setSession()` takes in a refresh token and uses it to get a new session. + - The refresh token can only be used once to obtain a new session. + - [Refresh token rotation](/docs/reference/auth/config#refresh_token_rotation_enabled) is enabled by default on all projects to guard against replay attacks. + - You can configure the [`REFRESH_TOKEN_REUSE_INTERVAL`](https://supabase.com/docs/reference/auth/config#refresh_token_reuse_interval) which provides a short window in which the same refresh token can be used multiple times in the event of concurrency or offline issues. + examples: + - id: refresh-the-session + name: Refresh the session + description: Sets the session data from refresh_token and returns current session or an error if the refresh_token is invalid. + isSpotlight: true + code: | + ```js + const { data, error } = supabase.auth.setSession(refresh_token) + ``` + - id: auth.refreshSession() + title: 'refreshSession()' + $ref: '@supabase/gotrue-js.GoTrueClient.refreshSession' + notes: | + - This method will refresh the session whether the current one is expired or not. + - Both examples destructure `user` and `session` from `data`. This is not required; so `const { data, error } =` is also valid. + examples: + - id: refresh-session-using-the-current-session + name: Refresh session using the current session + isSpotlight: true + code: | + ```js + const { data: { user, session }, error } = await supabase.auth.refreshSession() + ``` + - id: refresh-session-using-a-passed-in-session + name: Refresh session using a passed-in session + isSpotlight: true + code: | + ```js + const { data: { user, session }, error } = await supabase.auth.refreshSession({ refresh_token }) + ``` + - id: auth.onAuthStateChange() + title: 'onAuthStateChange()' + $ref: '@supabase/gotrue-js.GoTrueClient.onAuthStateChange' + notes: | + - Types of auth events: `SIGNED_IN`, `SIGNED_OUT`, `TOKEN_REFRESHED`, `USER_UPDATED`, `USER_DELETED`, `PASSWORD_RECOVERY` + examples: + - id: listen-to-auth-changes + name: Listen to auth changes + isSpotlight: true + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + console.log(event, session) + }) + ``` + - id: listen-to-sign-in + name: Listen to sign in + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'SIGNED_IN') console.log('SIGNED_IN', session) + }) + ``` + - id: listen-to-sign-out + name: Listen to sign out + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'SIGNED_OUT') console.log('SIGNED_OUT', session) + }) + ``` + - id: listen-to-token-refresh + name: Listen to token refresh + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'TOKEN_REFRESHED') console.log('TOKEN_REFRESHED', session) + }) + ``` + - id: listen-to-user-updates + name: Listen to user updates + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'USER_UPDATED') console.log('USER_UPDATED', session) + }) + ``` + - id: listen-to-user-deleted + name: Listen to user deleted + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'USER_DELETED') console.log('USER_DELETED', session) + }) + ``` + - id: listen-to-password-recovery-events + name: Listen to password recovery events + code: | + ```js + supabase.auth.onAuthStateChange((event, session) => { + if (event == 'PASSWORD_RECOVERY') console.log('PASSWORD_RECOVERY', session) + }) + ``` + - id: Supabase Auth Admin Api + title: 'Overview' + notes: | + - Any method under the `supabase.auth.admin` namespace requires a `service_role` key. + - These methods are considered admin methods and should be called on a trusted server. Never expose your `service_role` key in the browser. + + - id: auth.admin.getUserById() + title: 'getUserById()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.getUserById' + notes: | + - Fetches the user object from the database based on the user's id. + - The `getUserById()` method requires the user's id which maps to the `auth.users.id` column. + examples: + - id: fetch-the-user-object-using-the-access-token-jwt + name: Fetch the user object using the access_token jwt. + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.admin.getUserById(1) + ``` + + - id: auth.admin.listUsers() + title: 'listUsers()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.listUsers' + examples: + - id: get-a-full-list-of-users. + name: Get a full list of users. + isSpotlight: true + code: | + ```js + const { data: { users }, error } = await supabase.auth.admin.listUsers() + ``` + - id: auth.admin.createUser() + title: 'createUser()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.createUser' + notes: | + - To confirm the user's email address or phone number, set `email_confirm` or `phone_confirm` to true. Both arguments default to false. + examples: + - id: create-a-new-user-with-custom-user-metadata + name: Create a new user with custom user metadata + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + email: 'user@email.com', + password: 'password', + user_metadata: { name: 'Yoda' } + }) + ``` + - id: auto-confirm-the-user's-email + name: Auto-confirm the user's email + code: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + email: 'user@email.com', + email_confirm: true + }) + ``` + - id: auto-confirm-the-user's-phone-number + name: Auto-confirm the user's phone number + code: | + ```js + const { data, error } = await supabase.auth.admin.createUser({ + phone: '1234567890', + phone_confirm: true + }) + ``` + - id: auth.admin.deleteUser() + title: 'deleteUser()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.deleteUser' + notes: | + - The `deleteUser()` method requires the user's ID, which maps to the `auth.users.id` column. + examples: + - id: removes-a-user + name: Removes a user + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.admin.deleteUser( + '715ed5db-f090-4b8c-a067-640ecee36aa0' + ) + ``` + + - id: auth.admin.inviteUserByEmail() + title: 'inviteUserByEmail()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.inviteUserByEmail' + notes: | + - Sends an invite link to the user's email address. + examples: + - id: invite-a-user + name: Invite a user + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.admin.inviteUserByEmail('email@example.com') + ``` + + - id: auth.resetPasswordForEmail() + title: 'resetPasswordForEmail()' + $ref: '@supabase/gotrue-js.GoTrueClient.resetPasswordForEmail' + notes: | + Sends a password reset request to an email address. + When the user clicks the reset link in the email they are redirected back to your application. + Prompt the user for a new password and call `auth.updateUser()`: + ```js + const { data, error } = await supabase.auth + .updateUser({ password: new_password }) + ``` + examples: + - id: reset-password + name: Reset password + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.resetPasswordForEmail(email, { + redirectTo: 'https://example.com/update-password', + }) + ``` + - id: reset-password(react) + name: Reset password (React) + isSpotlight: true + code: | + ```js + /** + * Step 1: Send the user an email to get a password reset token. + * This email contains a link which sends the user back to your application. + */ + const { data, error } = await supabase.auth + .resetPasswordForEmail('user@email.com') + + /** + * Step 2: Once the user is redirected back to your application, + * ask the user to reset their password. + */ + useEffect(() => { + supabase.auth.onAuthStateChange(async (event, session) => { + if (event == "PASSWORD_RECOVERY") { + const newPassword = prompt("What would you like your new password to be?"); + const { data, error } = await supabase.auth + .updateUser({ password: newPassword }) + + if (data) alert("Password updated successfully!") + if (error) alert("There was an error updating your password.") + } + }) + }, []) + ``` + + - id: auth.admin.generateLink() + title: 'generateLink()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.generateLink' + examples: + - id: generate-a-signup-link + name: Generate a signup link + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'signup', + email: 'email@example.com', + options: { + 'password': 'secret' + } + }) + ``` + - id: generate-an-invite-link + name: Generate an invite link + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'invite', + email: 'email@example.com' + }) + ``` + - id: generate-a-magic-link + name: Generate a magic link + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'magiclink', + email: 'email@example.com' + }) + ``` + - id: generate-a-recovery-link + name: Generate a recovery link + isSpotlight: false + code: | + ```js + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'recovery', + email: 'email@example.com' + }) + ``` + - id: generate-links-to-change-current-email-address + name: Generate links to change current email address + isSpotlight: false + code: | + ```js + // generate an email change link to be sent to the current email address + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'email_change_current', + email: 'current.email@example.com', + newEmail: 'new.email@example.com' + }) + + // generate an email change link to be sent to the new email address + const { data, error } = await supabase.auth.admin.generateLink({ + type: 'email_change_new', + email: 'current.email@example.com', + newEmail: 'new.email@example.com' + }) + ``` + + - id: auth.admin.updateUserById() + title: 'updateUserById()' + $ref: '@supabase/gotrue-js.GoTrueAdminApi.updateUserById' + examples: + - id: updates-a-users-email. + name: Updates a user's email. + isSpotlight: false + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { email: 'new@email.com' } + ) + ``` + - id: updates-a-users-password. + name: Updates a user's password. + isSpotlight: false + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { password: 'new_password' } + ) + ``` + - id: updates-a-users-metadata. + name: Updates a user's metadata. + isSpotlight: true + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { user_metadata: { hello: 'world' } } + ) + ``` + - id: updates-a-users-app-metadata. + name: Updates a user's app_metadata. + isSpotlight: false + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { app_metadata: { plan: 'trial' } } + ) + ``` + - id: confirms-a-users-email-address. + name: Confirms a user's email address. + isSpotlight: false + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { email_confirm: true } + ) + ``` + - id: confirms-a-users-phone-number. + name: Confirms a user's phone number. + isSpotlight: false + code: | + ```js + const { data: user, error } = await supabase.auth.admin.updateUserById( + '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4', + { phone_confirm: true } + ) + ``` + + - id: select() + title: 'Fetch data: select()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.select' + notes: | + - By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's [API settings](https://app.supabase.com/project/_/settings/api). It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data. + - `select()` can be combined with [Filters](/docs/reference/javascript/using-filters) + - `select()` can be combined with [Modifiers](/docs/reference/javascript/using-modifiers) + - `apikey` is a reserved keyword if you're using the [Supabase Platform](/docs/guides/hosting/platform) and should be avoided as a column name](https://github.com/supabase/supabase/issues/5465). + examples: + - id: getting-your-data + name: Getting your data + code: | + const { data, error } = await supabase + .from('countries') + .select() + - id: selecting-specific-columns + name: Selecting specific columns + code: | + const { data, error } = await supabase + .from('countries') + .select('name') + - id: query-foreign-tables + name: Query foreign tables + description: | + If your database has foreign key relationships, you can query related tables too. + - id: query-foreign-tables-through-a-join-table + name: Query foreign tables through a join table + description: | + If you're in a situation where your tables are **NOT** directly + related, but instead are joined by a _join table_, you can still use + the `select()` method to query the related data. The join table needs + to have the foreign keys as part of its composite primary key. + + + + + ```sql + create table + users ( + id int8 primary key, + name text + ); + create table + teams ( + id int8 primary key, + name text + ); + -- join table + create table + users_teams ( + user_id int8 not null references users, + team_id int8 not null references teams, + -- both foreign keys must be part of a composite primary key + primary key (user_id, team_id) + ); + + insert into + users (id, name) + values + (1, 'Kiran'), + (2, 'Evan'); + insert into + teams (id, name) + values + (1, 'Green'), + (2, 'Blue'); + insert into + users_teams (user_id, team_id) + values + (1, 1), + (1, 2), + (2, 2); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select(` + name, + teams ( + name + ) + `) + ``` + + + + + ```json + { + "data": [ + { + "name": "Kiran", + "teams": [ + { + "name": "Green" + }, + { + "name": "Blue" + } + ] + }, + { + "name": "Evan", + "teams": [ + { + "name": "Blue" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: query-the-same-foreign-table-multiple-times + name: Query the same foreign table multiple times + description: | + If you need to query the same foreign table twice, use the name of the + joined column to identify which join to use. You can also give each + column an alias. + + + + + ```sql + create table + users (id int8 primary key, name text); + + create table + messages ( + sender_id int8 not null references users, + receiver_id int8 not null references users, + content text + ); + + insert into + users (id, name) + values + (1, 'Kiran'), + (2, 'Evan'); + + insert into + messages (sender_id, receiver_id, content) + values + (1, 2, '👋'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('messages') + .select(` + content, + from:sender_id(name), + to:receiver_id(name) + `) + ``` + + + + + ```json + { + "data": [ + { + "content": "👋", + "from": { + "name": "Kiran" + }, + "to": { + "name": "Evan" + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: filtering-through-foreign-tables + name: Filtering through foreign tables + description: | + If the filter on a foreign table's column is not satisfied, the foreign + table returns `[]` or `null` but the parent table is not filtered out. + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, countries(*)') + .eq('countries.name', 'Estonia') + ``` + + + + + ```json + { + "data": [ + { + "name": "Bali", + "countries": null + }, + { + "name": "Munich", + "countries": null + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + If you want to filter out the parent table rows, use the `!inner` hint: + + + + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, countries!inner(*)') + .eq('countries.name', 'Estonia') + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: querying-with-count-option + name: Querying with count option + description: | + You can get the number of rows by using the + [count](/docs/reference/javascript/select#parameters) option. For + example, to get the table count without returning all rows: + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { count, error } = await supabase + .from('countries') + .select('*', { count: 'exact', head: true }) + ``` + + + + + ```json + { + "count": 3, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: querying-json-data + name: Querying JSON data + description: | + You can select and filter data inside of + [JSON](/docs/guides/database/json) columns. Postgres offers some + [operators](/docs/guides/database/json#query-the-jsonb-data) for + querying JSON data. + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Avdotya', '{"city":"Saint Petersburg"}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select(` + id, name, + address->city + `) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Avdotya", + "city": "Saint Petersburg" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: insert() + title: 'Create data: insert()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.insert' + examples: + - id: create-a-record + name: Create a record + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + ``` + + + + + ```json + { + "status": 201, + "statusText": "Created" + } + ``` + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Denmark" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + ``` + - id: create-a-record-and-return-it + name: Create a record and return it + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .insert({ id: 1, name: 'Denmark' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Denmark" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + - id: bulk-create + name: Bulk create + description: | + A bulk create operation is handled in a single transaction. + If any of the inserts fail, none of the rows are inserted. + + + + + ```sql + create table + countries (id int8 primary key, name text); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .insert([ + { id: 1, name: 'Nepal' }, + { id: 1, name: 'Vietnam' }, + ]) + ``` + + + + + ```json + { + "error": { + "code": "23505", + "details": "Key (id)=(1) already exists.", + "hint": null, + "message": "duplicate key value violates unique constraint \"countries_pkey\"" + }, + "status": 409, + "statusText": "Conflict" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: update() + title: 'Modify data: update()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.update' + notes: | + - `update()` should always be combined with [Filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to update. + examples: + - id: updating-your-data + name: Updating your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Taiwan'); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + ``` + + + + + ```json + { + "status": 204, + "statusText": "No Content" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Australia" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + ``` + - id: update-a-record-and-return-it + name: Update a record and return it + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Taiwan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .update({ name: 'Australia' }) + .eq('id', 1) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Australia" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: updating-json-data + name: Updating JSON data + description: | + Postgres offers some + [operators](/docs/guides/database/json#query-the-jsonb-data) for + working with JSON data. + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210 }'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .update({ + address: { + street: 'Melrose Place', + postcode: 90210 + } + }) + .eq('address->postcode', 90210) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Michael", + "address": { + "street": "Melrose Place", + "postcode": 90210 + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + Currently, it is only possible to update the entire JSON document. + hideCodeBlock: true + + - id: upsert() + title: 'Upsert data: upsert()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.upsert' + notes: | + - Primary keys must be included in `values` to use upsert. + examples: + - id: upsert-your-data + name: Upsert your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Albania" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + .select() + ``` + - id: bulk-upsert-your-data + name: Bulk Upsert your data + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert([ + { id: 1, name: 'Albania' }, + { id: 2, name: 'Algeria' }, + ]) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Albania" + }, + { + "id": 2, + "name": "Algeria" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + - id: upserting-into-tables-with-constraints + name: Upserting into tables with constraints + description: | + In the following query, `upsert()` implicitly uses the `id` + (primary key) column to determine conflicts. If there is no existing + row with the same `id`, `upsert()` inserts a new row, which + will fail in this case as there is already a row with `handle` `"saoirse"`. + + + + + ```sql + create table + users ( + id int8 generated by default as identity primary key, + handle text not null unique, + display_name text + ); + + insert into + users (id, handle, display_name) + values + (1, 'saoirse', null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .upsert({ id: 42, handle: 'saoirse', display_name: 'Saoirse' }) + .select() + ``` + + + + + ```json + { + "error": { + "code": "23505", + "details": "Key (handle)=(saoirse) already exists.", + "hint": null, + "message": "duplicate key value violates unique constraint \"users_handle_key\"" + }, + "status": 409, + "statusText": "Conflict" + } + ``` + + + + + Using the `onConflict` option, you can instruct `upsert()` to use + another column with a unique constraint to determine conflicts: + + + + + ```ts + await supabase + .from('users') + .upsert( + { id: 42, handle: 'saoirse', display_name: 'Saoirse' }, + { onConflict: 'handle' }, + ) + const { data, error } = await supabase + .from('users') + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 42, + "handle": "saoirse", + "display_name": "Saoirse" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: delete() + title: 'Delete data: delete()' + $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.delete' + notes: | + - `delete()` should always be combined with [filters](/docs/reference/javascript/using-filters) to target the item(s) you wish to delete. + - If you use `delete()` with filters and you have + [RLS](/docs/learn/auth-deep-dive/auth-row-level-security) enabled, only + rows visible through `SELECT` policies are deleted. Note that by default + no rows are visible, so you need at least one `SELECT`/`ALL` policy that + makes the rows visible. + examples: + - id: delete-records + name: Delete records + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Spain'); + ``` + + + + + ```ts + const { error } = await supabase + .from('countries') + .delete() + .eq('id', 1) + ``` + + + + + ```json + { + "status": 204, + "statusText": "No Content" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + ``` + + + + + ```json + { + "data": [], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { error } = await supabase + .from('countries') + .delete() + .eq('id', 1) + ``` + + - id: rpc() + title: 'Postgres functions: rpc()' + description: | + You can call Postgres functions as _Remote Procedure Calls_, logic in your database that you can execute from anywhere. + Functions are useful when the logic rarely changes—like for password resets and updates. + + ```sql + create or replace function hello_world() returns text as $$ + select 'Hello world'; + $$ language sql; + ``` + $ref: '@supabase/postgrest-js.PostgrestClient.rpc' + examples: + - id: call-a-postgres-function-without-arguments + name: Call a Postgres function without arguments + description: | + + + + ```sql + create function hello_world() returns text as $$ + select 'Hello world'; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('hello_world') + ``` + + + + + ```json + { + "data": "Hello world", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase.rpc('hello_world') + ``` + - id: call-a-postgres-function-with-arguments + name: Call a Postgres function with arguments + description: | + + + + ```sql + create function echo(say text) returns text as $$ + select say; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('echo', { say: '👋' }) + ``` + + + + + ```json + { + "data": "👋", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: bulk-processing + name: Bulk processing + description: | + You can process large payloads by passing in an array as an argument: + + + + + ```sql + create function add_one_each(arr int[]) returns int[] as $$ + select array_agg(n + 1) from unnest(arr) as n; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase.rpc('add_one_each', { arr: [1, 2, 3] }) + ``` + + + + + ```json + { + "data": [ + 2, + 3, + 4 + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: call-a-postgres-function-with-filters + name: Call a Postgres function with filters + description: | + Postgres functions that return tables can also be combined with + [Filters](/docs/reference/javascript/using-filters) and + [Modifiers](/docs/reference/javascript/using-modifiers). + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'France'), + (2, 'United Kingdom'); + + create function list_stored_countries() returns setof countries as $$ + select * from countries; + $$ language sql; + ``` + + + + + ```ts + const { data, error } = await supabase + .rpc('list_stored_countries') + .eq('id', 1) + .single() + ``` + + + + + ```json + { + "data": { + "id": 1, + "name": "France" + }, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: Using Filters + description: | + Filters allow you to only return rows that match certain conditions. + + Filters can be used on `select()`, `update()`, `upsert()`, and `delete()` queries. + + If a Postgres function returns a table response, you can also apply filters. + + ### Applying Filters + + Filters must be applied after any of `select()`, `update()`, `upsert()`, + `delete()`, and `rpc()` and before + [modifiers](/docs/reference/javascript/using-modifiers). + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, country_id') + .eq('name', 'The Shire') // Correct + + const { data, error } = await supabase + .from('cities') + .eq('name', 'The Shire') // Incorrect + .select('name, country_id') + ``` + + ### Chaining + + Filters can be chained together to produce advanced queries. For example, + to query cities with population between 1,000 and 10,000: + + ```ts + const { data, error } = await supabase + .from('cities') + .select('name, country_id') + .gte('population', 1000) + .lt('population', 10000) + ``` + + ### Conditional Chaining + + Filters can be built up one step at a time and then executed. For example: + + ```ts + const filterByName = null + const filterPopLow = 1000 + const filterPopHigh = 10000 + + let query = supabase + .from('cities') + .select('name, country_id') + + if (filterByName) { query = query.eq('name', filterByName) } + if (filterPopLow) { query = query.gte('population', filterPopLow) } + if (filterPopHigh) { query = query.lt('population', filterPopHigh) } + + const { data, error } = await query + ``` + + ### Filter by values within a JSON column + + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210 }'), + (2, 'Jane', null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select() + .eq('address->postcode', 90210) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Michael", + "address": { + "postcode": 90210 + } + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + ### Filter Foreign Tables + + You can filter on foreign tables in your `select()` query using dot + notation: + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .eq('cities.name', 'Bali') + ``` + + + + + ```json + { + "data": [ + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + - id: eq() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.eq' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Albania') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Albania') + ``` + + - id: neq() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.neq' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .neq('name', 'Albania') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .neq('name', 'Albania') + ``` + + - id: gt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.gt' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gt('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gt('id', 2) + ``` + + - id: gte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.gte' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gte('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .gte('id', 2) + ``` + + - id: lt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.lt' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lt('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lt('id', 2) + ``` + + - id: lte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.lte' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lte('id', 2) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .lte('id', 2) + ``` + + - id: like() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.like' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%Alba%') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%Alba%') + ``` + + - id: ilike() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.ilike' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%alba%') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .like('name', '%alba%') + ``` + + - id: is() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.is' + examples: + - id: checking-nullness + name: Checking nullness + description: | + Using the `eq()` filter doesn't work when filtering for `null`: + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'null'), + (2, null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "null" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + + Instead, you need to use `is()`: + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .is('name', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": null + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .is('name', null) + ``` + + - id: in() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.in' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .in('name', ['Albania', 'Algeria']) + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .in('name', ['Albania', 'Algeria']) + ``` + + - id: contains() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.contains' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + issues ( + id int8 primary key, + title text, + tags text[] + ); + + insert into + issues (id, title, tags) + values + (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']), + (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .contains('tags', ['is:open', 'severity:high']) + ``` + + + + + ```json + { + "data": [ + { + "title": "Cache invalidation is not working" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('users') + .select() + .contains('name', ['is:online', 'faction:red']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .contains('during', '[2000-01-01 13:00, 2000-01-01 13:30)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: on`jsonb`columns + name: On `jsonb` columns + description: | + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'), + (2, 'Jane', '{}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select('name') + .contains('address', { postcode: 90210 }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Michael" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: containedBy() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.containedBy' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + classes ( + id int8 primary key, + name text, + days text[] + ); + + insert into + classes (id, name, days) + values + (1, 'Chemistry', array['monday', 'friday']), + (2, 'History', array['monday', 'wednesday', 'thursday']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('classes') + .select('name') + .containedBy('days', ['monday', 'tuesday', 'wednesday', 'friday']) + ``` + + + + + ```json + { + "data": [ + { + "name": "Chemistry" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('classes') + .select('name') + .containedBy('days', ['monday', 'tuesday', 'wednesday', 'friday']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .containedBy('during', '[2000-01-01 00:00, 2000-01-01 23:59)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: on`jsonb`columns + name: On `jsonb` columns + description: | + + + + ```sql + create table + users ( + id int8 primary key, + name text, + address jsonb + ); + + insert into + users (id, name, address) + values + (1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'), + (2, 'Jane', '{}'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('users') + .select('name') + .containedBy('address', {}) + ``` + + + + + ```json + { + "data": [ + { + "name": "Jane" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: rangeGt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeGt' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGt('during', '[2000-01-02 08:00, 2000-01-02 09:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "room_name": "Topaz", + "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGt('during', '[2000-01-02 08:00, 2000-01-02 09:00)') + ``` + + - id: rangeGte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeGte' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGte('during', '[2000-01-02 08:30, 2000-01-02 09:30)') + ``` + + + + + ```json + { + "data": [ + { + "id": 2, + "room_name": "Topaz", + "during": "[\"2000-01-02 09:00:00\",\"2000-01-02 10:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeGte('during', '[2000-01-02 08:30, 2000-01-02 09:30)') + ``` + + - id: rangeLt() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeLt' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)') + ``` + + - id: rangeLte() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeLte' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLte('during', '[2000-01-01 14:00, 2000-01-01 16:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeLte('during', '[2000-01-01 14:00, 2000-01-01 16:00)') + ``` + + - id: rangeAdjacent() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.rangeAdjacent' + examples: + - id: with`select()` + name: With `select()` + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeAdjacent('during', '[2000-01-01 12:00, 2000-01-01 13:00)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .rangeAdjacent('during', '[2000-01-01 12:00, 2000-01-01 13:00)') + ``` + + - id: overlaps() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.overlaps' + examples: + - id: on-array-columns + name: On array columns + description: | + + + + ```sql + create table + issues ( + id int8 primary key, + title text, + tags text[] + ); + + insert into + issues (id, title, tags) + values + (1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']), + (2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .overlaps('tags', ['is:closed', 'severity:high']) + ``` + + + + + ```json + { + "data": [ + { + "title": "Cache invalidation is not working" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('issues') + .select('title') + .overlaps('tags', ['is:closed', 'severity:high']) + ``` + - id: on-range-columns + name: On range columns + description: | + Postgres supports a number of [range + types](https://www.postgresql.org/docs/current/rangetypes.html). You + can filter on range columns using the string representation of range + values. + + + + + ```sql + create table + reservations ( + id int8 primary key, + room_name text, + during tsrange + ); + + insert into + reservations (id, room_name, during) + values + (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), + (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('reservations') + .select() + .overlaps('during', '[2000-01-01 12:45, 2000-01-01 13:15)') + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "room_name": "Emerald", + "during": "[\"2000-01-01 13:00:00\",\"2000-01-01 15:00:00\")" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + # TODO: schema & result + - id: textSearch() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.textSearch' + notes: + - For more information, see [Postgres full text search](/docs/guides/database/full-text-search). + examples: + - id: text-search + name: Text search + code: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + config: 'english' + }) + ``` + - id: basic-normalization + name: Basic normalization + description: Uses PostgreSQL's `plainto_tsquery` function. + code: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + type: 'plain', + config: 'english' + }) + ``` + - id: full-normalization + name: Full normalization + description: Uses PostgreSQL's `phraseto_tsquery` function. + code: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat' & 'cat'`, { + type: 'phrase', + config: 'english' + }) + ``` + - id: websearch + name: Websearch + description: | + Uses PostgreSQL's `websearch_to_tsquery` function. + This function will never raise syntax errors, which makes it possible to use raw user-supplied input for search, and can be used + with advanced operators. + + - `unquoted text`: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery. + - `"quoted text"`: text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery. + - `OR`: the word “or” will be converted to the | operator. + - `-`: a dash will be converted to the ! operator. + + code: | + ```ts + const { data, error } = await supabase + .from('quotes') + .select('catchphrase') + .textSearch('catchphrase', `'fat or cat'`, { + type: 'websearch', + config: 'english' + }) + ``` + + - id: match() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.match' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .match({ id: 2, name: 'Albania' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .match({ id: 2, name: 'Albania' }) + ``` + + - id: not() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.not' + notes: | + not() expects you to use the raw PostgREST syntax for the filter values. + + ```ts + .not('id', 'in', '(5,6,7)') // Use `()` for `in` filter + .not('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'null'), + (2, null); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .not('name', 'is', null) + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "null" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .not('name', 'is', null) + ``` + + - id: or() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.or' + notes: | + or() expects you to use the raw PostgREST syntax for the filter names and values. + + ```ts + .or('id.in.(5,6,7), arraycol.cs.{"a","b"}') // Use `()` for `in` filter, `{}` for array values and `cs` for `contains()`. + .or('id.in.(5,6,7), arraycol.cd.{"a","b"}') // Use `cd` for `containedBy()` + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.eq.2,name.eq.Algeria') + ``` + + + + + ```json + { + "data": [ + { + "name": "Albania" + }, + { + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.eq.2,name.eq.Algeria') + ``` + - id: use`or`with`and` + name: Use `or` with `and` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .or('id.gt.3,and(id.eq.1,name.eq.Afghanistan)') + ``` + + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + - id: use`or`on-foreign-tables + name: Use `or` on foreign tables + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .or('country_id.eq.1,name.eq.Beijing', { foreignTable: 'cities' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "Germany", + "cities": [ + { + "name": "Munich" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: filter() + $ref: '@supabase/postgrest-js.PostgrestFilterBuilder.filter' + notes: | + filter() expects you to use the raw PostgREST syntax for the filter values. + + ```ts + .filter('id', 'in', '(5,6,7)') // Use `()` for `in` filter + .filter('arraycol', 'cs', '{"a","b"}') // Use `cs` for `contains()`, `{}` for array values + ``` + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .filter('name', 'in', '("Algeria","Japan")') + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .filter('name', 'in', '("Algeria","Japan")') + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .filter('cities.name', 'eq', 'Bali') + ``` + + + + + ```json + { + "data": [ + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities!inner ( + name + ) + `) + .filter('cities.name', 'eq', 'Bali') + ``` + + - id: Using Modifiers + description: | + Filters work on the row level—they allows you to return rows that + only match certain conditions without changing the shape of the rows. + Modifiers are everything that don't fit that definition—allowing you to + change the format of the response (e.g., returning a CSV string). + + Modifiers must be specified after filters. Some modifiers only apply for + queries that return rows (e.g., `select()` or `rpc()` on a function that + returns a table response). + + - id: db.modifiers.select() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.select' + title: select() + examples: + - id: with`upsert()` + name: With `upsert()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Albania' }) + ``` + + + + + ```json + { + "status": 201, + "statusText": "Created" + } + ``` + + + + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Algeria' }) + .select() + ``` + + + + + ```json + { + "data": [ + { + "id": 1, + "name": "Algeria" + } + ], + "status": 201, + "statusText": "Created" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .upsert({ id: 1, name: 'Algeria' }) + .select() + ``` + + - id: order() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.order' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .order('name', { ascending: false }) + ``` + + + + + ```json + { + "data": [ + { + "id": 3, + "name": "Algeria" + }, + { + "id": 2, + "name": "Albania" + }, + { + "id": 1, + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('cities') + .select('name', 'country_id') + .order('id', { ascending: false }) + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + Ordering on foreign tables doesn't affect the ordering of + the parent table. + + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'United States'), + (2, 'Vanuatu'); + insert into + cities (id, country_id, name) + values + (1, 1, 'Atlanta'), + (2, 1, 'New York City'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities ( + name + ) + `) + .order('name', { foreignTable: 'cities', ascending: false }) + ``` + + + + + ```json + { + "data": [ + { + "name": "United States", + "cities": [ + { + "name": "New York City" + }, + { + "name": "Atlanta" + } + ] + }, + { + "name": "Vanuatu", + "cities": [] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: limit() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.limit' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + ``` + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + ``` + - id: on-a-foreign-table + name: On a foreign table + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'United States'); + insert into + cities (id, country_id, name) + values + (1, 1, 'Atlanta'), + (2, 1, 'New York City'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select(` + name, + cities ( + name + ) + `) + .limit(1, { foreignTable: 'cities' }) + ``` + + + + + ```json + { + "data": [ + { + "name": "United States", + "cities": [ + { + "name": "Atlanta" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + + - id: range() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.range' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .range(0, 1) + ``` + + + + + ```json + { + "data": [ + { + "name": "Afghanistan" + }, + { + "name": "Albania" + } + ], + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .range(0, 1) + ``` + + - id: db.abortSignal() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.abortSignal' + title: abortSignal() + examples: + - id: aborting-requests-in-flight + name: Aborting requests in-flight + description: | + You can use an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to abort requests. Note that `status` and `statusText` don't mean anything for aborted requests as the request wasn't fulfilled. + + + + + ```ts + const ac = new AbortController() + ac.abort() + const { data, error } = await supabase + .from('very_big_table') + .select() + .abortSignal(ac.signal) + ``` + + + + + ```json + { + "error": { + "message": "FetchError: The user aborted a request.", + "details": "", + "hint": "", + "code": "" + }, + "status": 400, + "statusText": "Bad Request" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const ac = new AbortController() + ac.abort() + const { data, error } = await supabase + .from('very_big_table') + .select() + .abortSignal(ac.signal) + ``` + + - id: single() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.single' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + .single() + ``` + + + + + ```json + { + "data": { + "name": "Afghanistan" + }, + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select('name') + .limit(1) + .single() + ``` + + - id: maybeSingle() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.maybeSingle' + examples: + - id: with`select()` + name: With `select()` + description: | + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Singapore') + .maybeSingle() + ``` + + + + + ```json + { + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .eq('name', 'Singapore') + .maybeSingle() + ``` + + - id: db.csv() + $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.csv' + title: csv() + examples: + - id: return-data-as-csv + name: Return data as CSV + description: | + By default, the data is returned in JSON format, but can also be returned as Comma Separated Values. + + + + + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + + + + + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .csv() + ``` + + + + + ```json + { + "data": "id,name\n1,Afghanistan\n2,Albania\n3,Algeria", + "status": 200, + "statusText": "OK" + } + ``` + + + + hideCodeBlock: true + isSpotlight: true + code: | + ```ts + const { data, error } = await supabase + .from('countries') + .select() + .csv() + ``` + + # NOTE: Not available on currently deployed PostgREST + # db.geojson(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.geojson' + # title: geojson() + + # NOTE: Not available on currently deployed PostgREST + # db.explain(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.explain' + # title: explain() + + # NOTE: Not available on currently deployed PostgREST + # db.rollback(): + # $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.rollback' + # title: rollback() + # examples: + # - id: With `delete()` + # description: | + #
+ # Schema + + # ```sql + # create table + # countries (id int8 primary key, name text); + + # insert into + # countries (id, name) + # values + # (1, 'Spain'); + # ``` + #
+ + # ```ts + # const { error } = await supabase + # .from('countries') + # .delete() + # .eq('id', 1) + # .rollback() + # ``` + + #
+ # Result + + # ```json + # { + # "status": 204, + # "statusText": "No Content" + # } + # ``` + #
+ + # ```ts + # const { data, error } = await supabase + # .from('countries') + # .select() + # ``` + + #
+ # Result + + # ```json + # { + # "data": [ + # { + # "id": 1, + # "name": "Spain" + # } + # ], + # "status": 200, + # "statusText": "OK" + # } + # ``` + #
+ # hideCodeBlock: true + # isSpotlight: true + # js: | + # ```ts + # const { error } = await supabase + # .from('countries') + # .delete() + # .eq('id', 1) + # ``` + + - id: invoke() + title: 'invoke()' + description: | + Invoke a Supabase Function. + $ref: '@supabase/functions-js.FunctionsClient.invoke' + notes: | + - Requires an Authorization header. + - Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec. + - When you pass in a body to your function, we automatically attach the Content-Type header for `Blob`, `ArrayBuffer`, `File`, `FormData` and `String`. If it doesn't match any of these types we assume the payload is `json`, serialise it and attach the `Content-Type` header as `application/json`. You can override this behaviour by passing in a `Content-Type` header of your own. + - Responses are automatically parsed as `json`, `blob` and `form-data` depending on the `Content-Type` header sent by your function. Responses are parsed as `text` by default. + examples: + - id: basic-invocation. + name: Basic invocation. + description: + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + body: { foo: 'bar' } + }) + ``` + - id: error-handling. + name: Error handling. + description: | + A `FunctionsHttpError` error is returned if your function throws an error, `FunctionsRelayError` if the Supabase Relay has an error processing your function and `FunctionsFetchError` if there is a network error in calling your function. + isSpotlight: true + code: | + ```js + import { FunctionsHttpError, FunctionsRelayError, FunctionsFetchError } from "@supabase/supabase-js"; + + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + body: { foo: 'bar' } + }) + + if (error instanceof FunctionsHttpError) { + console.log('Function returned an error', error.message) + } else if (error instanceof FunctionsRelayError) { + console.log('Relay error:', error.message) + } else if (error instanceof FunctionsFetchError) { + console.log('Fetch error:', error.message) + } + ``` + - id: passing-custom-headers. + name: Passing custom headers. + description: | + You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT. + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + body: { foo: 'bar' } + }) + ``` + + - id: subscribe() + title: 'on().subscribe()' + $ref: '@supabase/realtime-js.RealtimeChannel.on' + notes: | + - Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime). + - Row level security is not applied to delete statements. + - If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;` + - When a delete occurs, the contents of old_record will be broadcast to all subscribers to that table so ensure that each table's replica identity only contains information that is safe to expose publicly. + - The channel name must exactly match the schema/table/filter you want to listen to separated by colons. See below examples for additional context. + examples: + - id: listen-to-all-database-changes + name: Listen to all database changes + isSpotlight: true + code: | + ```js + supabase + .channel('*') + .on('postgres_changes', { event: '*', schema: '*' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-a-specific-table + name: Listening to a specific table + code: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: '*', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-inserts + name: Listening to inserts + code: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-updates + name: Listening to updates + description: | + By default, Supabase will send only the updated record. If you want to receive the previous values as well you can + enable full replication for the table you are listening to: + + ```sql + alter table "your_table" replica identity full; + ``` + code: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-deletes + name: Listening to deletes + description: | + By default, Supabase does not send deleted records. If you want to receive the deleted record you can + enable full replication for the table you are listening too: + + ```sql + alter table "your_table" replica identity full; + ``` + code: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, payload => { + console.log('Change received!', payload) + }) + .subscribe() + ``` + - id: listening-to-multiple-events + name: Listening to multiple events + description: You can chain listeners if you want to listen to multiple events for each table. + code: | + ```js + supabase + .channel('public:countries') + .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, handleRecordInserted) + .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, handleRecordDeleted) + .subscribe() + ``` + - id: listening-to-row-level-changes + name: Listening to row level changes + description: You can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match. + notes: | + - ``eq`` filter works with all database types as under the hood, it's casting both the filter value and the database value to the correct type and then comparing them. + code: | + ```js + supabase + .channel('public:countries:id=eq.200') + .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries', filter: 'id=eq.200' }, handleRecordUpdated) + .subscribe() + ``` + + - id: getChannels() + title: 'getChannels()' + $ref: '@supabase/supabase-js.index.SupabaseClient.getChannels' + examples: + - id: get-all-channels + name: Get all channels + isSpotlight: true + code: | + ```js + const channels = supabase.getChannels() + ``` + + - id: removeChannel() + title: 'removeChannel()' + $ref: '@supabase/supabase-js.index.SupabaseClient.removeChannel' + notes: | + - Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed. + examples: + - id: removes-a-channel + name: Removes a channel + isSpotlight: true + code: | + ```js + supabase.removeChannel(myChannel) + ``` + + - id: removeAllChannels() + title: 'removeAllChannels()' + $ref: '@supabase/supabase-js.index.SupabaseClient.removeAllChannels' + notes: | + - Removing channels is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed. + examples: + - id: remove-all-channels + name: Remove all channels + isSpotlight: true + code: | + ```js + supabase.removeAllChannels() + ``` + + - id: storage.listBuckets() + title: 'listBuckets()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.listBuckets' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: list-buckets + name: List buckets + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .listBuckets() + ``` + + - id: storage.getBucket() + title: 'getBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.getBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: get-bucket + name: Get bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .getBucket('avatars') + ``` + + - id: storage.createBucket() + title: 'createBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.createBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `insert` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-bucket + name: Create bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .createBucket('avatars', { public: false }) + ``` + + - id: storage.emptyBucket() + title: 'emptyBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.emptyBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` + - `objects` table permissions: `select` and `delete` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: empty-bucket + name: Empty bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .emptyBucket('avatars') + ``` + - id: storage.updateBucket() + title: 'updateBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.updateBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `update` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: update-bucket + name: Update bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .updateBucket('avatars', { public: false }) + ``` + + - id: storage.deleteBucket() + title: 'deleteBucket()' + $ref: '@supabase/storage-js.packages/StorageBucketApi.default.deleteBucket' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: `select` and `delete` + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: delete-bucket + name: Delete bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .deleteBucket('avatars') + ``` + + - id: storage.from.upload() + title: 'from.upload()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.upload' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `insert` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below. + examples: + - id: upload-file + name: Upload file + isSpotlight: true + code: | + ```js + const avatarFile = event.target.files[0] + const { data, error } = await supabase + .storage + .from('avatars') + .upload('public/avatar1.png', avatarFile, { + cacheControl: '3600', + upsert: false + }) + ``` + - id: upload-file-using`arraybuffer`from-base64-file-data + name: Upload file using `ArrayBuffer` from base64 file data + code: | + ```js + import { decode } from 'base64-arraybuffer' + + const { data, error } = await supabase + .storage + .from('avatars') + .upload('public/avatar1.png', decode('base64FileData'), { + contentType: 'image/png' + }) + ``` + + - id: storage.from.update() + title: 'from.update()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.update' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `update` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below. + examples: + - id: update-file + name: Update file + isSpotlight: true + code: | + ```js + const avatarFile = event.target.files[0] + const { data, error } = await supabase + .storage + .from('avatars') + .update('public/avatar1.png', avatarFile, { + cacheControl: '3600', + upsert: false + }) + ``` + - id: update-file-using`arraybuffer`from-base64-file-data + name: Update file using `ArrayBuffer` from base64 file data + code: | + ```js + import {decode} from 'base64-arraybuffer' + + const { data, error } = await supabase + .storage + .from('avatars') + .update('public/avatar1.png', decode('base64FileData'), { + contentType: 'image/png' + }) + ``` + + - id: storage.from.move() + title: 'from.move()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.move' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `update` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: move-file + name: Move file + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .move('public/avatar1.png', 'private/avatar2.png') + ``` + + - id: storage.from.copy() + title: 'from.copy()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.copy' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `insert` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: copy-file + name: Copy file + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .copy('public/avatar1.png', 'private/avatar2.png') + ``` + + - id: storage.from.createSignedUrl() + title: 'from.createSignedUrl()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.createSignedUrl' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-signed-url + name: Create Signed URL + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .createSignedUrl('folder/avatar1.png', 60) + ``` + + - id: storage.from.createSignedUrls() + title: 'from.createSignedUrls()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.createSignedUrls' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: create-signed-urls + name: Create Signed URLs + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60) + ``` + + - id: storage.from.getPublicUrl() + title: 'from.getPublicUrl()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.getPublicUrl' + notes: | + - The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.com](https://app.supabase.com), clicking the overflow menu on a bucket and choosing "Make public" + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: none + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: returns-the-url-for-an-asset-in-a-public-bucket + name: Returns the URL for an asset in a public bucket + isSpotlight: true + code: | + ```js + const { data } = supabase + .storage + .from('public-bucket') + .getPublicUrl('folder/avatar1.png') + ``` + + - id: storage.from.download() + title: 'from.download()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.download' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: download-file + name: Download file + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .download('folder/avatar1.png') + ``` + + - id: storage.from.remove() + title: 'from.remove()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.remove' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `delete` and `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: delete-file + name: Delete file + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .remove(['folder/avatar1.png']) + ``` + + - id: storage.from.list() + title: 'from.list()' + $ref: '@supabase/storage-js.packages/StorageFileApi.default.list' + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `select` + - Refer to the [Storage guide](/docs/guides/storage#access-control) on how access control works + examples: + - id: list-files-in-a-bucket + name: List files in a bucket + isSpotlight: true + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .list('folder', { + limit: 100, + offset: 0, + sortBy: { column: 'name', order: 'asc' }, + }) + ``` + - id: search-files-in-a-bucket + name: Search files in a bucket + code: | + ```js + const { data, error } = await supabase + .storage + .from('avatars') + .list('folder', { + limit: 100, + offset: 0, + sortBy: { column: 'name', order: 'asc' }, + search: 'jon' + }) + ```