How it works
Enums are built with an internal createEnum() helper. The objects are frozen. Every enum has a.get(value) method that accepts either a string name or a numeric index and always returns a string.
import { Enums } from './lib/MessageBuilderEnums.js';
Enums.IMAGINE_STATUS.READY; // 3 (raw value)
Enums.IMAGINE_STATUS.get(3); // "READY"
Enums.IMAGINE_STATUS.get('READY'); // "READY"
Enums.IMAGINE_STATUS.get(99); // "UNSET_OR_UNRECOGNIZED_ENUM_VALUE"Raw value
Direct access: Enums.CTA_TYPE.OPEN_FULL_VIEW → 4
String name
Enums.CTA_TYPE.get(4) → "OPEN_FULL_VIEW"
Fallback
Unknown value → UNSET_OR_UNRECOGNIZED_ENUM_VALUE
Enum index
Click an enum to see every value. Most enums are used when composing custom payloads throughaddWidget() or addPayload(); the two used directly most often areIMAGINE_STATUS and IMAGINE_TYPE.
38 / 38 enums
Unknown values
Every enum has a 0 value named UNSET_OR_UNRECOGNIZED_ENUM_VALUE. It is not an error; it simply marks a value the library does not recognize.
The schema can change
These enums come from reverse engineering. Do not treat them as a stable contract. Validate values before using them in production payloads.
Source
This page is generated at build time from MessageBuilderEnums.js version 4.8. Total: 38 enums.