pocketbase_helpers library
Classes
- AppleClientSecret
- Response DTO of the Apple OAuth2 Client Secret response.
- AsyncAuthStore
- AsyncAuthStore is a pluggable AuthStore implementation that could be used with any external async persistent layer (shared_preferences, hive, local file, etc.).
- AuthAlertConfig
- Response DTO of a single collection auth alert config.
-
AuthHelper<
T extends Object> - A helper to do authentication operations on a collection.
- AuthMethodMFA
- Response DTO of mfa auth method option.
- AuthMethodOAuth2
- Response DTO of oauth2 auth method option.
- AuthMethodOTP
- Response DTO of otp auth method option.
- AuthMethodPassword
- Response DTO of password/identity auth method option.
- AuthMethodProvider
- Response DTO of a single OAuth2 provider.
- AuthMethodsList
- Response DTO of the allowed authentication methods.
- AuthStore
- Base authentication store management service that keep tracks of the authenticated User/Admin model and its token.
- AuthStoreEvent
- Event object that holds an AuthStore state.
- BackupFileInfo
- Response DTO of a backup file info entry.
- BackupService
- The service that handles the Backup and restore APIs.
-
BaseCrudService<
M extends Jsonable> - Base generic crud service that is intented to be used by all other crud services.
- BaseHelper
-
The
BaseHelperis a (slightly) more low level version of theCollectionHelperand also used byCollectionHelperinternally mainly usefull if your dart model and pocketbase collection do not map one to one or if it does not implementPocketBaseRecord. - BatchResult
- Response DTO of a single batch request result.
- BatchService
- The service that handles the Batch/transactional APIs.
- CollectionField
- Response DTO of a single collection schema field.
-
CollectionHelper<
T extends PocketBaseRecord> - A CollectionHelper is a class that helps you manage a specific collection. To see what a CollectionHelper can do, take a look at its methods. CollectionHelper expects the following arguments:
- CollectionModel
- Response DTO of a single collection model.
- CollectionService
- The service that handles the Collection APIs.
- ConfigurableOAuth2Provider
- Response DTO of a single configurable OAuth2 provider item.
- CronJob
- Response DTO of a cron job item.
- CronService
- The service that handles the Cron APIs.
- EmailTemplateConfig
- Response DTO of a single collection email template config.
-
FileHelper<
T extends Object> - A helper to do operations on a single file field.
- FileService
- The service that handles the File APIs.
- GeoPoint
- Typesafe class for the GeoPoint field.
- HealthCheck
- Response DTO of a health check.
- HealthService
- The service that handles the Health APIs.
- HelperUtils
- This class contains static helper functions that do not rely on the pocketbase instance.
- Jsonable
- Interface for JSON serializable classes.
- LogModel
- Response DTO of a single log model.
- LogService
- The service that handles the Log APIs.
- LogStat
- Response DTO of a single log statistic summary item.
- MFAConfig
- Response DTO of a single collection mfa auth config.
-
MultiFileHelper<
T extends Object> - Interface to interact with multi file fields
- OAuth2Config
- Response DTO of a single collection oauth2 auth config.
- OTPConfig
- Response DTO of a single collection otp auth config.
- OTPResponse
- Response DTO of a otp request response.
- PasswordAuthConfig
- Response DTO of a single collection password auth config.
- PocketBase
- The main PocketBase API client.
- PocketBaseConnection
- PocketBaseRecord
- The baseclass for all models that represent a pocketbase record. Extend your models with this class to use CollectionHelpers models, should be immutable
-
RealtimeHelper<
T extends Object> - A helper class that wraps the pocketbase realtime api with some powerfull new features.
- RealtimeService
- The service that handles the Realtime APIs.
- RecordAuth
- Response DTO of the record authentication data.
- RecordModel
- Response DTO of a single record model.
- RecordService
- The service that handles the Record APIs.
- RecordSubscriptionEvent
- Response DTO of a single realtime subscription event.
-
ResultList<
M extends Jsonable> - Response DTO of a generic paginated list.
- SettingsService
- The service that handles the Settings APIs.
-
SingleFileHelper<
T extends Object> - Interface to interact with single file fields
- SQLResult
- Response DTO of a SQL run request result.
- SQLService
- The service that handles the SQL APIs.
- SubBatchService
- TokenConfig
- Response DTO of a single collection token config.
-
TypedRecordSubscriptionEvent<
T extends Object> - A typed version of RecordSubscriptionEvent. Contains information related to the firing of a subscription event.
-
TypedResultList<
T> - A typed version of pocketbases ResultList
Enums
- AuthStatus
- Result of an authentication process.
- ChangeAction
Typedefs
-
ClearFunc
= Future<
void> Function() -
HelperHook
= Map<
String, dynamic> Function(String collection, PocketBase pb, Map<String, dynamic> map) - A hook that is used to intercept the raw create or update map before it is sent to the pocketbase server.
-
ListItemFactory<
M extends Jsonable> = M Function(Map< String, dynamic> item) -
The factory function (eg.
fromJson()) that will be used for a single item in a paginated list. - OAuth2URLCallbackFunc = void Function(Uri url)
- OTPAuthResult = ({String? otpId, AuthStatus status})
-
The result from an otp request, if
statusis ok, the otpId is provided throughotpId. -
RecordAuthResult<
T> = ({T? record, AuthStatus status, String? token}) -
The final result from an authentication flow, if
statusis ok, the authenticated record is provided throughrecord. -
RecordMapper<
T extends Object> = T Function(Map< String, dynamic> map) - A function that maps a record to an object
- RecordSubscriptionFunc = void Function(RecordSubscriptionEvent e)
- The definition of a realtime record subscription callback function.
-
SaveFunc
= Future<
void> Function(String data) - SubscriptionFunc = void Function(SseMessage e)
- The definition of a realtime subscription callback function.
-
UnsubscribeFunc
= Future<
void> Function()
Exceptions / Errors
- ClientException
- An exception caused by an error in the PocketBase client.