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.

void registerForNotifications(String registrationToken, [bool? mobileAgreement])
(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)


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) async
(Click for more details)


This method confirms a customer account with the confirmation token.

Future<void> confirmAccount(String token) async
(Click for more details)


This method activates a customer with email.

Future<void> activateAccount(String email) async
(Click for more details)


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

Future<void> requestAccountActivationByPin(String email) 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) 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)
(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<ClientConditionalAuthResult> signInConditionally(String email, String password) async 
(Click for more details)


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

Future<bool> authenticate(ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString) async
(Click for more details)


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

Future<ClientConditionalAuthResult> authenticateConditionally(
ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString) async 
(Click for more details)


This method authenticates a customer with Simple Authentication.

Future<void> simpleAuthentication(ClientSimpleAuthenticationData clientSimpleAuthenticationData, String authID) async 
(Click for more details)


This method checks if a customer is signed in (via 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 whether it should sign out all devices

Future<void> signOutWithMode(ClientSignOutMode mode, bool fromAllDevices) async 
(Click for more details)


This method refreshes the customer’s current token.

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


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

Future<Token> retrieveToken() 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 whole session completely.

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


This method gets a customer’s account information.

Future<ClientAccountInformation> getAccount() async
(Click for more details)


This method updates a customer’s account information.

Future<void> updateAccount(ClientAccountUpdateContext clientAccountUpdateContext) async
(Click for more details)


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

Future<void> requestPasswordReset(String email) 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 token, String password) async
(Click for more details)


This method changes a customer’s password.

Future<void> changePassword(String oldPassword, String password) async
(Click for more details)


This method requests a customer’s email change.

Future<void> requestEmailChange(String email, String password, [String? externalToken, String? authID]) async 
(Click for more details)


This method confirms an email change.

Future<void> confirmEmailChange(String token, bool newsletterAgreement) 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) 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) async 
(Click for more details)


This method deletes a customer’s account.

Future<void> deleteAccount(String clientAuthFactor, IdentityProvider identityProvider, String? authId) 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.

void setCustomIdentifier(String customIdentifier)
(Click for more details)


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

void setCustomEmail(String customEmail)
(Click for more details)


This method sends an event.

void send(Event event)
(Click for more details)


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

void flush()
(Click for more details)



Injector

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

Inherits From:
BaseModule

Declaration:

class InjectorImpl extends BaseModule

Listeners:
InjectorListener
InjectorBannerListener
InjectorInAppMessageListener
InjectorWalkthroughListener

Methods:

This method fetches a walkthrough.

void getWalkthrough()
(Click for more details)


This method shows a walkthrough when it is loaded.

void showWalkthrough()
(Click for more details)


This method checks if a walkthrough is loaded.

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


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

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



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<PromotionResponse> getAllPromotions() async
(Click for more details)


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

Future<PromotionResponse> getPromotions(PromotionsApiQuery promotionsApiQuery) async
(Click for more details)


This method retrieves the promotion with the specified UUID.

Future<Promotion> getPromotionByUUID(String uuid) async
(Click for more details)


This method retrieves the promotion with the specified code.

Future<Promotion> getPromotionByCode(String code) async
(Click for more details)


This method activates the promotion with the specified UUID.

Future<void> activatePromotionByUUID(String uuid) async
(Click for more details)


This method activates the promotion with the specified code.

Future<void> activatePromotionByCode(String code) async
(Click for more details)


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

Future<void> activatePromotionsBatch(List<PromotionIdentifier> promotionsToActivate) async
(Click for more details)


This method deactivates the promotion with the specified UUID.

Future<void> deactivatePromotionByUUID(String uuid) async
(Click for more details)


This method deactivates the promotion with the specified code.

Future<void> deactivatePromotionByCode(String code) async
(Click for more details)


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

Future<void> deactivatePromotionsBatch(List<PromotionIdentifier> promotionsToDeactivate) 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<AssignVoucherResponse> getOrAssignVoucher(String poolUuid) 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<AssignVoucherResponse> assignVoucherCode(String poolUuid) async
(Click for more details)


This method retrieves voucher codes for a customer.

Future<VoucherCodesResponse> getAssignedVoucherCodes() 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 that is defined for the provided slug.

Future<Document> generateDocument(String slug) async
(Click for more details)


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

Future<RecommendationResponse> getRecommendationsV2(RecommendationOptions recommendationOptions) async 
(Click for more details)


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

Future<ScreenView> generateScreenView(String feedSlug) async {
(Click for more details)


This method generates the document assigned to a slug.

Future<Map<String, Object>> getDocument(String slugName) async
(Click for more details) - **DEPRECATED in version 0.6.0 **


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) - **DEPRECATED in version 0.6.0 **


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

Future<RecommendationResponse> getRecommendations(RecommendationOptions recommendationOptions) async
(Click for more details) - **DEPRECATED in version 0.6.0 **


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

Future<ScreenViewResponse> getScreenView() async
(Click for more details) - **DEPRECATED in version 0.6.0 **

😕

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