function persistEndpoint(id, endpointData) {
  const endpointKey = getStorageKey(id)
  const data = isString(endpointData) ? endpointData : JSON.stringify(endpointData)
  setItem(endpointKey, data)
  return endpointData
}
Indicates whether a user has opted out of receiving messages with one of the following values:
ALL - User has opted out of all messages.
NONE - Users has not opted out and receives all messages.