Package-level declarations
Types
Link copied to clipboard
data class AuthenticatedApiConfig(val context: AuthenticatedApiConfig.Context, val auth: AuthenticatedApiConfig.Auth, val request: AuthenticatedApiConfig.Request = Request())
Link copied to clipboard
class AuthenticatedSupabaseApi(httpClient: SupabaseHttpClient, val config: AuthenticatedApiConfig) : SupabaseApi
Link copied to clipboard
resolve returns the current access token to be used in the request
Functions
Link copied to clipboard
fun <C : MainConfig, AuthDependentPluginConfig> SupabaseClient.authenticatedSupabaseApi(plugin: MainPlugin<C>, requireSession: Boolean = plugin.config.requireValidSession, configure: AuthenticatedApiConfig.Builder.() -> Unit): AuthenticatedSupabaseApi
fun <C : MainConfig, AuthDependentPluginConfig> SupabaseClient.authenticatedSupabaseApi(plugin: MainPlugin<C>, defaultRequest: HttpRequestBuilder.() -> Unit? = null, requireSession: Boolean = plugin.config.requireValidSession, urlLengthLimit: Int? = null): AuthenticatedSupabaseApi
Creates a AuthenticatedSupabaseApi for the given plugin. Requires Auth to authenticate requests. All requests will be resolved using the MainPlugin.resolveUrl function.
fun SupabaseClient.authenticatedSupabaseApi(resolveUrl: (path: String) -> String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null, config: AuthenticatedApiConfig): AuthenticatedSupabaseApi
fun SupabaseClient.authenticatedSupabaseApi(resolveUrl: (path: String) -> String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null, requireSession: Boolean, configure: AuthenticatedApiConfig.Builder.() -> Unit): AuthenticatedSupabaseApi
Creates a AuthenticatedSupabaseApi with the given resolveUrl function. Requires Auth to authenticate requests. All requests will be resolved using this function.
fun SupabaseClient.authenticatedSupabaseApi(baseUrl: String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null, config: AuthenticatedApiConfig): AuthenticatedSupabaseApi
fun SupabaseClient.authenticatedSupabaseApi(baseUrl: String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null, requireSession: Boolean, configure: AuthenticatedApiConfig.Builder.() -> Unit): AuthenticatedSupabaseApi
Creates a AuthenticatedSupabaseApi with the given baseUrl. Requires Auth to authenticate requests. All requests will be resolved relative to this url.