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
TUserModel representing User
TSessionModel representing Session
TSocketClass that conforms to IRealtimeSocket
TChannelClass that conforms to IRealtimeChannel
TBucketModel representing Bucket
TFileObjectModel 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
serviceKeystring
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
procedureNamestringThe function name to call
parametersobjectThe 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
procedureNamestringThe function name to call
parametersobjectThe parameters to pass to the function call
Returns
- Task<TModeledResponse>
A hydrated model
Type Parameters
TModeledResponseA type used for hydrating the HTTP response content (hydration through JSON.NET)