Socket
Book a DemoInstallSign in
Socket

@nuskin/conversion-sdk

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/conversion-sdk

The SDK for the conversion tool

latest
npmnpm
Version
1.4.0
Version published
Weekly downloads
0
-100%
Maintainers
5
Weekly downloads
 
Created
Source

Conversion NPM Library

This NPM library houses logic for converting customers between tiers. Refer also to conversion-lambda which manages interfacing with API's on Universe and SAP

Domain terminology:

Tier

One of CUSTOMER, PREFERRED_MEMBER, DISTRIBUTOR These are documented and accessible through the MEMBER_TIERS property on the service

Convert

Move a member from their current tier to a target tier

Intent

The tier that the member would like to convert to

Expected response format

The following explains the expected response formats when interacting with this service. In the case of an issue with a request, it will come back in the errorMessageKey field in the response. A full list of the possible error message keys can be found in src/errorMessageCodekey.js

getConversionOptions

success

If the request was successful

[{
	tier: 'a tier',
	current: true/false // this is the user's current tier,
	requiredFields: {}// this will house the list of fields required in the current market to make the move
}, ...]

error

If the request failed

{
	errorMessageKey: 'an error'
}

convertTo

success

If the request was successful

{
	errorMessageKey:  null,
	success:  true
}

error

If the request failed

{

errorMessageKey:  'an error'
}

FAQs

Package last updated on 12 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts