All enums
Enums.INFORM_TREATMENTThis enum has 6 values. Value 0 is alwaysUNSET_OR_UNRECOGNIZED_ENUM_VALUE and acts as the fallback for unknown input.
| Value | Name |
|---|---|
| 0 | UNSET_OR_UNRECOGNIZED_ENUM_VALUEfallback |
| 1 | GEOBLOCK |
| 2 | MEDIA_LABEL |
| 3 | POST_COVER |
| 4 | POST_LABEL |
| 5 | WARNING_SCREENS |
Usage
INFORM_TREATMENT.js
import { Enums } from './lib/MessageBuilderEnums.js';
// Raw value
const raw = Enums.INFORM_TREATMENT.GEOBLOCK; // 1
// Name from a value
const name = Enums.INFORM_TREATMENT.get(1); // "GEOBLOCK"
// Pass-through from a string
const passthrough = Enums.INFORM_TREATMENT.get('GEOBLOCK'); // "GEOBLOCK".get() returns a string for numeric input and passes a string through unchanged. Unknown values resolve to UNSET_OR_UNRECOGNIZED_ENUM_VALUE.
Notes
Where is it used?
Some enums are consumed directly by builder methods such as addImage() andaddVideo(). Others are available for custom payloads through addWidget() oraddPayload().
Not an official contract
Names and values come from the internal WhatsApp schema. Changes on WhatsApp’s side can make these values irrelevant.