The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update swift ref
[email protected]68d9116328d2
diff --git a/apps/docs/pages/reference/swift/[...slug].tsx b/apps/docs/pages/reference/swift/[...slug].tsxnew file mode 100644index 00000000000..d0991316c1f--- /dev/null+++ b/apps/docs/pages/reference/swift/[...slug].tsx@@ -0,0 +1,21 @@+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'+// @ts-expect-error+import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }+import RefSectionHandler from '~/components/reference/RefSectionHandler'+import { flattenSections } from '~/lib/helpers'+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'++const sections = flattenSections(clientLibsCommonSections)++export default function JSReference(props) {+ return <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="client-lib" />+}++export async function getStaticProps() {+ return handleRefStaticProps(sections, '/swift')+}++export function getStaticPaths() {+ return handleRefGetStaticPaths()+}diff --git a/apps/docs/pages/reference/swift/crawlers/[...slug].tsx b/apps/docs/pages/reference/swift/crawlers/[...slug].tsxnew file mode 100644index 00000000000..00d29a772db--- /dev/null+++ b/apps/docs/pages/reference/swift/crawlers/[...slug].tsx@@ -0,0 +1,44 @@+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'+import typeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'+// @ts-expect-error+import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }+import RefSectionHandler from '~/components/reference/RefSectionHandler'+import { flattenSections } from '~/lib/helpers'+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'+import { useRouter } from 'next/router'+import RefSEO from '~/components/reference/RefSEO'++const sections = flattenSections(clientLibsCommonSections)++export default function JSReference(props) {+ const router = useRouter()+ const slug = router.query.slug[0]+ const filteredSection = sections.filter((section) => section.id === slug)++ const pageTitle = filteredSection[0]?.title+ ? `${filteredSection[0]?.title} | Supabase`+ : 'Supabase'++ return (+ <>+ <RefSEO title={pageTitle} />++ <RefSectionHandler+ sections={filteredSection}+ spec={spec}+ typeSpec={typeSpec}+ pageProps={props}+ type="client-lib"+ />+ </>+ )+}++export async function getStaticProps() {+ return handleRefStaticProps(sections, '/swift')+}++export function getStaticPaths() {+ return handleRefGetStaticPaths()+}diff --git a/apps/docs/pages/reference/swift/v1/[...slug].tsx b/apps/docs/pages/reference/swift/v1/[...slug].tsxnew file mode 100644index 00000000000..1ffdebde8c3--- /dev/null+++ b/apps/docs/pages/reference/swift/v1/[...slug].tsx@@ -0,0 +1,21 @@+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'+// @ts-expect-error+import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }+import RefSectionHandler from '~/components/reference/RefSectionHandler'+import { flattenSections } from '~/lib/helpers'+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'++const sections = flattenSections(clientLibsCommonSections)++export default function JSReference(props) {+ return <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="client-lib" />+}++export async function getStaticProps() {+ return handleRefStaticProps(sections, '/swift/v1')+}++export function getStaticPaths() {+ return handleRefGetStaticPaths()+}diff --git a/apps/docs/pages/reference/swift/v1/crawlers/[...slug].tsx b/apps/docs/pages/reference/swift/v1/crawlers/[...slug].tsxnew file mode 100644index 00000000000..13ae4435ddd--- /dev/null+++ b/apps/docs/pages/reference/swift/v1/crawlers/[...slug].tsx@@ -0,0 +1,43 @@+import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json'+import typeSpec from '~/../../spec/enrichments/tsdoc_v2/combined.json'+// @ts-expect-error+import spec from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }+import RefSectionHandler from '~/components/reference/RefSectionHandler'+import { flattenSections } from '~/lib/helpers'+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'+import { useRouter } from 'next/router'+import RefSEO from '~/components/reference/RefSEO'++const sections = flattenSections(clientLibsCommonSections)++export default function JSReference(props) {+ const router = useRouter()+ const slug = router.query.slug[0]+ const filteredSection = sections.filter((section) => section.id === slug)++ const pageTitle = filteredSection[0]?.title+ ? `${filteredSection[0]?.title} | Supabase`+ : 'Supabase'+ return (+ <>+ <RefSEO title={pageTitle} />++ <RefSectionHandler+ sections={filteredSection}+ spec={spec}+ typeSpec={typeSpec}+ pageProps={props}+ type="client-lib"+ />+ </>+ )+}++export async function getStaticProps() {+ return handleRefStaticProps(sections, '/swift/v1')+}++export function getStaticPaths() {+ return handleRefGetStaticPaths()+}diff --git a/spec/supabase_swift_v1.yml b/spec/supabase_swift_v1.ymlindex 1ebe4b63a3e..b001fe83718 100644--- a/spec/supabase_swift_v1.yml+++ b/spec/supabase_swift_v1.yml@@ -7,7 +7,7 @@ info:Supabase Swift.- specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_swift_v2.yml+ specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_swift_v1.ymlslugPrefix: '/'libraries:- id: 'Swift'