The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update kotlin docs
TheRealJan4c9c273049ae
diff --git a/spec/supabase_kt_v0.yml b/spec/supabase_kt_v0.ymlindex 8cd14d22ac3..1355528aa44 100644--- a/spec/supabase_kt_v0.yml+++ b/spec/supabase_kt_v0.yml@@ -2324,6 +2324,59 @@ functions:Available types are:- `OtpType.Phone.SMS`- `OtpType.Phone.PHONE_CHANGE`+ - id: send-password-reauthentication+ title: 'reauthenticate()'+ $ref: '@supabase/gotrue-js.GoTrueClient.reauthenticate'+ notes: |+ - This method is used together with `modifyUser()` when a user's password needs to be updated.+ - This method will send a nonce to the user's email. If the user doesn't have a confirmed email address, the method will send the nonce to the user's confirmed phone number instead.+ examples:+ - id: send-reauthentication-nonce+ name: Send reauthentication nonce+ description: Sends a reauthentication nonce to the user's email or phone number.+ isSpotlight: true+ code: |+ ```kotlin+ client.gotrue.reauthenticate()+ ```+ - id: resend-email-or-phone-otps+ title: 'resend()'+ $ref: '@supabase/gotrue-js.GoTrueClient.resend'+ notes: |+ - Resends a signup confirmation, email change or phone change email to the user.+ - Passwordless sign-ins can be resent by calling the `sendOtpTo()` method again.+ - Password recovery emails can be resent by calling the `sendRecoveryEmail()` method again.+ - This method will only resend an email or phone OTP to the user if there was an initial signup, email change or phone change request being made.+ examples:+ - id: resend-email-signup-confirmation+ name: Resend an email signup confirmation+ description: Resends the email signup confirmation to the user+ isSpotlight: true+ code: |+ ```kotlin+ client.gotrue.resendEmail(OtpType.Email.SIGNUP, "[email protected]")+ ```+ - id: resend-phone-signup-confirmation+ name: Resend a phone signup confirmation+ description: Resends the phone signup confirmation email to the user+ code: |+ ```kotlin+ client.gotrue.resendPhone(OtpType.Phone.SMS, "1234567890")+ ```+ - id: resend-email-change-email+ name: Resend email change email+ description: Resends the email change email to the user+ code: |+ ```kotlin+ client.gotrue.resendEmail(OtpType.Email.EMAIL_CHANGE, "[email protected]")+ ```+ - id: resend-phone-change+ name: Resend phone change OTP+ description: Resends the phone change OTP to the user+ code: |+ ```kotlin+ client.gotrue.resendPhone(OtpType.Phone.PHONE_CHANGE, "1234567890")+ ```- id: get-sessiontitle: 'Get current session'$ref: '@supabase/gotrue-js.GoTrueClient.getSession'@@ -2376,7 +2429,7 @@ functions:isSpotlight: falsecode: |```kotlin- val user = client.gotrue.modifyUser(Email) {+ val user = client.gotrue.modifyUser {email = "[email protected]"}```@@ -2385,7 +2438,7 @@ functions:isSpotlight: falsecode: |```kotlin- val user = client.gotrue.modifyUser(Email) {+ val user = client.gotrue.modifyUser {password = "secretPassword"}```@@ -2394,9 +2447,11 @@ functions:isSpotlight: truecode: |```kotlin- val user = client.gotrue.modifyUser(Email, buildJsonObject {- put("name", "John")- })+ val user = client.gotrue.modifyUser {+ data {+ put("name", "John")+ }+ }```- id: set-sessiontitle: 'importSession()'@@ -2487,6 +2542,27 @@ functions:```kotlinclient.gotrue.sendRecoveryEmail(email = "[email protected]")```+ - id: exchange-code-for-session+ title: 'exchangeCodeForSession()'+ $ref: '@supabase/gotrue-js.GoTrueClient.exchangeCodeForSession'+ notes: |+ - Used when `flowType` is set to `FlowType.PKCE` in the GoTrue configuration.+ examples:+ - id: exchange-auth-code+ name: Exchange Auth Code+ isSpotlight: true+ code: |+ ```kotlin+ client.gotrue.exchangeCodeForSession("34e770dd-9ff9-416c-87fa-43b31d7ef225")+ ```+ - id: auth-mfa-api+ title: 'Overview'+ notes: |+ This section contains methods commonly used for Multi-Factor Authentication (MFA) and are invoked behind the `supabase.gotrue.mfa` namespace.++ Currently, we only support time-based one-time password (TOTP) as the 2nd factor. We don't support recovery codes but we allow users to enroll more than 1 TOTP factor, with an upper limit of 10.++ Having a 2nd TOTP factor for recovery frees the user of the burden of having to store their recovery codes somewhere. It also reduces the attack surface since multiple recovery codes are usually generated compared to just having 1 backup TOTP factor.- id: mfa-enrolltitle: 'Enroll a factor'$ref: '@supabase/gotrue-js.GoTrueMFAApi.enroll'@@ -3259,6 +3335,26 @@ functions:fileSizeLimit = 5.megabytes}```+ - id: update-bucket+ title: updateBucket()+ $ref: '@supabase/storage-js.packages/StorageBucketApi.default.updateBucket'+ notes: |+ - RLS policy permissions required:+ - `buckets` table permissions: `select` and `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: |+ ```kotlin+ client.storage.updateBucket("cards") {+ public = false+ fileSizeLimit = 20.megabytes+ allowedMimeTypes(ContentType.Image.PNG, ContentType.Image.JPEG)+ }+ ```- id: empty-buckettitle: emptyBucket()@@ -3464,6 +3560,82 @@ functions:quality = 80}```+ - id: from-create-signed-urls+ title: from.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: |+ ```kotlin+ val urls = client.storage["avatars"].createSignedUrls(20.minutes, "avata1.jpg", "avatar2.jpg")+ ```+ - id: from-create-signed-upload-url+ title: from.createSignedUploadUrl()+ $ref: '@supabase/storage-js.packages/StorageFileApi.default.createSignedUploadUrl'+ 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+ examples:+ - id: create-signed-upload-url+ name: Create Signed Upload URL+ isSpotlight: true+ code: |+ ```kotlin+ val url = client.storage["avatars"].createSignedUploadUrl("avatar.png")+ ```+ - id: from-upload-to-signed-url+ title: from.uploadToSignedUrl()+ $ref: '@supabase/storage-js.packages/StorageFileApi.default.uploadToSignedUrl'+ notes: |+ - 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: upload-to-signed-url+ name: Upload to a signed URL+ isSpotlight: true+ code: |+ ```kotlin+ client.storage["avatars"].uploadToSignedUrl(path = "avatar.jpg", token = "token-from-createSignedUploadUrl", data = bytes)+ //or on JVM:+ client.storage["avatars"].uploadToSignedUrl(path = "avatar.jpg", token = "token-from-createSignedUploadUrl", file = File("avatar.jpg"))+ ```+ - id: from-get-public-url+ title: from.getPublicUrl()+ $ref: '@supabase/storage-js.packages/StorageFileApi.default.getPublicUrl'+ notes: |+ - The bucket needs to be set to public, either via [changePublicStatus()](/docs/reference/kotlin/storage-updatebucket) or by going to Storage on [app.supabase.com](https://supabase.com/dashboard), 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: |+ ```kotlin+ val url = client.storage["public-bucket"].publicUrl("folder/avatar1.png")+ ```+ - id: transform-asset-in-public-bucket+ name: Returns the URL for an asset in a public bucket with transformations+ isSpotlight: true+ code: |+ ```kotlin+ val url = client.storage["public-bucket"].publicRenderUrl("folder/avatar1.png") {+ size(100, 100)+ }+ ```+- id: from-downloadtitle: from.download()$ref: '@supabase/storage-js.packages/StorageFileApi.default.download'