Invites

Invites

# new Invites()

Source:

Methods

# (static) createURL(linkParamsopt) → {Promise.<string>}

Creates a Smart Link with user referral data attached used for Smart Invites.
Parameters:
Name Type Attributes Description
linkParams Object.<string, string> <optional>
Link customization parameters. More info @see here
Source:
Returns:
Promise with Smart invite URL.
Type
Promise.<string>

# (static) getAvailableChannels() → {Array.<InviteChannel>}

Get the list of available invite channels. Contains only channels enabled on the Dashboard and available on the device.
Source:
Returns:
Promise with list of available invite channels.
Type
Array.<InviteChannel>

# (static) getReferralData() → {Object}

Returns referral data.
Source:
Returns:
Referral data.
Type
Object

# (static) getReferredUsers(query) → {Promise.<Array.<ReferralUser>>}

Returns list of users who were referred by this user for a specific event.
Parameters:
Name Type Description
query ReferralUsersQuery Users query.
Source:
Returns:
Promise with list of referred users.
Type
Promise.<Array.<ReferralUser>>

# (static) getReferrerUsers(query) → {Promise.<Array.<ReferralUser>>}

Returns list of users who are referrers for this user for a specific event.
Parameters:
Name Type Description
query ReferralUsersQuery Users query.
Source:
Returns:
Promise with list of referrer users.
Type
Promise.<Array.<ReferralUser>>

# (static) send(inviteContent, channel) → {Promise.<string>}

Invite friends via a specified invite channel.
Parameters:
Name Type Description
inviteContent InviteContent Custom content to override the default content provided from the Dashboard.
channel string The channel through which the invite will be sent, one of the constants defined in SupportedChannel.
Source:
Returns:
Promise with Smart Invite URL.
Type
Promise.<string>

# (static) setReferrer(userId, event, eventData) → {Promise.<boolean>}

Sets referrer id for current user.
Parameters:
Name Type Description
userId UserId Id of referrer user.
event string Referrer event.
eventData Object.<string, string> Custom key-value pairs.
Source:
Returns:
Promise with true if successful.
Type
Promise.<boolean>