The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
initial commit
[email protected]cac07707498d
diff --git a/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsxindex 36f01bf6830..fd62a5bd87f 100644--- a/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx+++ b/apps/docs/components/Navigation/NavigationMenu/HomeMenu.tsx@@ -109,6 +109,13 @@ const home = [level: 'reference_csharp',community: true,},+ {+ label: 'Swift',+ icon: '/img/icons/menu/reference-swift',+ href: '/reference/swift/introduction',+ level: 'reference_swift',+ community: true,+ },{label: 'Tools',},diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex f30bfec7b43..c341fc59620 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -28,6 +28,12 @@ export const REFERENCES: References = {versions: ['v0'],icon: '/docs/img/libraries/c-sharp-icon.svg',},+ swift: {+ name: 'Swift',+ library: 'supabase-swift',+ versions: ['v1'],+ icon: '/docs/img/libraries/swift-icon.svg',+ },cli: {name: 'CLI',library: undefined,@@ -910,6 +916,13 @@ export const reference = {items: [],icon: '/img/icons/menu/reference-python',},+ {+ name: 'supbase-swift',+ url: '/reference/swift/start',+ level: 'reference_swift',+ items: [],+ icon: '/img/icons/menu/reference-swift',+ },// {// name: 'supabase-python',// url: '/reference/python/start',@@ -981,6 +994,14 @@ export const reference_python_v2 = {parent: '/reference',}+export const reference_swift_v1 = {+ icon: 'reference-swift',+ title: 'swift',+ url: 'guides/reference/swift',+ parent: '/reference',+}++export const reference_cli = {icon: 'reference-cli',title: 'Supabase CLI',@@ -1081,6 +1102,13 @@ export const references = [icon: '/docs/img/icons/c-sharp-icon.svg',url: '/reference/csharp/start',},+ {+ label: 'supabase-swift',+ versions: ['v1'],+ description: 'something about the reference',+ icon: '/docs/img/icons/swift-icon.svg',+ url: '/reference/swift/start',+ },],},{diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsxindex 7b6aaf26a64..4dfbc2a99f8 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx@@ -15,6 +15,9 @@ import spec_dart_v0 from '~/../../spec/supabase_dart_v0.yml' assert { type: 'ymlimport spec_csharp_v0 from '~/../../spec/supabase_csharp_v0.yml' assert { type: 'yml' }// @ts-expect-errorimport spec_python_v2 from '~/../../spec/supabase_py_v2.yml' assert { type: 'yml' }+// @ts-expect-error+import spec_swift_v1 from '~/../../spec/supabase_swift_v1.yml' assert { type: 'yml' }+// import { gen_v3 } from '~/lib/refGenerator/helpers'import apiCommonSections from '~/../../spec/common-api-sections.json'@@ -54,6 +57,7 @@ export type RefIdOptions =| 'reference_dart_v1'| 'reference_csharp_v0'| 'reference_python_v2'+ | 'reference_swift_v1'| 'reference_cli'| 'reference_api'| 'reference_self_hosting_auth'@@ -65,6 +69,7 @@ export type RefKeyOptions =| 'dart'| 'csharp'| 'python'+ | 'swift'| 'cli'| 'api'| 'self-hosting-auth'@@ -132,10 +137,14 @@ const NavigationMenu = () => {case url.includes(`/docs/reference/csharp`) && url:menuState.setMenuLevelId('reference_csharp_v0')break- // puthon v2 (latest)+ // python v2 (latest)case url.includes(`/docs/reference/python`) && url:menuState.setMenuLevelId('reference_python_v2')break+ // swift v1 (latest)+ case url.includes(`/docs/reference/swift`) && url:+ menuState.setMenuLevelId('reference_swift_v1')+ breakcase url.includes(`/docs/reference/cli/config`) && url:menuState.setMenuLevelId('supabase_cli')break@@ -191,6 +200,7 @@ const NavigationMenu = () => {const isReference_Dart_V1 = 'reference_dart_v1' === levelconst isReference_Csharp_V0 = 'reference_csharp_v0' === levelconst isReference_Python_V2 = 'reference_python_v2' === level+ const isReference_Swift_V1 = 'reference_swift_v1' === levelconst isReference_Cli = 'reference_cli' === levelconst isReference_Api = 'reference_api' === levelconst isReference_Self_Hosting_Auth = 'reference_self_hosting_auth' === level@@ -254,7 +264,14 @@ const NavigationMenu = () => {lib="csharp"spec={spec_csharp_v0}/>-+ <NavigationMenuRefList+ key={'reference-swift-menu-v1'}+ id={'reference_swift_v1'}+ active={isReference_Swift_V1}+ commonSections={libCommonSections}+ lib="swift"+ spec={spec_swift_v1}+ /><NavigationMenuRefListkey={'reference-python-menu-v2'}id={'reference_python_v2'}diff --git a/apps/docs/docs/ref/swift/introduction.mdx b/apps/docs/docs/ref/swift/introduction.mdxnew file mode 100644index 00000000000..80dc3584bd1--- /dev/null+++ b/apps/docs/docs/ref/swift/introduction.mdx@@ -0,0 +1,29 @@+---+id: introduction+title: Introduction+hideTitle: true+---++<div className="flex items-start gap-6 not-prose" id="introduction">+ <img src="/docs/img/icons/menu/reference-swift.svg" className="w-8 h-8 rounded" />+ <div className="flex flex-col gap-2">+ <h1 className="text-3xl text-scale-1200 m-0">Swift Client Library</h1>+ <h2 className="text-base font-mono text-scale-1100">@supabase-community/supabase-swift</h2>+ </div>+</div>++<div className="max-w-xl">+This reference documents every object and method available in Supabase's Swift library, [supabase-swift](https://github.com/supabase-community/supabase-swift). You can use supabase-swift to interact with your Postgres database, listen to database changes, invoke Deno Edge Functions, build login and user management functionality, and manage large files.++We also provide a [supabase](https://pub.dev/packages/supabase) package for non-Swift projects.+</div>++<div className="max-w-xl bg-slate-300 px-4 py-2 rounded-md">+ <p>The Swift client library is created and maintained by the Supabase community, and is not an official library. Please be tolerant of areas where the library is still being developed, and — as with all the libraries — feel free to contribute wherever you find issues.</p>++<p>+ Huge thanks to official maintainer, [Maail](https://github.com/maail).+</p>++</div>+diff --git a/apps/docs/public/img/icons/menu/reference-swift light.svg b/apps/docs/public/img/icons/menu/reference-swift light.svgnew file mode 100644index 00000000000..8e3c04b8932--- /dev/null+++ b/apps/docs/public/img/icons/menu/reference-swift light.svg@@ -0,0 +1,2 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Swift icon</title><path d="M21.984 16.348c.056-.112.056-.224.112-.336 1.346-5.272-1.851-11.44-7.347-14.693 2.412 3.253 3.365 7.122 2.524 10.599-.056.28-.168.617-.28.897a5.173 5.173 0 0 1-.45-.28S11.104 9.17 5.273 3.282c-.169-.168 3.14 4.71 6.841 8.58-1.738-1.01-6.673-4.542-9.758-7.403.337.617.842 1.234 1.346 1.851 2.58 3.309 5.945 7.346 9.983 10.43-2.86 1.74-6.842 1.851-10.88 0-1.01-.448-1.85-1.009-2.804-1.682 1.682 2.636 4.318 5.048 7.459 6.337 3.757 1.627 7.57 1.515 10.318 0h.057c.112-.056.224-.112.336-.224 1.346-.673 3.982-1.402 5.44 1.402.392.785 1.121-2.86-1.626-6.225z"/></svg>\ No newline at end of filediff --git a/apps/docs/public/img/icons/menu/reference-swift.svg b/apps/docs/public/img/icons/menu/reference-swift.svgnew file mode 100644index 00000000000..8e3c04b8932--- /dev/null+++ b/apps/docs/public/img/icons/menu/reference-swift.svg@@ -0,0 +1,2 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Swift icon</title><path d="M21.984 16.348c.056-.112.056-.224.112-.336 1.346-5.272-1.851-11.44-7.347-14.693 2.412 3.253 3.365 7.122 2.524 10.599-.056.28-.168.617-.28.897a5.173 5.173 0 0 1-.45-.28S11.104 9.17 5.273 3.282c-.169-.168 3.14 4.71 6.841 8.58-1.738-1.01-6.673-4.542-9.758-7.403.337.617.842 1.234 1.346 1.851 2.58 3.309 5.945 7.346 9.983 10.43-2.86 1.74-6.842 1.851-10.88 0-1.01-.448-1.85-1.009-2.804-1.682 1.682 2.636 4.318 5.048 7.459 6.337 3.757 1.627 7.57 1.515 10.318 0h.057c.112-.056.224-.112.336-.224 1.346-.673 3.982-1.402 5.44 1.402.392.785 1.121-2.86-1.626-6.225z"/></svg>\ No newline at end of filediff --git a/apps/docs/public/img/icons/menu/swift.svg b/apps/docs/public/img/icons/menu/swift.svgnew file mode 100644index 00000000000..8e3c04b8932--- /dev/null+++ b/apps/docs/public/img/icons/menu/swift.svg@@ -0,0 +1,2 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Swift icon</title><path d="M21.984 16.348c.056-.112.056-.224.112-.336 1.346-5.272-1.851-11.44-7.347-14.693 2.412 3.253 3.365 7.122 2.524 10.599-.056.28-.168.617-.28.897a5.173 5.173 0 0 1-.45-.28S11.104 9.17 5.273 3.282c-.169-.168 3.14 4.71 6.841 8.58-1.738-1.01-6.673-4.542-9.758-7.403.337.617.842 1.234 1.346 1.851 2.58 3.309 5.945 7.346 9.983 10.43-2.86 1.74-6.842 1.851-10.88 0-1.01-.448-1.85-1.009-2.804-1.682 1.682 2.636 4.318 5.048 7.459 6.337 3.757 1.627 7.57 1.515 10.318 0h.057c.112-.056.224-.112.336-.224 1.346-.673 3.982-1.402 5.44 1.402.392.785 1.121-2.86-1.626-6.225z"/></svg>\ No newline at end of filediff --git a/apps/docs/public/img/icons/swift-icon.svg b/apps/docs/public/img/icons/swift-icon.svgnew file mode 100644index 00000000000..8e3c04b8932--- /dev/null+++ b/apps/docs/public/img/icons/swift-icon.svg@@ -0,0 +1,2 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Swift icon</title><path d="M21.984 16.348c.056-.112.056-.224.112-.336 1.346-5.272-1.851-11.44-7.347-14.693 2.412 3.253 3.365 7.122 2.524 10.599-.056.28-.168.617-.28.897a5.173 5.173 0 0 1-.45-.28S11.104 9.17 5.273 3.282c-.169-.168 3.14 4.71 6.841 8.58-1.738-1.01-6.673-4.542-9.758-7.403.337.617.842 1.234 1.346 1.851 2.58 3.309 5.945 7.346 9.983 10.43-2.86 1.74-6.842 1.851-10.88 0-1.01-.448-1.85-1.009-2.804-1.682 1.682 2.636 4.318 5.048 7.459 6.337 3.757 1.627 7.57 1.515 10.318 0h.057c.112-.056.224-.112.336-.224 1.346-.673 3.982-1.402 5.44 1.402.392.785 1.121-2.86-1.626-6.225z"/></svg>\ No newline at end of filediff --git a/spec/common-client-libs-sections.json b/spec/common-client-libs-sections.jsonindex b77ac83e9f2..6b14c2d3ffe 100644--- a/spec/common-client-libs-sections.json+++ b/spec/common-client-libs-sections.json@@ -13,7 +13,8 @@"excludes": ["reference_javascript_v1","reference_dart_v0",- "reference_python_v2"+ "reference_python_v2",+ "reference_swift_v1"]},{@@ -32,7 +33,8 @@"reference_dart_v0","reference_dart_v1","reference_python_v2",- "reference_csharp_v0"+ "reference_csharp_v0",+ "reference_swift_v1"]},{@@ -44,7 +46,8 @@"reference_javascript_v2","reference_dart_v1","reference_python_v2",- "reference_csharp_v0"+ "reference_csharp_v0",+ "reference_swift_v1"]},{@@ -869,4 +872,4 @@}]}-]\ No newline at end of file+]diff --git a/spec/supabase_swift_v1.yml b/spec/supabase_swift_v1.ymlnew file mode 100644index 00000000000..1ebe4b63a3e--- /dev/null+++ b/spec/supabase_swift_v1.yml@@ -0,0 +1,53 @@+openref: 0.1++info:+ id: reference/supabase-swift+ title: Supabase Swift Client+ description: |++ Supabase Swift.++ specUrl: https://github.com/supabase/supabase/edit/master/spec/supabase_swift_v2.yml+ slugPrefix: '/'+ libraries:+ - id: 'Swift'+ version: '0.0.1'++functions:+ - id: initializing+ title: 'Initializing'+ $ref: '@supabase/supabase-js.index.SupabaseClient.constructor'+ description: |+ You can initialize Supabase with the `SupabaseClient` by passing your `Project URL` and `Project Key`. You can find these under your `Project Settings` → `API Settings`+ 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+ let client = SupabaseClient(supabaseURL: "https://xyzcompany.supabase.co'", supabaseKey: "public-anon-key")+ ```++ - id: auth-api+ title: 'Overview'+ notes: |+ - The auth methods can be accessed via the Supabase GoTrue Auth client.+ examples:+ - id: create-auth-client+ name: Create auth client+ isSpotlight: true+ code: |+ ```js+ import { createClient } from '@supabase/supabase-js'++ const supabase = createClient(supabase_url, anon_key)+ ```+ - id: create-auth-client-server-side+ name: Create auth client (server-side)+ isSpotlight: false+ code: |+ ```swift+ let supabase = SupabaseClient(supabaseURL: "https://xyzcompany.supabase.co'", supabaseKey: "public-anon-key")+ let auth = supabase.auth+ ```