Invite Link Service
Exports:
getCountryAndLanguagesList
/**
* Returns a Promise which resolves with a shortened url which can be provided as an invitation link to someone.
* @returns {Promise<string>}
* @param {Object} config - The parameters required to build the URL
* @param {string} config.origin - The site host, as configured in the marketConfig.siteUrl
* @param {INVITATION_TYPE} config.invitationType - The type of the invitation
* @param {string} config.selectedLocale - The locale for which the URL will point to
* @param {string} config.hostAccountId - The account-id of the distributor sending the invitation
*/
getUserProfile
/**
* User-profile info
* @typedef {Object} UserProfileInfo
* @property {string} displayName - The display-name, usually first-name + last-name of the user
* @property {string} profilePhoto - The url of the user's profile-photo
*/
/**
* Gets a user's profile info.
* @returns {Promise<UserProfileInfo>}
* @param {Object} params
* @param {('dev'|'test'|'stage'|'prod')} params.env - The current environment
* @param {string} params.accountID - The user's account-id
*/
ENVIRONMENT
/**
* Enum for firebase environments.
* @typedef ENVIRONMENT
* @readonly
* @enum {string}
* @property {string} LOCALHOST
* @property {string} DEV
* @property {string} TEST
* @property {string} STAGE
* @property {string} PROD
*/
getShortInviteURL
/**
* Returns a Promise which resolves with a shortened url which can be provided as an invitation link to someone.
* @returns {Promise<string>}
* @param {Object} config - The parameters required to build the URL
* @param {string} config.origin - The site host, as configured in the marketConfig.siteUrl
* @param {INVITATION_TYPE} config.invitationType - The type of the invitation
* @param {string} config.selectedLocale - The locale for which the URL will point to
* @param {string} config.hostAccountId - The account-id of the distributor sending the invitation
*/
INVITATION_TYPE
/**
* Enum for invitation-types.
* @typedef INVITATION_TYPE
* @readonly
* @enum {string}
* @property {string} BRAND_AFFILIATE
* @property {string} MEMBER
* @property {string} CUSTOMER
*/