Interface ISupabaseClient<TUser, TSession, TSocket, TChannel, TBucket, TFileObject>
- Namespace
- Supabase.Interfaces
- Assembly
- Supabase.dll
Contract for what a SupabaseClient should implement
public interface ISupabaseClient<TUser, TSession, TSocket, TChannel, TBucket, TFileObject> where TUser : User where TSession : Session where TSocket : IRealtimeSocket where TChannel : IRealtimeChannel where TBucket : Bucket where TFileObject : FileObject
Type Parameters
TUser
Model representing User
TSession
Model representing Session
TSocket
Class that conforms to IRealtimeSocket
TChannel
Class that conforms to IRealtimeChannel
TBucket
Model representing Bucket
TFileObject
Model representing FileObject
Properties
Auth
The Gotrue Auth Instance
IGotrueClient<TUser, TSession> Auth { get; set; }
Property Value
- IGotrueClient<TUser, TSession>
Functions
The Supabase Functions Client
IFunctionsClient Functions { get; set; }
Property Value
Postgrest
The Postgrest Client
IPostgrestClient Postgrest { get; set; }
Property Value
Realtime
The Realtime Client
IRealtimeClient<TSocket, TChannel> Realtime { get; set; }
Property Value
- IRealtimeClient<TSocket, TChannel>
Storage
The Storage Client
IStorageClient<TBucket, TFileObject> Storage { get; set; }
Property Value
- IStorageClient<TBucket, TFileObject>
Methods
AdminAuth(string)
Creates a Gotrue Admin Auth Client
IGotrueAdminClient<User> AdminAuth(string serviceKey)
Parameters
serviceKey
string
Returns
From<TModel>()
Used for interacting with a Postgrest Table + Model. Provides helpers to be able to add realtime listeners and queries.
ISupabaseTable<TModel, TChannel> From<TModel>() where TModel : BaseModel, new()
Returns
- ISupabaseTable<TModel, TChannel>
Type Parameters
TModel
InitializeAsync()
Initializes a supabase client according to the provided SupabaseOptions. If option is enabled:
- Will connect to realtime instance AutoConnectRealtime
- Will restore session using a IGotrueSessionPersistence<TSession> specified in SessionHandler
Task<ISupabaseClient<TUser, TSession, TSocket, TChannel, TBucket, TFileObject>> InitializeAsync()
Returns
- Task<ISupabaseClient<TUser, TSession, TSocket, TChannel, TBucket, TFileObject>>
Rpc(string, object?)
Perform a stored procedure call.
Task<BaseResponse> Rpc(string procedureName, object? parameters)
Parameters
procedureName
stringThe function name to call
parameters
objectThe parameters to pass to the function call
Returns
Rpc<TModeledResponse>(string, object?)
Perform a stored procedure call.
Task<TModeledResponse?> Rpc<TModeledResponse>(string procedureName, object? parameters)
Parameters
procedureName
stringThe function name to call
parameters
objectThe parameters to pass to the function call
Returns
- Task<TModeledResponse>
A hydrated model
Type Parameters
TModeledResponse
A type used for hydrating the HTTP response content (hydration through JSON.NET)