Yaya Engine represents every state machine and category in its domain as a
PHP backed enum under app/Enums/, rather than as a database check
constraint or a free-text string column. There are 23 of these enums, and
they cluster into four domains: messaging and channels, alerts, user
actions/verifications/payouts, and locale/admin. Each enum below is listed
with its case values and the notable behavior methods it carries beyond the
usual label(). See Domain model for how
these enums attach to Eloquent models, and
Preparation plans for how the action/step/
payout group forms one lifecycle.
Carries requiresPhoneNumber(): true for sms/whatsapp, false for pwa/telegram — the fact the channel abstraction uses to decide whether a channel needs a phone number to route through [@channel-type-enum]
ConversationStatusEnum
active, closed, archived
[@conversation-status-enum]
MessageDirectionEnum
inbound, outbound
[@message-direction-enum]
DeliveryLogEventTypeEnum
sent, delivered, read, failed, webhook_received
[@delivery-log-event-type-enum]
ErrorCategoryEnum
permanent, retryable, rate_limit
Classifies a delivery failure so the messaging pipeline knows whether to retry [@error-category-enum]
Same three values as AlertTypeEnum but a distinct enum — type and severity are tracked as separate columns on Alert [@alert-severity-enum]
AlertSubscriptionStatusEnum
inactive, active
Whether a user currently receives alert dispatches [@alert-subscription-status-enum]
AlertSendStrategyEnum
default, custom
[@alert-send-strategy-enum]
AlertLevelFitEnum
pre-alert, yellow, orange, red
Adds a pre-alert case ahead of the three severity colors, used where a preparation action needs to fit against a pre-alert window as well as a live severity [@alert-level-fit-enum]
These three enums track one lifecycle end to end: a UserAction moves through
UserActionStatusEnum, each of its UserActionStep rows moves through
UserActionStepStatusEnum, a rejected step records why via
RejectionReasonCategoryEnum, and completing every step can produce a
RequestedPayout that moves through PayoutStatusEnum. This is the same
chain the MCP verification and payout tools read and
write.
evidence_uploaded is the state ListPendingVerificationsTool queries for its review queue [@user-action-step-status-enum]
RejectionReasonCategoryEnum
image_unclear, wrong_evidence, fraud
Chosen so the user receives a tailored rejection notification per category [@rejection-reason-category-enum]
PayoutStatusEnum
pending, approved, paid, cancelled
[@payout-status-enum]
FeasibilityEnum
high, moderate, low
[@feasibility-enum]
LoanOfferingTypeEnum
ussd, url
Implements Filament's HasLabel directly (getLabel()) rather than the plain label() every other enum here uses, since it renders inside a Filament form field [@loan-offering-type-enum]
A legacy admin-panel role enum, distinct from the Spatie permission roles (super_admin, mcp_admin, mcp_viewer, manager) that AdminAccess::roles() defines for RBAC [@admin-role-enum] [@admin-access]
Has no label() method — it exists purely as a typed reason code passed between the phone-request commands and jobs [@phone-request-reason-enum]
TelegramLocationRequestVariant
generic, flood
Not a persisted-state enum but a broadcast-copy selector: it exposes sentAtColumn(), requestKey(), buttonKey(), and mixpanelSource() so the generic (ENG-374) and Ethiopia flood/rain (ENG-539) location-share campaigns track "prompted once" independently and never collide. Selection is a command flag on telegram:broadcast-location-request, never derived from the user's locale [@telegram-location-request-variant]