The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Revert API docs snippets changes
Joshen Limc8aae043b641
diff --git a/studio/components/interfaces/Docs/Snippets.ts b/studio/components/interfaces/Docs/Snippets.tsindex e8d6e8d676b..44aa501ec92 100644--- a/studio/components/interfaces/Docs/Snippets.ts+++ b/studio/components/interfaces/Docs/Snippets.ts@@ -56,27 +56,28 @@ Future<void> main() async {}`,},}),- authKey: (title: string, varName: string, apiKey: string) => ({+ authKey: (title: string, varName: string, apikey: string) => ({title: `${title}`,bash: {language: 'bash',- code: `${apiKey}`,+ code: `${apikey}`,},js: {language: 'js',- code: `const ${varName} = '${apiKey}'`,+ code: `const ${varName} = '${apikey}'`,},}),authKeyExample: (defaultApiKey: string,endpoint: string,- { keyName, showBearer = true }: { keyName?: string; showBearer?: boolean }+ { keyName, showBearer = true }: { keyName: string; showBearer: boolean }) => ({title: 'Example usage',bash: {language: 'bash',code: `-curl '${endpoint}/rest/v1/' ${+curl '${endpoint}/rest/v1/' \\+-H "apikey: ${defaultApiKey}" ${showBearer? `\\-H "Authorization: Bearer ${defaultApiKey}"`@@ -125,7 +126,8 @@ const supabase = createClient(SUPABASE_URL, process.env.${keyName || 'SUPABASE_Klanguage: 'bash',code: `curl -X POST '${endpoint}/rest/v1/rpc/${rpcName}' \\${bashParams}--H "Content-Type: application/json" ${+-H "Content-Type: application/json" \\+-H "apikey: ${apiKey}" ${showBearer? `\\-H "Authorization: Bearer ${apiKey}"`@@ -251,6 +253,7 @@ const ${listenerName} = supabase.channel('custom-filter-channel')language: 'bash',code: `curl '${endpoint}/rest/v1/${resourceId}?select=*' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}"`,},@@ -281,6 +284,7 @@ let { data: ${resourceId}, error } = await supabaselanguage: 'bash',code: `curl '${endpoint}/rest/v1/${resourceId}?select=${columnName}' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}"`,},@@ -299,6 +303,7 @@ let { data: ${resourceId}, error } = await supabaselanguage: 'bash',code: `curl '${endpoint}/rest/v1/${resourceId}?select=some_column,other_table(foreign_key)' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}"`,},@@ -322,6 +327,7 @@ let { data: ${resourceId}, error } = await supabaselanguage: 'bash',code: `curl '${endpoint}/rest/v1/${resourceId}?select=*' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Range: 0-9"`,@@ -342,6 +348,7 @@ let { data: ${resourceId}, error } = await supabaselanguage: 'bash',code: `curl '${endpoint}/rest/v1/${resourceId}?id=eq.1&select=*' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Range: 0-9"`,@@ -378,6 +385,7 @@ let { data: ${resourceId}, error } = await supabaselanguage: 'bash',code: `curl -X POST '${endpoint}/rest/v1/${resourceId}' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Content-Type: application/json" \\-H "Prefer: return=minimal" \\@@ -402,6 +410,7 @@ const { data, error } = await supabaselanguage: 'bash',code: `curl -X POST '${endpoint}/rest/v1/${resourceId}' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Content-Type: application/json" \\-d '[{ "some_column": "someValue" }, { "other_column": "otherValue" }]'@@ -426,6 +435,7 @@ const { data, error } = await supabaselanguage: 'bash',code: `curl -X POST '${endpoint}/rest/v1/${resourceId}' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Content-Type: application/json" \\-H "Prefer: resolution=merge-duplicates" \\@@ -448,6 +458,7 @@ const { data, error } = await supabaselanguage: 'bash',code: `curl -X PATCH '${endpoint}/rest/v1/${resourceId}?some_column=eq.someValue' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Content-Type: application/json" \\-H "Prefer: return=minimal" \\@@ -471,6 +482,7 @@ const { data, error } = await supabaselanguage: 'bash',code: `curl -X DELETE '${endpoint}/rest/v1/${resourceId}?some_column=eq.someValue' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}"`,},@@ -490,6 +502,7 @@ const { error } = await supabaselanguage: 'bash',code: `curl -X POST '${endpoint}/auth/v1/signup' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"email": "[email protected]",@@ -513,6 +526,7 @@ let { data, error } = await supabase.auth.signUp({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/token?grant_type=password' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"email": "[email protected]",@@ -536,6 +550,7 @@ let { data, error } = await supabase.auth.signInWithPassword({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/magiclink' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"email": "[email protected]"@@ -557,6 +572,7 @@ let { data, error } = await supabase.auth.signInWithOtp({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/signup' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"phone": "+13334445555",@@ -580,6 +596,7 @@ let { data, error } = await supabase.auth.signUp({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/otp' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"phone": "+13334445555"@@ -601,6 +618,7 @@ let { data, error } = await supabase.auth.signInWithOtp({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/verify' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"type": "sms",@@ -626,6 +644,7 @@ let { data, error } = await supabase.auth.verifyOtp({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/invite' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer ${apiKey}" \\-H "Content-Type: application/json" \\-d '{@@ -661,6 +680,7 @@ let { data, error } = await supabase.auth.signInWithOAuth({language: 'bash',code: `curl -X GET '${endpoint}/auth/v1/user' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer USER_TOKEN"`,},@@ -677,6 +697,7 @@ const { data: { user } } = await supabase.auth.getUser()language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/recover' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-d '{"email": "[email protected]"@@ -696,6 +717,7 @@ let { data, error } = await supabase.auth.resetPasswordForEmail(email)language: 'bash',code: `curl -X PUT '${endpoint}/auth/v1/user' \\+-H "apikey: ${apiKey}" \\-H "Authorization: Bearer <USERS-ACCESS-TOKEN>" \\-H "Content-Type: application/json" \\-d '{@@ -724,6 +746,7 @@ const { data, error } = await supabase.auth.updateUser({language: 'bash',code: `curl -X POST '${endpoint}/auth/v1/logout' \\+-H "apikey: ${apiKey}" \\-H "Content-Type: application/json" \\-H "Authorization: Bearer USER_TOKEN"`,