Create state_rules.py
Browse files- engine/state_rules.py +55 -0
engine/state_rules.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
STATE_RULES = {
|
| 2 |
+
"WAITING_USER_TYPE": {
|
| 3 |
+
"expected": ["new_student", "current_student"],
|
| 4 |
+
"supports_topic_switch": True,
|
| 5 |
+
},
|
| 6 |
+
"WAITING_AUDIENCE": {
|
| 7 |
+
"expected": ["adults", "children"],
|
| 8 |
+
"supports_topic_switch": True,
|
| 9 |
+
},
|
| 10 |
+
"WAITING_PRIOR_STUDY": {
|
| 11 |
+
"expected": ["prior_study_yes", "prior_study_no"],
|
| 12 |
+
"supports_topic_switch": True,
|
| 13 |
+
},
|
| 14 |
+
"WAITING_BEGINNER_SCHEDULE_CHOICE": {
|
| 15 |
+
"expected": ["confirm_schedule_reviewed", "proceed_booking"],
|
| 16 |
+
"state_switches": ["switch_to_prior_study_true", "switch_to_prior_study_false", "support_needed"],
|
| 17 |
+
"supports_topic_switch": True,
|
| 18 |
+
},
|
| 19 |
+
"WAITING_PDF_102_CONFIRMATION": {
|
| 20 |
+
"expected": ["confirm_pdf_reviewed"],
|
| 21 |
+
"state_switches": ["switch_to_prior_study_true", "switch_to_prior_study_false", "support_needed"],
|
| 22 |
+
"supports_topic_switch": True,
|
| 23 |
+
},
|
| 24 |
+
"WAITING_PLACEMENT_TEST_CONFIRMATION": {
|
| 25 |
+
"expected": ["confirm_placement_test_reviewed"],
|
| 26 |
+
"state_switches": ["switch_to_prior_study_true", "switch_to_prior_study_false", "support_needed"],
|
| 27 |
+
"supports_topic_switch": True,
|
| 28 |
+
},
|
| 29 |
+
"WAITING_CURRENT_STUDENT_ACTION": {
|
| 30 |
+
"expected": ["current_student_support", "current_student_next_level"],
|
| 31 |
+
"supports_topic_switch": True,
|
| 32 |
+
},
|
| 33 |
+
"WAITING_SUPPORT_QUESTION": {
|
| 34 |
+
"expected": ["support_question_text"],
|
| 35 |
+
"supports_topic_switch": True,
|
| 36 |
+
},
|
| 37 |
+
"WAITING_LEVEL_SELECTION": {
|
| 38 |
+
"expected": ["level_selected"],
|
| 39 |
+
"state_switches": ["support_needed"],
|
| 40 |
+
"supports_topic_switch": True,
|
| 41 |
+
},
|
| 42 |
+
"WAITING_PAYMENT_METHOD": {
|
| 43 |
+
"expected": ["payment_method_selected"],
|
| 44 |
+
"state_switches": ["support_needed"],
|
| 45 |
+
"supports_topic_switch": True,
|
| 46 |
+
},
|
| 47 |
+
"WAITING_COMPLAINT_FORM": {
|
| 48 |
+
"expected": ["complaint_form_submitted"],
|
| 49 |
+
"supports_topic_switch": True,
|
| 50 |
+
},
|
| 51 |
+
"HANDOFF_DONE": {
|
| 52 |
+
"expected": ["thanks"],
|
| 53 |
+
"supports_topic_switch": True,
|
| 54 |
+
},
|
| 55 |
+
}
|