Modules

BaseModule

Declared In:
lib/modules/base/base_module.dart

Declaration:

class BaseModule



Settings

Declared In:
lib/modules/notifications/settings_impl.dart

Declaration:

class SettingsImpl

Properties:

Property Type Description
sdk GeneralSettings General settings - This group contains options related to the general functioning of mobile SDK
notifications NotificationsSettings Notifications settings - This group contains options related to push notifications
tracker TrackerSettings Tracker - This group contains options related to tracking the customer activities in a mobile application
inAppMessaging InAppMessagingSettings In-app messaging - This group contains options related to the in-app messages feature
injector InjectorSettings Injector - This group contains options related to displaying campaigns

Note:
Learn more about settings here



Notifications

Declared In:
lib/modules/notifications/notifications_impl.dart

Declaration:

class NotificationsImpl

Listeners:
NotificationsListener

Methods:

This method passes the Firebase Token to Synerise for notifications.

Future<void> registerForNotifications(String registrationToken, {bool? mobileAgreement, required void Function() onSuccess, required void Function(SyneriseError error) onError})
(Click for more details)


This method handles a notification payload and starts activity.

Future<bool> handleNotification(Map notification) async
(Click for more details)


This method handles a notification payload with a user interaction and starts activity.

Future<bool> handleNotificationClick(Map notification) async
(Click for more details)


This method verifies if a notification was sent by Synerise.

Future<bool> isSyneriseNotification(Map notification) async
(Click for more details)


This method verifies if a notification’s sender is Synerise and if the notification is a Simple Push campaign

Future<bool> isSyneriseSimplePush(Map notification) async
(Click for more details)


This method verifies if a notification’s sender is Synerise and if the notification is a Banner campaign.

Future<bool> isSyneriseBanner(Map notification) async
(Click for more details) - REMOVED in version 2.0.0


This method verifies if a notification’s sender is Synerise and if the notification is a Silent Command.

Future<bool> isSilentCommand(Map notification) async
(Click for more details)


This method verifies if a notification’s sender is Synerise and if the notification is a Silent SDK Command.

Future<bool> isSilentSDKCommand(Map notification) async
(Click for more details)



Client

Declared In:
lib/modules/client/client_impl.dart

Related To:
ClientAccountRegisterContext
ClientIdentityProvider
ClientAuthContext
ClientAccountInformation
ClientAccountUpdateContext
ClientConditionalAuthResult
ClientConditionalAuthenticationContext
ClientAuthenticationContext
ClientPasswordResetRequestContext
ClientPasswordResetConfirmationContext Token

Inherits From:
BaseModule

Declaration:

class ClientImpl extends BaseModule 

Methods:

This method registers a new customer with an email, password, and optional data.

Future<void> registerAccount(ClientAccountRegisterContext context, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method confirms a customer account with the confirmation token.

Future<void> confirmAccountActivation(String token, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method activates a customer with email.

Future<void> requestAccountActivation(String email, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method requests a customer’s account registration process with the PIN code.

Future<void> requestAccountActivationByPin(String email, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method confirms a customer’s account registration process with the PIN code.

Future<void> confirmAccountActivationByPin(String email, String pinCode, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.

Future<void> signIn(String email, String password, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.

Future<void> signInConditionally(String email, String password, {required void Function(ClientConditionalAuthResult) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.

Future<void> authenticate(ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString, {required void Function(bool) onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.

Future<void> authenticateConditionally(ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString, {String? authID, required void Function(ClientConditionalAuthResult) onSuccess, required void Function(SyneriseError) onError}) async 
(Click for more details)


This method authenticates a customer with Simple Authentication.

Future<void> simpleAuthentication(ClientSimpleAuthenticationData data, String authID, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method checks if a customer is signed in (via Synerise Authentication - RaaS, OAuth, Facebook, Apple).

Future<bool> isSignedIn() async
(Click for more details)


This method checks if a customer is signed in (via Simple Authentication).

Future<bool> isSignedInViaSimpleAuthentication() async
(Click for more details)


This method signs out a customer out.

Future<void> signOut() async
(Click for more details)


This method signs out a customer out with a chosen mode and Determines if the method should sign out all devices

Future<void> signOutWithMode(ClientSignOutMode mode, bool fromAllDevices, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method refreshes the customer’s current token.

Future<void> refreshToken({required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method retrieves the customer’s current, active token.

Future<void> retrieveToken({required void Function(Token) onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method retrieves the customer’s current UUID.

Future<String> getUUID() async
(Click for more details)


This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.

Future<void> regenerateUUID() async
(Click for more details)


This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.

Future<void> regenerateUUIDWithClientIdentifier(String clientIdentifier) async
(Click for more details)


This method destroys the session completely.

Future<void> destroySession({required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method gets a customer’s account information.

Future<void> getAccount({required void Function(ClientAccountInformation) onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method updates a customer’s account’s basic information (without identification data: uuid, customId, email).

Future<void> updateAccountBasicInformation(ClientAccountUpdateBasicInformationContext context, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method updates a customer’s account information.

Future<void> updateAccount(ClientAccountUpdateContext context, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method requests a customer’s password reset with email.

Future<void> requestPasswordReset(String email, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method confirm a customer’s password reset with the new password and token provided by password reset request.

Future<void> confirmPasswordReset(String password, String token, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method changes a customer’s password.

Future<void> changePassword(String oldPassword, String newPassword, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method requests a customer’s email change.

Future<void> requestEmailChange(String email, String password, {String? externalToken, String? authID, required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method confirms an email change.

Future<void> confirmEmailChange(String token, bool newsletterAgreement, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async 
(Click for more details)


Requests a customer’s phone update. A confirmation code is sent to the phone number.

Future<void> requestPhoneUpdate(String phone, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method confirms a phone number update. This action requires the new phone number and confirmation code as parameters.

Future<void> confirmPhoneUpdate(String phone, String confirmationCode, bool smsAgreement, {required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)


This method deletes a customer’s account.

Future<void> deleteAccount(String clientAuthFactor, IdentityProvider identityProvider, {String? authId, required void Function() onSuccess, required void Function(SyneriseError) onError}) async
(Click for more details)




Tracker

Declared In:
lib/modules/tracker/tracker_impl.dart

Related To:
Event
CustomEvent

Inherits From:
BaseModule

Declaration:

class TrackerImpl extends BaseModule

Methods:

This method sets a custom identifier in the parameters of every event.

Future<void> setCustomIdentifier(String customIdentifier) async
(Click for more details)


This method sets a custom email in the parameters of every event.

Future<void> setCustomEmail(String customEmail) async
(Click for more details)


This method sends an event.

Future<void> send(Event event) async
(Click for more details)


This method forces sending the events from the queue to the server.

Future<void> flush() async
(Click for more details)



Injector

Declared In:
lib/modules/injector/injector_impl.dart

Inherits From:
BaseModule

Declaration:

class InjectorImpl extends BaseModule

Listeners:
InjectorListener
InjectorInAppMessageListener

Methods:

This method fetches a walkthrough.

void getWalkthrough() async
(Click for more details) - REMOVED in version 2.0.0


This method shows a walkthrough when it is loaded.

void showWalkthrough() async
(Click for more details)- REMOVED in version 2.0.0


This method checks if a walkthrough is loaded.

Future<bool> isWalkthroughLoaded() async
(Click for more details)- REMOVED in version 2.0.0


This method checks if the walkthrough is unique compared to the previous one.

Future<bool> isLoadedWalkthroughUnique() async
(Click for more details)- REMOVED in version 2.0.0



Promotions

The module for handling promotions and vouchers from Synerise SDK.

Declared In:
lib/modules/promotions/promotions_impl.dart

Related To:
PromotionResponse
Promotion
AssignVoucherResponse
VoucherCodesResponse

Inherits From:
Module

Declaration:

class PromotionsImpl extends BaseModule

Methods:

This method retrieves all available promotions that are defined for a customer.

Future<void> getAllPromotions({required void Function(PromotionResponse promotionResponse) onSuccess, required void Function(SyneriseError error) onError}) async 
(Click for more details)


This method retrieves promotions that match the parameters defined in an API query.

Future<void> getPromotions(PromotionsApiQuery apiQuery, {required void Function(PromotionResponse promotionResponse) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method retrieves the promotion with the specified UUID.

Future<void> getPromotionByUUID(String uuid, {required void Function(Promotion promotion) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method retrieves the promotion with the specified code.

Future<void> getPromotionByCode(String code, {required void Function(Promotion promotion) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method activates the promotion with the specified UUID.

Future<void> activatePromotionByUUID(String uuid, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method activates the promotion with the specified code.

Future<void> activatePromotionByCode(String code, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method activates promotions with a code or with UUID in a batch.

Future<void> activatePromotionsBatch(List<PromotionIdentifier> promotionsToActivate, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method deactivates the promotion with the specified UUID.

Future<void> deactivatePromotionByUUID(String uuid, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method deactivates the promotion with the specified code.

Future<void> deactivatePromotionByCode(String code, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method deactivates promotions with a code or with UUID in a batch.

Future<void> deactivatePromotionsBatch(List<PromotionIdentifier> promotionsToDeactivate, {required void Function() onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method retrieves an assigned voucher code or assigns a voucher from a pool identified by UUID to the profile.

When the voucher is assigned for the first time, a voucherCode.assigned event is produced.

Future<void> getOrAssignVoucher(String poolUuid, {required void Function(AssignVoucherResponse assignVoucherResponse) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method assigns a voucher from a pool identified by UUID to the profile.

A voucherCode.assigned event is produced.

Future<void> assignVoucherCode(String poolUuid, {required void Function(AssignVoucherResponse response) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method retrieves voucher codes for a customer.

Future<void> getAssignedVoucherCodes({required void Function(VoucherCodesResponse voucherCodesResponse) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)



Content

The module for handling content from Synerise backend such as documents, recommendations, and so on.

Declared In:
lib/modules/content/content_impl.dart

Related To:
DocumentsApiQuery
Document
RecommendationResponse
RecommendationOptions
Recommendation
ScreenView
ScreenViewAudienceInfo

Inherits From:
BaseModule

Declaration:

class ContentImpl extends BaseModule

Methods:

This method generates the document assigned to a slug.

Future<void> getDocuments(DocumentsApiQuery documentsApiQuery, {required void Function(List<Map<String, Object>> documentsList) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details) - **REMOVED in version 2.0.0 **


This method generates the document that is defined for the provided slug.

Future<void> generateDocument(String slug, {required void Function(Document document) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method generates the document that is defined for parameters provided in the query object.

Future<void> generateDocumentWithApiQuery(DocumentApiQuery apiQuery, {required void Function(Document document) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method generates documents that are defined for parameters provided in the query object.

Future<List<Map<String, Object>>> getDocuments(DocumentsApiQuery documentsApiQueryModel) async
(Click for more details) - **REMOVED in version 2.0.0 **


This method generates recommendations that are defined for the options provided.

Future<void> getRecommendations(RecommendationOptions recommendationOptions, {required void Function(RecommendationResponse recommendationResponse) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details) - **REMOVED in version 2.0.0 **


This method generates recommendations that are defined for the options provided.

Future<void> getRecommendationsV2(RecommendationOptions recommendationOptions, {required void Function(RecommendationResponse recommendationResponse) onSuccess, required void Function(SyneriseError error) onError}) async 
(Click for more details)


This method generates the customer’s highest-priority screen view campaign.

Future<void> getScreenView({required void Function(ScreenViewResponse screenViewResponse) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details) - **REMOVED in version 2.0.0 **


This method generates a customer’s highest-priority screen view campaign from the feed with the provided feed slug.

Future<void> generateScreenView(String feedSlug, {required void Function(ScreenView screenView) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


This method generates customer’s highest-priority screen view campaign that is defined for parameters provided in the query object.

Future<void> generateScreenViewWithApiQuery(ScreenViewApiQuery apiQuery, {required void Function(ScreenView screenView) onSuccess, required void Function(SyneriseError error) onError}) async
(Click for more details)


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker