The Node.js SDK re-exports the WAJS namespace for TypeScript. This reference describes types from WA-JS 4.8.5-rc.0. For operations available on a connected Node.js client, see Whatsapp. For functions running inside WhatsApp Web, see the WA-JS browser API.
Map of config code to A/B property configuration with names
// Get all A/B props as a Map
const abPropsMap = WPP.conn.getABPropsMap();
// Check a specific config by code
const specificProp = abPropsMap.get('12345');
if (specificProp) {
console.log('Name:', specificProp.name);
console.log('Value:', specificProp.configValue);
}
// Convert to object for easy viewing
const result = {};
abPropsMap.forEach((value, key) => {
result[value.name || key] = value.configValue;
});
console.table(result);
Get all A/B test property configurations as a Map The map is keyed by the config code for easier lookup