The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
adds generated docs mdx
Alaister Youngf70ea2ce328d
diff --git a/apps/reference/_supabase_js/generated/delete.mdx b/apps/reference/_supabase_js/generated/delete.mdxindex 8d1dc12e22e..0c662e4be66 100644--- a/apps/reference/_supabase_js/generated/delete.mdx+++ b/apps/reference/_supabase_js/generated/delete.mdx@@ -60,6 +60,10 @@ Count algorithm to use to count rows in a table.</div>+<ul className="method-list-group">+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>+</ul>+</li><li className="method-list-item">@@ -80,10 +84,6 @@ Rollback the operation</div>-<ul className="method-list-group">- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>-</ul>-</li></ul>diff --git a/apps/reference/_supabase_js/generated/insert.mdx b/apps/reference/_supabase_js/generated/insert.mdxindex e2f31cb8904..883e5875542 100644--- a/apps/reference/_supabase_js/generated/insert.mdx+++ b/apps/reference/_supabase_js/generated/insert.mdx@@ -83,6 +83,10 @@ Count algorithm to use to count rows in a table.</div>+<ul className="method-list-group">+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>+</ul>+</li><li className="method-list-item">@@ -103,10 +107,6 @@ Rollback the operation</div>-<ul className="method-list-group">- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>-</ul>-</li></ul>@@ -115,12 +115,6 @@ Rollback the operation</ul>-## Notes--- By default, every time you run `insert()`, the client library will make a `select` to return the full record.- This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation.- If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`.-## Examples### Create a record@@ -131,6 +125,15 @@ const { data, error } = await supabase.insert([{ name: 'The Shire', country_id: 554 }])```+### Create a record and return it++```js+const { data, error } = await supabase+ .from('cities')+ .insert([{ name: 'The Shire', country_id: 554 }])+ .select()+```+### Bulk createWhen running a bulk create, the operation is handled in a single transaction. If any of the inserts fail, all other operations are@@ -142,22 +145,3 @@ const { data, error } = await supabase.from('cities').insert([{ name: 'Rohan', country_id: 555 },])```--### Upsert--For upsert, if set to true, primary key columns would need to be included-in the data parameter in order for an update to properly happen. Also, primary keys-used must be natural, not surrogate. There are however,-[workarounds](https://github.com/PostgREST/postgrest/issues/1118)-for surrogate primary keys.--```js-const { data, error } = await supabase.from('cities').insert(- [- { name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 555 },- { name: 'City by the Bay', country_id: 840 },- ],- { upsert: true }-)-```diff --git a/apps/reference/_supabase_js/generated/invoke.mdx b/apps/reference/_supabase_js/generated/invoke.mdxindex 9b359f6538c..06f9f02f14a 100644--- a/apps/reference/_supabase_js/generated/invoke.mdx+++ b/apps/reference/_supabase_js/generated/invoke.mdx@@ -137,7 +137,7 @@ const { data: user, error } = await supabase.functions.invoke('hello', {})```-### Parsing custom headers.+### Passing custom headers.You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT.diff --git a/apps/reference/_supabase_js/generated/storage-from-createsignedurl.mdx b/apps/reference/_supabase_js/generated/storage-from-createsignedurl.mdxindex 93438369bf0..c55a9e34c6d 100644--- a/apps/reference/_supabase_js/generated/storage-from-createsignedurl.mdx+++ b/apps/reference/_supabase_js/generated/storage-from-createsignedurl.mdx@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'Create signed URL to download file without requiring permissions. This URL can be valid for a set number of seconds.```js-const { signedURL, error } = await supabase.storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)```@@ -73,7 +73,7 @@ The number of seconds until the signed URL expires. For example, `60` for a URL### Create Signed URL```js-const { signedURL, error } = await supabase.storage+const { data, error } = await supabase.storage.from('avatars').createSignedUrl('folder/avatar1.png', 60)```diff --git a/apps/reference/_supabase_js/generated/storage-from-getpublicurl.mdx b/apps/reference/_supabase_js/generated/storage-from-getpublicurl.mdxindex 0d424656016..1d6ea4b248c 100644--- a/apps/reference/_supabase_js/generated/storage-from-getpublicurl.mdx+++ b/apps/reference/_supabase_js/generated/storage-from-getpublicurl.mdx@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'Retrieve URLs for assets in public buckets and encapsulates it in a return object```js-const { publicURL, error } = supabase.storage+const { data, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')```@@ -54,7 +54,7 @@ The file path to be downloaded, including the path and file name. For example `f### Returns the URL for an asset in a public bucket```js-const { publicURL, error } = supabase.storage+const { data, error } = supabase.storage.from('public-bucket').getPublicUrl('folder/avatar1.png')```diff --git a/apps/reference/_supabase_js/generated/update.mdx b/apps/reference/_supabase_js/generated/update.mdxindex 50618457898..1a9810af163 100644--- a/apps/reference/_supabase_js/generated/update.mdx+++ b/apps/reference/_supabase_js/generated/update.mdx@@ -80,6 +80,10 @@ Count algorithm to use to count rows in a table.</div>+<ul className="method-list-group">+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>+</ul>+</li><li className="method-list-item">@@ -100,10 +104,6 @@ Rollback the operation</div>-<ul className="method-list-group">- <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>-</ul>-</li></ul>@@ -132,7 +132,7 @@ const { data, error } = await supabasePostgres offers a[number of operators](https://www.postgresql.org/docs/current/functions-json.html)for working with JSON data. Right now it is only possible to update an entire JSON document,-but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys.+but we are [working on ideas](https://github.com/PostgREST/postgrest/issues/465) for updating individual keys. For example:```jsconst { data, error } = await supabase