Bot releases are hidden (Show)
Published by jan-tennert over 1 year ago
client.gotrue.loginWith(SSO.withProvider("providerId"))
client.gotrue.loginWith(SSO.withDomain("domain"))
Works same as oauth, deeplinking used for mobile and http callback server on desktopGoTrue#retrieveSSOUrl(type)
//change the login flow to PKCE in the GoTrue configuration
val client = createSupabaseClient(url, key) {
install(GoTrue) {
flowType = FlowType.PKCE
}
}
Note: You can customize the way the code verifiers get saved in the GoTrue config
GoTrue#exchangeCodeForSession(code)
GoTrue#parseFragmentAndImportSession(fragment)
, so you don't have to parse all this by yourself when using a custom OAuth implementationGoTrue#oAuthUrl(provider)
, to easily get the oauth url when using a custom implementationscopes
& queryParams
properties to OAuth configuration:
client.gotrue.loginWith(Google) {
scopes.add("email")
queryParams["key"] = "value"
}
providerToken
& providerRefreshToken
(tag is pointing to the wrong branch, the right one would be development)
Published by jan-tennert over 1 year ago
RealtimeChannel#track
not sending the payload correctlyPublished by jan-tennert over 1 year ago
ByteReadChannel
/ByteWriteChannel
instead of a ByteArrayJOINED
when not listening for postgres changesStorage#get
or Storage#from
, the StorageApi
instances are now cachedPublished by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
0.9.2 introduces new experimental methods I originally planned for 0.9.0, but they took a little bit longer:
BucketApi#upload(path, uri)
, BucketApi#uploadAsFlow(path, uri)
, BucketApi#update(path, uri)
, BucketApi#updateAsFlow(path, uri)
, BucketApi#uploadToSignedUrl(path, uri)
, BucketApi#uploadToSignedUrl(path, uri)
(make sure your app has access to them)Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
Add experimental support for IOS (#53)
Add new Troubleshooting page in the Wiki
Fix functions-kt using gotrue as it's namespace
Use actual error message from Storage HTTP request by @jollygreenegiant in https://github.com/supabase-community/supabase-kt/pull/92
Add new 'upsert' parameter to upload/update functions by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/93
Introduce experimental flow variants for uploading and downloading files in storage by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/90
Add new methods to ImageTransformation
: cover
, fill
, contain
, size
Add new Storage LW7 features: (untested, see PR)
More options when creating a bucket (& move public to builder): (Breaking if using public)
client.storage.createBucket("test", "test") {
public = true
fileSizeLimit = 1000000.kilobytes
allowedMimeTypes(ContentType.Image.PNG, ContentType.Image.JPEG)
}
Create presigned urls for upload images:
val signedUrl = client.storage["test"].createUploadSignedUrl("test.txt")
println(signedUrl.url)
client.storage["test"].uploadToSignedUrl(
path = "test.txt",
token = signedUrl.token,
data = File("mydata.txt").readBytes()
)
New image transformation options:
client.storage["icons"].downloadPublic("icon.png") {
width = 100
height = 100
format = "origin" //image format
resize = ImageTransformation.Resize.FILL
quality = 40 //image quality
}
Improve select syntax for postgrest (#87)
You can now restrict the columns you want to receive using the Columns
value class:
//user class
@Serializable
data class User(val id: String, val name: String)
client.postgrest["table"].select(Columns.list(columns)).decodeSingle<User>()
//or
client.postgrest["table"].select(Columns.list("id", "name")).decodeSingle<User>()
//or
client.postgrest["table"].select(Columns.type<User>()).decodeSingle<User>() //uses the class properties serial names as column restriction
//defaults to Columns.ALL
client.postgrest["table"].select().decodeSingle<User>()
Improve exceptions
Make Identity#lastSignInAt optional
Fix various documentation issues
Various dependency updates, see pre-releases for full list
Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
ContentType
for BucketBuilder#allowedMimeTypes instead of String
ImageTransformation
: cover
, fill
, contain
, size
StorageApi#uploadToSignedUrl
implementationPublished by jan-tennert over 1 year ago
Add 'None' PropertyConversionMethod
Throw an error when SERIAL_NAME
PropertyConversionMethod is used on IOS/JS
Add new Storage LW7 features: (untested, see PR)
More options when creating a bucket (& move public to builder): (Breaking if using public)
client.storage.createBucket("test", "test") {
public = true
fileSizeLimit = 1000000.kilobytes
allowedMimeTypes("image/png", "image/jpeg")
}
Create presigned urls for upload images:
val signedUrl = client.storage["test"].createUploadSignedUrl("test.txt")
println(signedUrl.url)
client.storage["test"].uploadToSignedUrl(
path = "test.txt",
token = signedUrl.token,
data = File("mydata.txt").readBytes()
)
New image transformation options:
client.storage["icons"].downloadPublic("icon.png") {
width = 100
height = 100
format = "origin" //image format
resize = ImageTransformation.Resize.FILL
quality = 40 //image quality
}
Add new Troubleshooting page in the Wiki
Published by jan-tennert over 1 year ago
Columns
value class:
//user class
@Serializable
data class User(val id: String, val name: String)
client.postgrest["table"].select(Columns.list(columns)).decodeSingle<User>()
//or
client.postgrest["table"].select(Columns.list("id", "name")).decodeSingle<User>()
//or
client.postgrest["table"].select(Columns.type<User>()).decodeSingle<User>() //uses the class properties serial names as column restriction
//defaults to Columns.ALL
client.postgrest["table"].select().decodeSingle<User>()
Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
Add new json
function property to PostgrestBuilder#insert
and PostgrestBuilder#update
(to customize Json encoding)
Add new PostgrestBuilder#update
overload to use an DTO instead of the DSL:
client.postgrest["test"].update(SomeData(2)) {
eq("id", 2)
}
Add new overloads to PostgrestFilterBuilder: sl (rangeLt), sr (rangeGt), nxr (rangeLte), nxl (rangeGte)
Add new methods to PostgrestFilterBuilder: cs/contains, cd/contained, ov/overlaps
Change value
type of PostgrestFilterBuilder methods sl, sr, nxl, nxr
to LongRange
instead of String
Add new config property propertyConversionMethod
to Postgrest
:
You can now specify which method postgrest-kt should use to convert a property to a column name:
If you have this data class:
@Serializable
data class Test(
@SerialName("some_property") val someProperty: String
)
And want to use this syntax:
client.postgrest["table"].select {
Test::someProperty eq "test"
}
you can now specify how someProperty
gets converted to a column name in the Postgrest config:
val client = createSupabaseClient(url, key) {
install(Postgrest) {
propertyConversionMethod = PropertyConversionMethod.SERIAL_NAME //only works for JVM/Android
//or
propertyConverisonMethod = PropertyConversionMethod.CAMEL_CASE_TO_SNAKE_CASE //works for all platforms
//or write your own (defaults to CAMEL_CASE_TO_SNAKE_CASE
}
}
depending on the method the resulting column name will either be the @SerialName
value or the property name just gets converted to snake case.
Note: same works for the update DSL
Make values in PostgrestUpdate
nullable
Add Postgrest Tests
Remove deprecated methods in Storage
Remove experimental annotations
Published by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
PostgrestResult#count()
PostgrestResult#range()
Storage#getAllBuckets()
- use retrieveBuckets()
insteadStorage#getBucket()
- use retrieveBucketById()
insteadPublished by jan-tennert over 1 year ago
Published by jan-tennert over 1 year ago
Full Changelog: https://github.com/supabase-community/supabase-kt/compare/0.8.2...0.8.3
Published by jan-tennert over 1 year ago