From 5f261c642d551d2858b127c132931ed12855e74b Mon Sep 17 00:00:00 2001 From: lash Date: Sat, 11 Jan 2025 15:21:40 +0000 Subject: [PATCH] Added back africastalking executable, vise-code --- .env.example | 20 ++ .gitignore | 9 + cmd/africastalking/main.go | 177 ++++++++++++++++ cmd/async/main.go | 199 ++++++++++++++++++ cmd/http/main.go | 162 ++++++++++++++ cmd/ssh/README.md | 34 +++ cmd/ssh/main.go | 144 +++++++++++++ cmd/ssh/sshkey/main.go | 44 ++++ go.mod | 4 +- go.sum | 8 +- handlers/application/menuhandler.go | 57 ++++- handlers/application/menuhandler_test.go | 152 ++++++------- handlers/local.go | 9 +- services/registration/Makefile | 23 ++ services/registration/_catch | 1 + services/registration/_catch.bin | Bin 0 -> 2 bytes services/registration/_catch.vis | 1 + services/registration/_catch_swa | 1 + services/registration/account_creation | 1 + services/registration/account_creation.bin | Bin 0 -> 56 bytes services/registration/account_creation.vis | 4 + services/registration/account_creation_failed | 1 + .../registration/account_creation_failed.bin | Bin 0 -> 20 bytes .../registration/account_creation_failed.vis | 3 + .../registration/account_creation_failed_swa | 1 + services/registration/account_creation_swa | 1 + services/registration/account_menu | 1 + services/registration/account_menu_swa | 1 + services/registration/account_pending | 1 + services/registration/account_pending.bin | Bin 0 -> 35 bytes services/registration/account_pending.vis | 3 + services/registration/account_pending_swa | 1 + services/registration/address | 1 + services/registration/address.bin | Bin 0 -> 94 bytes services/registration/address.vis | 8 + services/registration/address_swa | 1 + services/registration/amount | 2 + services/registration/amount.bin | Bin 0 -> 230 bytes services/registration/amount.vis | 15 ++ services/registration/amount_swa | 2 + services/registration/api_failure | 1 + services/registration/api_failure.bin | Bin 0 -> 36 bytes services/registration/api_failure.vis | 5 + services/registration/back_menu | 1 + services/registration/back_menu_swa | 1 + services/registration/balances | 1 + services/registration/balances.bin | Bin 0 -> 153 bytes services/registration/balances.vis | 10 + services/registration/balances_swa | 1 + services/registration/blocked_account.bin | Bin 0 -> 27 bytes services/registration/blocked_account.vis | 2 + services/registration/change_language | 1 + services/registration/change_language.bin | Bin 0 -> 141 bytes services/registration/change_language.vis | 10 + services/registration/change_language_menu | 1 + .../registration/change_language_menu_swa | 1 + services/registration/change_language_swa | 1 + services/registration/change_pin_menu | 1 + services/registration/change_pin_menu_swa | 1 + services/registration/check_balance_menu | 1 + services/registration/check_balance_menu_swa | 1 + services/registration/check_statement | 1 + services/registration/check_statement.bin | Bin 0 -> 175 bytes services/registration/check_statement.vis | 12 ++ services/registration/check_statement_menu | 1 + .../registration/check_statement_menu_swa | 1 + services/registration/check_statement_swa | 1 + services/registration/comminity_balance_swa | 1 + services/registration/community_balance | 1 + services/registration/community_balance.bin | Bin 0 -> 166 bytes services/registration/community_balance.vis | 12 ++ services/registration/community_balance_menu | 1 + .../registration/community_balance_menu_swa | 1 + services/registration/confirm_create_pin | 1 + services/registration/confirm_create_pin.bin | Bin 0 -> 68 bytes services/registration/confirm_create_pin.vis | 4 + services/registration/confirm_create_pin_swa | 1 + services/registration/confirm_others_new_pin | 1 + .../registration/confirm_others_new_pin.bin | Bin 0 -> 271 bytes .../registration/confirm_others_new_pin.vis | 14 ++ .../registration/confirm_others_new_pin_swa | 1 + services/registration/confirm_pin_change | 1 + services/registration/confirm_pin_change.bin | Bin 0 -> 56 bytes services/registration/confirm_pin_change.vis | 5 + services/registration/confirm_pin_change_swa | 1 + services/registration/create_pin | 1 + services/registration/create_pin.bin | Bin 0 -> 142 bytes services/registration/create_pin.vis | 9 + services/registration/create_pin_mismatch | 1 + services/registration/create_pin_mismatch.bin | Bin 0 -> 53 bytes services/registration/create_pin_mismatch.vis | 5 + services/registration/create_pin_mismatch_swa | 1 + services/registration/create_pin_swa | 1 + services/registration/display_profile_info | 5 + .../registration/display_profile_info.bin | Bin 0 -> 17 bytes .../registration/display_profile_info.vis | 3 + .../registration/display_profile_info_swa | 0 services/registration/edit_family_name | 2 + services/registration/edit_family_name.bin | Bin 0 -> 312 bytes services/registration/edit_family_name.vis | 18 ++ services/registration/edit_family_name_menu | 1 + .../registration/edit_family_name_menu_swa | 1 + services/registration/edit_family_name_swa | 2 + services/registration/edit_first_name | 2 + services/registration/edit_first_name.bin | Bin 0 -> 311 bytes services/registration/edit_first_name.vis | 18 ++ services/registration/edit_first_name_menu | 1 + .../registration/edit_first_name_menu_swa | 1 + services/registration/edit_first_name_swa | 2 + services/registration/edit_gender_menu | 1 + services/registration/edit_gender_menu_swa | 1 + services/registration/edit_location | 2 + services/registration/edit_location.bin | Bin 0 -> 234 bytes services/registration/edit_location.vis | 15 ++ services/registration/edit_location_menu | 1 + services/registration/edit_location_menu_swa | 1 + services/registration/edit_location_swa | 2 + services/registration/edit_offerings | 2 + services/registration/edit_offerings.bin | Bin 0 -> 208 bytes services/registration/edit_offerings.vis | 13 ++ services/registration/edit_offerings_menu | 1 + services/registration/edit_offerings_menu_swa | 1 + services/registration/edit_offerings_swa | 2 + services/registration/edit_profile | 1 + services/registration/edit_profile.bin | Bin 0 -> 378 bytes services/registration/edit_profile.vis | 23 ++ services/registration/edit_profile_swa | 1 + services/registration/edit_yob | 2 + services/registration/edit_yob.bin | Bin 0 -> 313 bytes services/registration/edit_yob.vis | 19 ++ services/registration/edit_yob_menu | 1 + services/registration/edit_yob_menu_swa | 1 + services/registration/edit_yob_swa | 2 + services/registration/english_menu | 1 + services/registration/enter_other_number | 1 + services/registration/enter_other_number.bin | Bin 0 -> 122 bytes services/registration/enter_other_number.vis | 7 + services/registration/enter_other_number_swa | 1 + services/registration/enter_others_new_pin | 1 + .../registration/enter_others_new_pin.bin | Bin 0 -> 239 bytes .../registration/enter_others_new_pin.vis | 12 ++ .../registration/enter_others_new_pin_swa | 1 + services/registration/enter_pin | 1 + services/registration/enter_pin.bin | Bin 0 -> 42 bytes services/registration/enter_pin.vis | 4 + services/registration/enter_pin_swa | 1 + services/registration/exit_menu | 1 + services/registration/exit_menu_swa | 1 + services/registration/female_menu | 1 + services/registration/female_menu_swa | 1 + services/registration/help.bin | Bin 0 -> 21 bytes services/registration/help.vis | 2 + services/registration/help_menu | 1 + services/registration/help_menu_swa | 1 + services/registration/incorrect_date_format | 2 + .../registration/incorrect_date_format.bin | Bin 0 -> 68 bytes .../registration/incorrect_date_format.vis | 6 + .../registration/incorrect_date_format_swa | 2 + services/registration/incorrect_pin | 1 + services/registration/incorrect_pin.bin | Bin 0 -> 113 bytes services/registration/incorrect_pin.vis | 9 + services/registration/incorrect_pin_swa | 1 + services/registration/invalid_amount | 1 + services/registration/invalid_amount.bin | Bin 0 -> 81 bytes services/registration/invalid_amount.vis | 7 + services/registration/invalid_amount_swa | 1 + services/registration/invalid_others_pin | 1 + services/registration/invalid_others_pin.bin | Bin 0 -> 55 bytes services/registration/invalid_others_pin.vis | 5 + services/registration/invalid_pin | 1 + services/registration/invalid_pin.bin | Bin 0 -> 17 bytes services/registration/invalid_pin.vis | 3 + services/registration/invalid_pin_swa | 1 + services/registration/invalid_recipient | 1 + services/registration/invalid_recipient.bin | Bin 0 -> 77 bytes services/registration/invalid_recipient.vis | 7 + services/registration/invalid_recipient_swa | 1 + services/registration/invite_menu | 1 + services/registration/invite_menu_swa | 1 + services/registration/invite_recipient | 1 + services/registration/invite_recipient.bin | Bin 0 -> 86 bytes services/registration/invite_recipient.vis | 8 + services/registration/invite_recipient_swa | 1 + services/registration/invite_result.bin | Bin 0 -> 29 bytes services/registration/invite_result.vis | 2 + services/registration/kiswahili_menu | 1 + services/registration/language_changed | 1 + services/registration/language_changed.bin | Bin 0 -> 35 bytes services/registration/language_changed.vis | 5 + services/registration/language_changed_swa | 1 + services/registration/list_offering | 0 services/registration/list_offering.bin | 0 services/registration/list_offering.vis | 0 services/registration/locale/swa/default.po | 32 +++ services/registration/main | 1 + services/registration/main.bin | Bin 0 -> 267 bytes services/registration/main.vis | 20 ++ services/registration/main_swa | 1 + services/registration/male_menu | 1 + services/registration/male_menu_swa | 1 + services/registration/my_account | 1 + services/registration/my_account.bin | Bin 0 -> 251 bytes services/registration/my_account.vis | 17 ++ services/registration/my_account_swa | 1 + services/registration/my_address_menu | 1 + services/registration/my_address_menu_swa | 1 + services/registration/my_balance | 1 + services/registration/my_balance.bin | Bin 0 -> 146 bytes services/registration/my_balance.vis | 12 ++ services/registration/my_balance_menu | 1 + services/registration/my_balance_menu_swa | 1 + services/registration/my_balance_swa | 1 + services/registration/my_vouchers | 1 + services/registration/my_vouchers.bin | Bin 0 -> 151 bytes services/registration/my_vouchers.vis | 9 + services/registration/new_pin | 1 + services/registration/new_pin.bin | Bin 0 -> 194 bytes services/registration/new_pin.vis | 13 ++ services/registration/new_pin_swa | 2 + services/registration/next_menu | 1 + services/registration/next_menu_swa | 1 + services/registration/no_admin_privilege | 1 + services/registration/no_admin_privilege.bin | Bin 0 -> 48 bytes services/registration/no_admin_privilege.vis | 5 + services/registration/no_admin_privilege_swa | 1 + services/registration/no_menu | 1 + services/registration/no_menu_swa | 1 + services/registration/no_transfers | 1 + services/registration/no_transfers.bin | Bin 0 -> 35 bytes services/registration/no_transfers.vis | 5 + services/registration/no_transfers_swa | 1 + services/registration/no_voucher | 1 + services/registration/no_voucher.bin | Bin 0 -> 35 bytes services/registration/no_voucher.vis | 5 + services/registration/no_voucher_swa | 1 + services/registration/old_pin | 1 + services/registration/old_pin.bin | Bin 0 -> 73 bytes services/registration/old_pin.vis | 7 + services/registration/old_pin_swa | 1 + services/registration/others_pin_mismatch | 1 + services/registration/others_pin_mismatch.bin | Bin 0 -> 36 bytes services/registration/others_pin_mismatch.vis | 5 + services/registration/others_pin_mismatch_swa | 1 + services/registration/pin_entry | 1 + services/registration/pin_entry.bin | Bin 0 -> 48 bytes services/registration/pin_entry.vis | 4 + services/registration/pin_entry_swa | 1 + services/registration/pin_management | 1 + services/registration/pin_management.bin | Bin 0 -> 96 bytes services/registration/pin_management.vis | 8 + services/registration/pin_management_swa | 0 services/registration/pin_options_menu | 1 + services/registration/pin_options_menu_swa | 1 + services/registration/pin_reset_mismatch | 1 + services/registration/pin_reset_mismatch.bin | Bin 0 -> 53 bytes services/registration/pin_reset_mismatch.vis | 6 + services/registration/pin_reset_mismatch_swa | 1 + services/registration/pin_reset_result | 1 + services/registration/pin_reset_result.bin | Bin 0 -> 123 bytes services/registration/pin_reset_result.vis | 8 + services/registration/pin_reset_result_swa | 1 + services/registration/pin_reset_success | 1 + services/registration/pin_reset_success.bin | Bin 0 -> 106 bytes services/registration/pin_reset_success.vis | 8 + services/registration/pin_reset_success_swa | 1 + services/registration/pp.csv | 32 +++ services/registration/prev_menu | 1 + services/registration/prev_menu_swa | 1 + services/registration/profile_menu | 1 + services/registration/profile_menu_swa | 1 + services/registration/profile_update_success | 1 + .../registration/profile_update_success.bin | Bin 0 -> 102 bytes .../registration/profile_update_success.vis | 7 + .../registration/profile_update_success_swa | 1 + services/registration/quit.bin | Bin 0 -> 11 bytes services/registration/quit.vis | 2 + services/registration/quit_menu | 1 + services/registration/quit_menu_swa | 1 + services/registration/reset_pin_menu | 1 + services/registration/reset_pin_menu_swa | 1 + services/registration/retry_menu | 1 + services/registration/retry_menu_swa | 1 + services/registration/root | 1 + services/registration/root.bin | Bin 0 -> 167 bytes services/registration/root.vis | 10 + services/registration/root_swa | 1 + services/registration/select_gender | 2 + services/registration/select_gender.bin | Bin 0 -> 210 bytes services/registration/select_gender.vis | 14 ++ services/registration/select_gender_swa | 2 + services/registration/select_language | 2 + services/registration/select_language.bin | Bin 0 -> 58 bytes services/registration/select_language.vis | 6 + services/registration/select_voucher | 2 + services/registration/select_voucher.bin | Bin 0 -> 175 bytes services/registration/select_voucher.vis | 16 ++ services/registration/select_voucher_menu | 1 + services/registration/select_voucher_menu_swa | 1 + services/registration/select_voucher_swa | 2 + services/registration/send | 1 + services/registration/send.bin | Bin 0 -> 175 bytes services/registration/send.vis | 11 + services/registration/send_menu | 1 + services/registration/send_menu_swa | 1 + services/registration/send_swa | 1 + services/registration/set_default.bin | Bin 0 -> 62 bytes services/registration/set_default.vis | 4 + services/registration/set_eng.bin | Bin 0 -> 62 bytes services/registration/set_eng.vis | 4 + services/registration/set_female.bin | Bin 0 -> 162 bytes services/registration/set_female.vis | 10 + services/registration/set_male.bin | Bin 0 -> 162 bytes services/registration/set_male.vis | 10 + services/registration/set_swa.bin | Bin 0 -> 62 bytes services/registration/set_swa.vis | 4 + services/registration/set_unspecified.bin | Bin 0 -> 162 bytes services/registration/set_unspecified.vis | 10 + services/registration/terms | 2 + services/registration/terms.bin | Bin 0 -> 41 bytes services/registration/terms.vis | 5 + services/registration/terms_swa | 2 + .../registration/transaction_initiated.bin | Bin 0 -> 157 bytes .../registration/transaction_initiated.vis | 11 + services/registration/transaction_pin | 2 + services/registration/transaction_pin.bin | Bin 0 -> 206 bytes services/registration/transaction_pin.vis | 15 ++ services/registration/transaction_pin_swa | 2 + services/registration/transactions | 1 + services/registration/transactions.bin | Bin 0 -> 173 bytes services/registration/transactions.vis | 15 ++ services/registration/transactions_swa | 1 + services/registration/unregistered_number | 1 + services/registration/unregistered_number.bin | Bin 0 -> 93 bytes services/registration/unregistered_number.vis | 7 + services/registration/unregistered_number_swa | 1 + services/registration/unspecified_menu | 1 + services/registration/unspecified_menu_swa | 1 + services/registration/update_age | 2 + services/registration/update_familyname.bin | Bin 0 -> 46 bytes services/registration/update_familyname.vis | 2 + services/registration/update_firstname.bin | Bin 0 -> 45 bytes services/registration/update_firstname.vis | 2 + services/registration/update_gender.bin | Bin 0 -> 42 bytes services/registration/update_gender.vis | 2 + services/registration/update_location.bin | Bin 0 -> 44 bytes services/registration/update_location.vis | 2 + services/registration/update_offerings.bin | Bin 0 -> 45 bytes services/registration/update_offerings.vis | 2 + .../registration/update_profile_items.bin | Bin 0 -> 59 bytes .../registration/update_profile_items.vis | 3 + services/registration/update_success | 1 + services/registration/update_success.bin | Bin 0 -> 35 bytes services/registration/update_success.vis | 5 + services/registration/update_success_swa | 1 + services/registration/update_yob.bin | Bin 0 -> 39 bytes services/registration/update_yob.vis | 2 + services/registration/view_menu | 1 + services/registration/view_menu_swa | 1 + services/registration/view_profile | 2 + services/registration/view_profile.bin | Bin 0 -> 135 bytes services/registration/view_profile.vis | 11 + services/registration/view_profile_swa | 2 + services/registration/view_statement | 1 + services/registration/view_statement.bin | Bin 0 -> 86 bytes services/registration/view_statement.vis | 10 + services/registration/view_swa | 1 + services/registration/view_voucher | 2 + services/registration/view_voucher.bin | Bin 0 -> 127 bytes services/registration/view_voucher.vis | 10 + services/registration/view_voucher_swa | 2 + services/registration/voucher_details | 1 + services/registration/voucher_details.bin | Bin 0 -> 79 bytes services/registration/voucher_details.vis | 6 + services/registration/voucher_details_menu | 1 + .../registration/voucher_details_menu_swa | 1 + services/registration/voucher_details_swa | 1 + services/registration/voucher_set | 1 + services/registration/voucher_set.bin | Bin 0 -> 111 bytes services/registration/voucher_set.vis | 10 + services/registration/voucher_set_swa | 1 + services/registration/vouchers_menu | 1 + services/registration/vouchers_menu_swa | 1 + services/registration/yes_menu | 1 + services/registration/yes_menu_swa | 1 + 384 files changed, 1909 insertions(+), 95 deletions(-) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 cmd/africastalking/main.go create mode 100644 cmd/async/main.go create mode 100644 cmd/http/main.go create mode 100644 cmd/ssh/README.md create mode 100644 cmd/ssh/main.go create mode 100644 cmd/ssh/sshkey/main.go create mode 100644 services/registration/Makefile create mode 100644 services/registration/_catch create mode 100644 services/registration/_catch.bin create mode 100644 services/registration/_catch.vis create mode 100644 services/registration/_catch_swa create mode 100644 services/registration/account_creation create mode 100644 services/registration/account_creation.bin create mode 100644 services/registration/account_creation.vis create mode 100644 services/registration/account_creation_failed create mode 100644 services/registration/account_creation_failed.bin create mode 100644 services/registration/account_creation_failed.vis create mode 100644 services/registration/account_creation_failed_swa create mode 100644 services/registration/account_creation_swa create mode 100644 services/registration/account_menu create mode 100644 services/registration/account_menu_swa create mode 100644 services/registration/account_pending create mode 100644 services/registration/account_pending.bin create mode 100644 services/registration/account_pending.vis create mode 100644 services/registration/account_pending_swa create mode 100644 services/registration/address create mode 100644 services/registration/address.bin create mode 100644 services/registration/address.vis create mode 100644 services/registration/address_swa create mode 100644 services/registration/amount create mode 100644 services/registration/amount.bin create mode 100644 services/registration/amount.vis create mode 100644 services/registration/amount_swa create mode 100644 services/registration/api_failure create mode 100644 services/registration/api_failure.bin create mode 100644 services/registration/api_failure.vis create mode 100644 services/registration/back_menu create mode 100644 services/registration/back_menu_swa create mode 100644 services/registration/balances create mode 100644 services/registration/balances.bin create mode 100644 services/registration/balances.vis create mode 100644 services/registration/balances_swa create mode 100644 services/registration/blocked_account.bin create mode 100644 services/registration/blocked_account.vis create mode 100644 services/registration/change_language create mode 100644 services/registration/change_language.bin create mode 100644 services/registration/change_language.vis create mode 100644 services/registration/change_language_menu create mode 100644 services/registration/change_language_menu_swa create mode 100644 services/registration/change_language_swa create mode 100644 services/registration/change_pin_menu create mode 100644 services/registration/change_pin_menu_swa create mode 100644 services/registration/check_balance_menu create mode 100644 services/registration/check_balance_menu_swa create mode 100644 services/registration/check_statement create mode 100644 services/registration/check_statement.bin create mode 100644 services/registration/check_statement.vis create mode 100644 services/registration/check_statement_menu create mode 100644 services/registration/check_statement_menu_swa create mode 100644 services/registration/check_statement_swa create mode 100644 services/registration/comminity_balance_swa create mode 100644 services/registration/community_balance create mode 100644 services/registration/community_balance.bin create mode 100644 services/registration/community_balance.vis create mode 100644 services/registration/community_balance_menu create mode 100644 services/registration/community_balance_menu_swa create mode 100644 services/registration/confirm_create_pin create mode 100644 services/registration/confirm_create_pin.bin create mode 100644 services/registration/confirm_create_pin.vis create mode 100644 services/registration/confirm_create_pin_swa create mode 100644 services/registration/confirm_others_new_pin create mode 100644 services/registration/confirm_others_new_pin.bin create mode 100644 services/registration/confirm_others_new_pin.vis create mode 100644 services/registration/confirm_others_new_pin_swa create mode 100644 services/registration/confirm_pin_change create mode 100644 services/registration/confirm_pin_change.bin create mode 100644 services/registration/confirm_pin_change.vis create mode 100644 services/registration/confirm_pin_change_swa create mode 100644 services/registration/create_pin create mode 100644 services/registration/create_pin.bin create mode 100644 services/registration/create_pin.vis create mode 100644 services/registration/create_pin_mismatch create mode 100644 services/registration/create_pin_mismatch.bin create mode 100644 services/registration/create_pin_mismatch.vis create mode 100644 services/registration/create_pin_mismatch_swa create mode 100644 services/registration/create_pin_swa create mode 100644 services/registration/display_profile_info create mode 100644 services/registration/display_profile_info.bin create mode 100644 services/registration/display_profile_info.vis create mode 100644 services/registration/display_profile_info_swa create mode 100644 services/registration/edit_family_name create mode 100644 services/registration/edit_family_name.bin create mode 100644 services/registration/edit_family_name.vis create mode 100644 services/registration/edit_family_name_menu create mode 100644 services/registration/edit_family_name_menu_swa create mode 100644 services/registration/edit_family_name_swa create mode 100644 services/registration/edit_first_name create mode 100644 services/registration/edit_first_name.bin create mode 100644 services/registration/edit_first_name.vis create mode 100644 services/registration/edit_first_name_menu create mode 100644 services/registration/edit_first_name_menu_swa create mode 100644 services/registration/edit_first_name_swa create mode 100644 services/registration/edit_gender_menu create mode 100644 services/registration/edit_gender_menu_swa create mode 100644 services/registration/edit_location create mode 100644 services/registration/edit_location.bin create mode 100644 services/registration/edit_location.vis create mode 100644 services/registration/edit_location_menu create mode 100644 services/registration/edit_location_menu_swa create mode 100644 services/registration/edit_location_swa create mode 100644 services/registration/edit_offerings create mode 100644 services/registration/edit_offerings.bin create mode 100644 services/registration/edit_offerings.vis create mode 100644 services/registration/edit_offerings_menu create mode 100644 services/registration/edit_offerings_menu_swa create mode 100644 services/registration/edit_offerings_swa create mode 100644 services/registration/edit_profile create mode 100644 services/registration/edit_profile.bin create mode 100644 services/registration/edit_profile.vis create mode 100644 services/registration/edit_profile_swa create mode 100644 services/registration/edit_yob create mode 100644 services/registration/edit_yob.bin create mode 100644 services/registration/edit_yob.vis create mode 100644 services/registration/edit_yob_menu create mode 100644 services/registration/edit_yob_menu_swa create mode 100644 services/registration/edit_yob_swa create mode 100644 services/registration/english_menu create mode 100644 services/registration/enter_other_number create mode 100644 services/registration/enter_other_number.bin create mode 100644 services/registration/enter_other_number.vis create mode 100644 services/registration/enter_other_number_swa create mode 100644 services/registration/enter_others_new_pin create mode 100644 services/registration/enter_others_new_pin.bin create mode 100644 services/registration/enter_others_new_pin.vis create mode 100644 services/registration/enter_others_new_pin_swa create mode 100644 services/registration/enter_pin create mode 100644 services/registration/enter_pin.bin create mode 100644 services/registration/enter_pin.vis create mode 100644 services/registration/enter_pin_swa create mode 100644 services/registration/exit_menu create mode 100644 services/registration/exit_menu_swa create mode 100644 services/registration/female_menu create mode 100644 services/registration/female_menu_swa create mode 100644 services/registration/help.bin create mode 100644 services/registration/help.vis create mode 100644 services/registration/help_menu create mode 100644 services/registration/help_menu_swa create mode 100644 services/registration/incorrect_date_format create mode 100644 services/registration/incorrect_date_format.bin create mode 100644 services/registration/incorrect_date_format.vis create mode 100644 services/registration/incorrect_date_format_swa create mode 100644 services/registration/incorrect_pin create mode 100644 services/registration/incorrect_pin.bin create mode 100644 services/registration/incorrect_pin.vis create mode 100644 services/registration/incorrect_pin_swa create mode 100644 services/registration/invalid_amount create mode 100644 services/registration/invalid_amount.bin create mode 100644 services/registration/invalid_amount.vis create mode 100644 services/registration/invalid_amount_swa create mode 100644 services/registration/invalid_others_pin create mode 100644 services/registration/invalid_others_pin.bin create mode 100644 services/registration/invalid_others_pin.vis create mode 100644 services/registration/invalid_pin create mode 100644 services/registration/invalid_pin.bin create mode 100644 services/registration/invalid_pin.vis create mode 100644 services/registration/invalid_pin_swa create mode 100644 services/registration/invalid_recipient create mode 100644 services/registration/invalid_recipient.bin create mode 100644 services/registration/invalid_recipient.vis create mode 100644 services/registration/invalid_recipient_swa create mode 100644 services/registration/invite_menu create mode 100644 services/registration/invite_menu_swa create mode 100644 services/registration/invite_recipient create mode 100644 services/registration/invite_recipient.bin create mode 100644 services/registration/invite_recipient.vis create mode 100644 services/registration/invite_recipient_swa create mode 100644 services/registration/invite_result.bin create mode 100644 services/registration/invite_result.vis create mode 100644 services/registration/kiswahili_menu create mode 100644 services/registration/language_changed create mode 100644 services/registration/language_changed.bin create mode 100644 services/registration/language_changed.vis create mode 100644 services/registration/language_changed_swa create mode 100644 services/registration/list_offering create mode 100644 services/registration/list_offering.bin create mode 100644 services/registration/list_offering.vis create mode 100644 services/registration/locale/swa/default.po create mode 100644 services/registration/main create mode 100644 services/registration/main.bin create mode 100644 services/registration/main.vis create mode 100644 services/registration/main_swa create mode 100644 services/registration/male_menu create mode 100644 services/registration/male_menu_swa create mode 100644 services/registration/my_account create mode 100644 services/registration/my_account.bin create mode 100644 services/registration/my_account.vis create mode 100644 services/registration/my_account_swa create mode 100644 services/registration/my_address_menu create mode 100644 services/registration/my_address_menu_swa create mode 100644 services/registration/my_balance create mode 100644 services/registration/my_balance.bin create mode 100644 services/registration/my_balance.vis create mode 100644 services/registration/my_balance_menu create mode 100644 services/registration/my_balance_menu_swa create mode 100644 services/registration/my_balance_swa create mode 100644 services/registration/my_vouchers create mode 100644 services/registration/my_vouchers.bin create mode 100644 services/registration/my_vouchers.vis create mode 100644 services/registration/new_pin create mode 100644 services/registration/new_pin.bin create mode 100644 services/registration/new_pin.vis create mode 100644 services/registration/new_pin_swa create mode 100644 services/registration/next_menu create mode 100644 services/registration/next_menu_swa create mode 100644 services/registration/no_admin_privilege create mode 100644 services/registration/no_admin_privilege.bin create mode 100644 services/registration/no_admin_privilege.vis create mode 100644 services/registration/no_admin_privilege_swa create mode 100644 services/registration/no_menu create mode 100644 services/registration/no_menu_swa create mode 100644 services/registration/no_transfers create mode 100644 services/registration/no_transfers.bin create mode 100644 services/registration/no_transfers.vis create mode 100644 services/registration/no_transfers_swa create mode 100644 services/registration/no_voucher create mode 100644 services/registration/no_voucher.bin create mode 100644 services/registration/no_voucher.vis create mode 100644 services/registration/no_voucher_swa create mode 100644 services/registration/old_pin create mode 100644 services/registration/old_pin.bin create mode 100644 services/registration/old_pin.vis create mode 100644 services/registration/old_pin_swa create mode 100644 services/registration/others_pin_mismatch create mode 100644 services/registration/others_pin_mismatch.bin create mode 100644 services/registration/others_pin_mismatch.vis create mode 100644 services/registration/others_pin_mismatch_swa create mode 100644 services/registration/pin_entry create mode 100644 services/registration/pin_entry.bin create mode 100644 services/registration/pin_entry.vis create mode 100644 services/registration/pin_entry_swa create mode 100644 services/registration/pin_management create mode 100644 services/registration/pin_management.bin create mode 100644 services/registration/pin_management.vis create mode 100644 services/registration/pin_management_swa create mode 100644 services/registration/pin_options_menu create mode 100644 services/registration/pin_options_menu_swa create mode 100644 services/registration/pin_reset_mismatch create mode 100644 services/registration/pin_reset_mismatch.bin create mode 100644 services/registration/pin_reset_mismatch.vis create mode 100644 services/registration/pin_reset_mismatch_swa create mode 100644 services/registration/pin_reset_result create mode 100644 services/registration/pin_reset_result.bin create mode 100644 services/registration/pin_reset_result.vis create mode 100644 services/registration/pin_reset_result_swa create mode 100644 services/registration/pin_reset_success create mode 100644 services/registration/pin_reset_success.bin create mode 100644 services/registration/pin_reset_success.vis create mode 100644 services/registration/pin_reset_success_swa create mode 100644 services/registration/pp.csv create mode 100644 services/registration/prev_menu create mode 100644 services/registration/prev_menu_swa create mode 100644 services/registration/profile_menu create mode 100644 services/registration/profile_menu_swa create mode 100644 services/registration/profile_update_success create mode 100644 services/registration/profile_update_success.bin create mode 100644 services/registration/profile_update_success.vis create mode 100644 services/registration/profile_update_success_swa create mode 100644 services/registration/quit.bin create mode 100644 services/registration/quit.vis create mode 100644 services/registration/quit_menu create mode 100644 services/registration/quit_menu_swa create mode 100644 services/registration/reset_pin_menu create mode 100644 services/registration/reset_pin_menu_swa create mode 100644 services/registration/retry_menu create mode 100644 services/registration/retry_menu_swa create mode 100644 services/registration/root create mode 100644 services/registration/root.bin create mode 100644 services/registration/root.vis create mode 100644 services/registration/root_swa create mode 100644 services/registration/select_gender create mode 100644 services/registration/select_gender.bin create mode 100644 services/registration/select_gender.vis create mode 100644 services/registration/select_gender_swa create mode 100644 services/registration/select_language create mode 100644 services/registration/select_language.bin create mode 100644 services/registration/select_language.vis create mode 100644 services/registration/select_voucher create mode 100644 services/registration/select_voucher.bin create mode 100644 services/registration/select_voucher.vis create mode 100644 services/registration/select_voucher_menu create mode 100644 services/registration/select_voucher_menu_swa create mode 100644 services/registration/select_voucher_swa create mode 100644 services/registration/send create mode 100644 services/registration/send.bin create mode 100644 services/registration/send.vis create mode 100644 services/registration/send_menu create mode 100644 services/registration/send_menu_swa create mode 100644 services/registration/send_swa create mode 100644 services/registration/set_default.bin create mode 100644 services/registration/set_default.vis create mode 100644 services/registration/set_eng.bin create mode 100644 services/registration/set_eng.vis create mode 100644 services/registration/set_female.bin create mode 100644 services/registration/set_female.vis create mode 100644 services/registration/set_male.bin create mode 100644 services/registration/set_male.vis create mode 100644 services/registration/set_swa.bin create mode 100644 services/registration/set_swa.vis create mode 100644 services/registration/set_unspecified.bin create mode 100644 services/registration/set_unspecified.vis create mode 100644 services/registration/terms create mode 100644 services/registration/terms.bin create mode 100644 services/registration/terms.vis create mode 100644 services/registration/terms_swa create mode 100644 services/registration/transaction_initiated.bin create mode 100644 services/registration/transaction_initiated.vis create mode 100644 services/registration/transaction_pin create mode 100644 services/registration/transaction_pin.bin create mode 100644 services/registration/transaction_pin.vis create mode 100644 services/registration/transaction_pin_swa create mode 100644 services/registration/transactions create mode 100644 services/registration/transactions.bin create mode 100644 services/registration/transactions.vis create mode 100644 services/registration/transactions_swa create mode 100644 services/registration/unregistered_number create mode 100644 services/registration/unregistered_number.bin create mode 100644 services/registration/unregistered_number.vis create mode 100644 services/registration/unregistered_number_swa create mode 100644 services/registration/unspecified_menu create mode 100644 services/registration/unspecified_menu_swa create mode 100644 services/registration/update_age create mode 100644 services/registration/update_familyname.bin create mode 100644 services/registration/update_familyname.vis create mode 100644 services/registration/update_firstname.bin create mode 100644 services/registration/update_firstname.vis create mode 100644 services/registration/update_gender.bin create mode 100644 services/registration/update_gender.vis create mode 100644 services/registration/update_location.bin create mode 100644 services/registration/update_location.vis create mode 100644 services/registration/update_offerings.bin create mode 100644 services/registration/update_offerings.vis create mode 100644 services/registration/update_profile_items.bin create mode 100644 services/registration/update_profile_items.vis create mode 100644 services/registration/update_success create mode 100644 services/registration/update_success.bin create mode 100644 services/registration/update_success.vis create mode 100644 services/registration/update_success_swa create mode 100644 services/registration/update_yob.bin create mode 100644 services/registration/update_yob.vis create mode 100644 services/registration/view_menu create mode 100644 services/registration/view_menu_swa create mode 100644 services/registration/view_profile create mode 100644 services/registration/view_profile.bin create mode 100644 services/registration/view_profile.vis create mode 100644 services/registration/view_profile_swa create mode 100644 services/registration/view_statement create mode 100644 services/registration/view_statement.bin create mode 100644 services/registration/view_statement.vis create mode 100644 services/registration/view_swa create mode 100644 services/registration/view_voucher create mode 100644 services/registration/view_voucher.bin create mode 100644 services/registration/view_voucher.vis create mode 100644 services/registration/view_voucher_swa create mode 100644 services/registration/voucher_details create mode 100644 services/registration/voucher_details.bin create mode 100644 services/registration/voucher_details.vis create mode 100644 services/registration/voucher_details_menu create mode 100644 services/registration/voucher_details_menu_swa create mode 100644 services/registration/voucher_details_swa create mode 100644 services/registration/voucher_set create mode 100644 services/registration/voucher_set.bin create mode 100644 services/registration/voucher_set.vis create mode 100644 services/registration/voucher_set_swa create mode 100644 services/registration/vouchers_menu create mode 100644 services/registration/vouchers_menu_swa create mode 100644 services/registration/yes_menu create mode 100644 services/registration/yes_menu_swa diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6d0368f --- /dev/null +++ b/.env.example @@ -0,0 +1,20 @@ +#Serve Http +PORT=7123 +HOST=127.0.0.1 + +#AfricasTalking USSD POST endpoint +AT_ENDPOINT=/ussd/africastalking + +#PostgreSQL +DB_CONN=postgres://postgres:strongpass@localhost:5432/urdt_ussd +#DB_TIMEZONE=Africa/Nairobi +#DB_SCHEMA=vise + +#External API Calls +CUSTODIAL_URL_BASE=http://localhost:5003 +BEARER_TOKEN=eyJeSIsInRcCI6IkpXVCJ.yJwdWJsaWNLZXkiOiIwrrrrrr +DATA_URL_BASE=http://localhost:5006 + +#Language +DEFAULT_LANGUAGE=eng +LANGUAGES=eng, swa diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b523c77 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +**/*.env +covprofile +go.work* +**/*/*.bin +**/*/.state/ +cmd/.state/ +id_* +*.gdbm +*.log diff --git a/cmd/africastalking/main.go b/cmd/africastalking/main.go new file mode 100644 index 0000000..532eeb4 --- /dev/null +++ b/cmd/africastalking/main.go @@ -0,0 +1,177 @@ +package main + +import ( + "context" + "flag" + "fmt" + "net/http" + "os" + "os/signal" + "path" + "strconv" + "syscall" + + "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/logging" + "git.defalsify.org/vise.git/lang" + "git.defalsify.org/vise.git/resource" + + "git.grassecon.net/grassrootseconomics/visedriver/config" + "git.grassecon.net/grassrootseconomics/visedriver/initializers" + "git.grassecon.net/grassrootseconomics/visedriver/remote" + "git.grassecon.net/grassrootseconomics/visedriver/common" + "git.grassecon.net/grassrootseconomics/visedriver/session" + + at "git.grassecon.net/grassrootseconomics/visedriver-africastalking/africastalking" + "git.grassecon.net/grassrootseconomics/visedriver-africastalking/args" + "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" +) + +var ( + logg = logging.NewVanilla().WithDomain("AfricasTalking").WithContextKey("at-session-id") + scriptDir = path.Join("services", "registration") + build = "dev" + menuSeparator = ": " +) + +func init() { + initializers.LoadEnvVariables() +} + +func main() { + config.LoadConfig() + + var connStr string + var resourceDir string + var size uint + var database string + var engineDebug bool + var host string + var port uint + var err error + var gettextDir string + var langs args.LangVar + + + flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir") + flag.StringVar(&connStr, "c", "", "connection string") + flag.BoolVar(&engineDebug, "d", false, "use engine debug output") + flag.UintVar(&size, "s", 160, "max size of output") + flag.StringVar(&host, "h", initializers.GetEnv("HOST", "127.0.0.1"), "http host") + flag.UintVar(&port, "p", initializers.GetEnvUint("PORT", 7123), "http port") + flag.StringVar(&gettextDir, "gettext", "", "use gettext translations from given directory") + flag.Var(&langs, "language", "add symbol resolution for language") + flag.Parse() + + if connStr == "" { + connStr = config.DbConn + } + connData, err := common.ToConnData(config.DbConn) + if err != nil { + fmt.Fprintf(os.Stderr, "connstr err: %v", err) + os.Exit(1) + } + + logg.Infof("start command", "build", build, "conn", connData, "resourcedir", resourceDir, "outputsize", size) + + ctx := context.Background() + ctx = context.WithValue(ctx, "Database", database) + ln, err := lang.LanguageFromCode(config.DefaultLanguage) + if err != nil { + fmt.Fprintf(os.Stderr, "default language set error: %v", err) + os.Exit(1) + } + ctx = context.WithValue(ctx, "Language", ln) + + pfp := path.Join(scriptDir, "pp.csv") + + cfg := engine.Config{ + Root: "root", + OutputSize: uint32(size), + FlagCount: uint32(128), + MenuSeparator: menuSeparator, + } + + if engineDebug { + cfg.EngineDebug = true + } + + menuStorageService, err := common.NewStorageService(connData) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + rs, err := menuStorageService.GetResource(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + userdataStore, err := menuStorageService.GetUserdataDb(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer userdataStore.Close() + + dbResource, ok := rs.(*resource.DbResource) + if !ok { + os.Exit(1) + } + + lhs, err := handlers.NewLocalHandlerService(ctx, pfp, true, dbResource, cfg, rs) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + lhs.SetDataStore(&userdataStore) + + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + accountService := remote.AccountService{} + hl, err := lhs.GetHandler(&accountService) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + stateStore, err := menuStorageService.GetStateStore(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer stateStore.Close() + + rp := &at.ATRequestParser{} + bsh := session.NewBaseSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl) + sh := at.NewATSessionHandler(bsh) + + mux := http.NewServeMux() + mux.Handle(initializers.GetEnv("AT_ENDPOINT", "/"), sh) + + s := &http.Server{ + Addr: fmt.Sprintf("%s:%s", host, strconv.Itoa(int(port))), + Handler: mux, + } + s.RegisterOnShutdown(sh.Shutdown) + + cint := make(chan os.Signal) + cterm := make(chan os.Signal) + signal.Notify(cint, os.Interrupt, syscall.SIGINT) + signal.Notify(cterm, os.Interrupt, syscall.SIGTERM) + go func() { + select { + case _ = <-cint: + case _ = <-cterm: + } + s.Shutdown(ctx) + }() + err = s.ListenAndServe() + if err != nil { + logg.Infof("Server closed with error", "err", err) + } +} diff --git a/cmd/async/main.go b/cmd/async/main.go new file mode 100644 index 0000000..ba25ba0 --- /dev/null +++ b/cmd/async/main.go @@ -0,0 +1,199 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + "os/signal" + "path" + "syscall" + + "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" + "git.defalsify.org/vise.git/logging" + "git.defalsify.org/vise.git/resource" + + "git.grassecon.net/grassrootseconomics/visedriver/config" + "git.grassecon.net/grassrootseconomics/visedriver/initializers" + "git.grassecon.net/grassrootseconomics/visedriver/storage" + "git.grassecon.net/grassrootseconomics/visedriver/session" + "git.grassecon.net/grassrootseconomics/visedriver/remote" + "git.grassecon.net/grassrootseconomics/visedriver/request" + "git.grassecon.net/grassrootseconomics/sarafu-vise/args" + "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" +) + +var ( + logg = logging.NewVanilla() + scriptDir = path.Join("services", "registration") + menuSeparator = ": " +) + +func init() { + initializers.LoadEnvVariables() +} + +type asyncRequestParser struct { + sessionId string + input []byte +} + +func (p *asyncRequestParser) GetSessionId(ctx context.Context, r any) (string, error) { + return p.sessionId, nil +} + +func (p *asyncRequestParser) GetInput(r any) ([]byte, error) { + return p.input, nil +} + +func main() { + config.LoadConfig() + + var connStr string + var sessionId string + var resourceDir string + var size uint + var engineDebug bool + var host string + var port uint + var err error + var gettextDir string + var langs args.LangVar + + flag.StringVar(&sessionId, "session-id", "075xx2123", "session id") + flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir") + flag.StringVar(&connStr, "c", "", "connection string") + flag.BoolVar(&engineDebug, "d", false, "use engine debug output") + flag.UintVar(&size, "s", 160, "max size of output") + flag.StringVar(&host, "h", initializers.GetEnv("HOST", "127.0.0.1"), "http host") + flag.UintVar(&port, "p", initializers.GetEnvUint("PORT", 7123), "http port") + flag.StringVar(&gettextDir, "gettext", "", "use gettext translations from given directory") + flag.Var(&langs, "language", "add symbol resolution for language") + flag.Parse() + + if connStr == "" { + connStr = config.DbConn + } + connData, err := storage.ToConnData(connStr) + if err != nil { + fmt.Fprintf(os.Stderr, "connstr err: %v", err) + os.Exit(1) + } + + logg.Infof("start command", "conn", connData, "resourcedir", resourceDir, "outputsize", size, "sessionId", sessionId) + + ctx := context.Background() + + ln, err := lang.LanguageFromCode(config.DefaultLanguage) + if err != nil { + fmt.Fprintf(os.Stderr, "default language set error: %v", err) + os.Exit(1) + } + ctx = context.WithValue(ctx, "Language", ln) + + pfp := path.Join(scriptDir, "pp.csv") + + cfg := engine.Config{ + Root: "root", + OutputSize: uint32(size), + FlagCount: uint32(128), + MenuSeparator: menuSeparator, + } + + if engineDebug { + cfg.EngineDebug = true + } + + menuStorageService := storage.NewMenuStorageService(connData, resourceDir) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + rs, err := menuStorageService.GetResource(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + userdataStore, err := menuStorageService.GetUserdataDb(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer userdataStore.Close() + + dbResource, ok := rs.(*resource.DbResource) + if !ok { + os.Exit(1) + } + + lhs, err := handlers.NewLocalHandlerService(ctx, pfp, true, dbResource, cfg, rs) + lhs.SetDataStore(&userdataStore) + accountService := remote.AccountService{} + + hl, err := lhs.GetHandler(&accountService) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + stateStore, err := menuStorageService.GetStateStore(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer stateStore.Close() + + rp := &asyncRequestParser{ + sessionId: sessionId, + } + sh := session.NewBaseSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl) + cfg.SessionId = sessionId + rqs := request.RequestSession{ + Ctx: ctx, + Writer: os.Stdout, + Config: cfg, + } + + cint := make(chan os.Signal) + cterm := make(chan os.Signal) + signal.Notify(cint, os.Interrupt, syscall.SIGINT) + signal.Notify(cterm, os.Interrupt, syscall.SIGTERM) + go func() { + select { + case _ = <-cint: + case _ = <-cterm: + } + sh.Shutdown() + }() + + for true { + rqs, err = sh.Process(rqs) + if err != nil { + logg.ErrorCtxf(ctx, "error in process: %v", "err", err) + fmt.Errorf("error in process: %v", err) + os.Exit(1) + } + rqs, err = sh.Output(rqs) + if err != nil { + logg.ErrorCtxf(ctx, "error in output: %v", "err", err) + fmt.Errorf("error in output: %v", err) + os.Exit(1) + } + rqs, err = sh.Reset(rqs) + if err != nil { + logg.ErrorCtxf(ctx, "error in reset: %v", "err", err) + fmt.Errorf("error in reset: %v", err) + os.Exit(1) + } + fmt.Println("") + _, err = fmt.Scanln(&rqs.Input) + if err != nil { + logg.ErrorCtxf(ctx, "error in input", "err", err) + fmt.Errorf("error in input: %v", err) + os.Exit(1) + } + } +} diff --git a/cmd/http/main.go b/cmd/http/main.go new file mode 100644 index 0000000..ae43a68 --- /dev/null +++ b/cmd/http/main.go @@ -0,0 +1,162 @@ +package main + +import ( + "context" + "flag" + "fmt" + "net/http" + "os" + "os/signal" + "path" + "strconv" + "syscall" + + "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/lang" + "git.defalsify.org/vise.git/logging" + "git.defalsify.org/vise.git/resource" + + "git.grassecon.net/grassrootseconomics/visedriver/config" + "git.grassecon.net/grassrootseconomics/visedriver/initializers" + httpsession "git.grassecon.net/grassrootseconomics/visedriver/session/http" + "git.grassecon.net/grassrootseconomics/visedriver/storage" + "git.grassecon.net/grassrootseconomics/visedriver/session" + "git.grassecon.net/grassrootseconomics/visedriver/remote" + + "git.grassecon.net/grassrootseconomics/sarafu-vise/args" + "git.grassecon.net/grassrootseconomics/sarafu-vise/handlers" +) + +var ( + logg = logging.NewVanilla() + scriptDir = path.Join("services", "registration") + menuSeparator = ": " +) + +func init() { + initializers.LoadEnvVariables() +} + +func main() { + config.LoadConfig() + + var connStr string + var resourceDir string + var size uint + var engineDebug bool + var host string + var port uint + var err error + var gettextDir string + var langs args.LangVar + + flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir") + flag.StringVar(&connStr, "c", "", "connection string") + flag.BoolVar(&engineDebug, "d", false, "use engine debug output") + flag.UintVar(&size, "s", 160, "max size of output") + flag.StringVar(&host, "h", initializers.GetEnv("HOST", "127.0.0.1"), "http host") + flag.UintVar(&port, "p", initializers.GetEnvUint("PORT", 7123), "http port") + flag.StringVar(&gettextDir, "gettext", "", "use gettext translations from given directory") + flag.Var(&langs, "language", "add symbol resolution for language") + flag.Parse() + + if connStr == "" { + connStr = config.DbConn + } + connData, err := storage.ToConnData(connStr) + if err != nil { + fmt.Fprintf(os.Stderr, "connstr err: %v", err) + os.Exit(1) + } + + logg.Infof("start command", "conn", connData, "resourcedir", resourceDir, "outputsize", size) + + ctx := context.Background() + + ln, err := lang.LanguageFromCode(config.DefaultLanguage) + if err != nil { + fmt.Fprintf(os.Stderr, "default language set error: %v", err) + os.Exit(1) + } + ctx = context.WithValue(ctx, "Language", ln) + + pfp := path.Join(scriptDir, "pp.csv") + + cfg := engine.Config{ + Root: "root", + OutputSize: uint32(size), + FlagCount: uint32(128), + MenuSeparator: menuSeparator, + } + + if engineDebug { + cfg.EngineDebug = true + } + + menuStorageService := storage.NewMenuStorageService(connData, resourceDir) + + rs, err := menuStorageService.GetResource(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + userdataStore, err := menuStorageService.GetUserdataDb(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer userdataStore.Close() + + dbResource, ok := rs.(*resource.DbResource) + if !ok { + os.Exit(1) + } + + lhs, err := handlers.NewLocalHandlerService(ctx, pfp, true, dbResource, cfg, rs) + lhs.SetDataStore(&userdataStore) + + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + accountService := remote.AccountService{} + hl, err := lhs.GetHandler(&accountService) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + + stateStore, err := menuStorageService.GetStateStore(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, err.Error()) + os.Exit(1) + } + defer stateStore.Close() + + rp := &httpsession.DefaultRequestParser{} + bsh := session.NewBaseSessionHandler(cfg, rs, stateStore, userdataStore, rp, hl) + sh := httpsession.NewHTTPSessionHandler(bsh) + s := &http.Server{ + Addr: fmt.Sprintf("%s:%s", host, strconv.Itoa(int(port))), + Handler: sh, + } + s.RegisterOnShutdown(sh.Shutdown) + + cint := make(chan os.Signal) + cterm := make(chan os.Signal) + signal.Notify(cint, os.Interrupt, syscall.SIGINT) + signal.Notify(cterm, os.Interrupt, syscall.SIGTERM) + go func() { + select { + case _ = <-cint: + case _ = <-cterm: + } + s.Shutdown(ctx) + }() + err = s.ListenAndServe() + if err != nil { + logg.Infof("Server closed with error", "err", err) + } +} diff --git a/cmd/ssh/README.md b/cmd/ssh/README.md new file mode 100644 index 0000000..ff325d7 --- /dev/null +++ b/cmd/ssh/README.md @@ -0,0 +1,34 @@ +# URDT-USSD SSH server + +An SSH server entry point for the vise engine. + + +## Adding public keys for access + +Map your (client) public key to a session identifier (e.g. phone number) + +``` +go run -v -tags logtrace ./cmd/ssh/sshkey/main.go -i [--dbdir ] +``` + + +## Create a private key for the server + +``` +ssh-keygen -N "" -f +``` + + +## Run the server + + +``` +go run -v -tags logtrace ./cmd/ssh/main.go -h -p [--dbdir ] +``` + + +## Connect to the server + +``` +ssh [-v] -T -p -i +``` diff --git a/cmd/ssh/main.go b/cmd/ssh/main.go new file mode 100644 index 0000000..82e5bbf --- /dev/null +++ b/cmd/ssh/main.go @@ -0,0 +1,144 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + "os/signal" + "path" + "sync" + "syscall" + + "git.defalsify.org/vise.git/db" + "git.defalsify.org/vise.git/engine" + "git.defalsify.org/vise.git/logging" + + "git.grassecon.net/grassrootseconomics/visedriver/config" + "git.grassecon.net/grassrootseconomics/visedriver/initializers" + "git.grassecon.net/grassrootseconomics/sarafu-vise/ssh" + "git.grassecon.net/grassrootseconomics/visedriver/storage" +) + +var ( + wg sync.WaitGroup + keyStore db.Db + logg = logging.NewVanilla() + scriptDir = path.Join("services", "registration") + + build = "dev" +) + +func init() { + initializers.LoadEnvVariables() +} + +func main() { + config.LoadConfig() + + var connStr string + var authConnStr string + var resourceDir string + var size uint + var engineDebug bool + var stateDebug bool + var host string + var port uint + flag.StringVar(&connStr, "c", "", "connection string") + flag.StringVar(&authConnStr, "authdb", "", "auth connection string") + flag.StringVar(&resourceDir, "resourcedir", path.Join("services", "registration"), "resource dir") + flag.BoolVar(&engineDebug, "d", false, "use engine debug output") + flag.UintVar(&size, "s", 160, "max size of output") + flag.StringVar(&host, "h", "127.0.0.1", "socket host") + flag.UintVar(&port, "p", 7122, "socket port") + flag.Parse() + + if connStr == "" { + connStr = config.DbConn + } + if authConnStr == "" { + authConnStr = connStr + } + connData, err := storage.ToConnData(connStr) + if err != nil { + fmt.Fprintf(os.Stderr, "connstr err: %v", err) + os.Exit(1) + } + authConnData, err := storage.ToConnData(authConnStr) + if err != nil { + fmt.Fprintf(os.Stderr, "auth connstr err: %v", err) + os.Exit(1) + } + + sshKeyFile := flag.Arg(0) + _, err = os.Stat(sshKeyFile) + if err != nil { + fmt.Fprintf(os.Stderr, "cannot open ssh server private key file: %v\n", err) + os.Exit(1) + } + + ctx := context.Background() + logg.WarnCtxf(ctx, "!!!!! WARNING WARNING WARNING") + logg.WarnCtxf(ctx, "!!!!! =======================") + logg.WarnCtxf(ctx, "!!!!! This is not a production ready server!") + logg.WarnCtxf(ctx, "!!!!! Do not expose to internet and only use with tunnel!") + logg.WarnCtxf(ctx, "!!!!! (See ssh -L <...>)") + + logg.Infof("start command", "conn", connData, "authconn", authConnData, "resourcedir", resourceDir, "outputsize", size, "keyfile", sshKeyFile, "host", host, "port", port) + + pfp := path.Join(scriptDir, "pp.csv") + + cfg := engine.Config{ + Root: "root", + OutputSize: uint32(size), + FlagCount: uint32(16), + } + if stateDebug { + cfg.StateDebug = true + } + if engineDebug { + cfg.EngineDebug = true + } + + authKeyStore, err := ssh.NewSshKeyStore(ctx, authConnData.String()) + if err != nil { + fmt.Fprintf(os.Stderr, "keystore file open error: %v", err) + os.Exit(1) + } + defer func() { + logg.TraceCtxf(ctx, "shutdown auth key store reached") + err = authKeyStore.Close() + if err != nil { + logg.ErrorCtxf(ctx, "keystore close error", "err", err) + } + }() + + cint := make(chan os.Signal) + cterm := make(chan os.Signal) + signal.Notify(cint, os.Interrupt, syscall.SIGINT) + signal.Notify(cterm, os.Interrupt, syscall.SIGTERM) + + runner := &ssh.SshRunner{ + Cfg: cfg, + Debug: engineDebug, + FlagFile: pfp, + Conn: connData, + ResourceDir: resourceDir, + SrvKeyFile: sshKeyFile, + Host: host, + Port: port, + } + go func() { + select { + case _ = <-cint: + case _ = <-cterm: + } + logg.TraceCtxf(ctx, "shutdown runner reached") + err := runner.Stop() + if err != nil { + logg.ErrorCtxf(ctx, "runner stop error", "err", err) + } + + }() + runner.Run(ctx, authKeyStore) +} diff --git a/cmd/ssh/sshkey/main.go b/cmd/ssh/sshkey/main.go new file mode 100644 index 0000000..3aac78c --- /dev/null +++ b/cmd/ssh/sshkey/main.go @@ -0,0 +1,44 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + + "git.grassecon.net/grassrootseconomics/sarafu-vise/ssh" +) + +func main() { + var dbDir string + var sessionId string + flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from") + flag.StringVar(&sessionId, "i", "", "session id") + flag.Parse() + + if sessionId == "" { + fmt.Fprintf(os.Stderr, "empty session id\n") + os.Exit(1) + } + + ctx := context.Background() + + sshKeyFile := flag.Arg(0) + if sshKeyFile == "" { + fmt.Fprintf(os.Stderr, "missing key file argument\n") + os.Exit(1) + } + + store, err := ssh.NewSshKeyStore(ctx, dbDir) + if err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } + defer store.Close() + + err = store.AddFromFile(ctx, sshKeyFile, sessionId) + if err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } +} diff --git a/go.mod b/go.mod index 18e3399..876cc3c 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.23.4 require ( git.defalsify.org/vise.git v0.2.3-0.20250103172917-3e190a44568d - git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250110203936-8387644019e6 - git.grassecon.net/urdt/ussd v0.8.0-beta.11 + git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250111151614-46bf21b7b8bd + git.grassecon.net/grassrootseconomics/visedriver-africastalking v0.0.0-20250111150203-fd8301144509 github.com/alecthomas/assert/v2 v2.2.2 github.com/gofrs/uuid v4.4.0+incompatible github.com/grassrootseconomics/ussd-data-service v1.2.0-beta diff --git a/go.sum b/go.sum index dcd6549..18547a9 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ git.defalsify.org/vise.git v0.2.3-0.20250103172917-3e190a44568d h1:bPAOVZOX4frSGhfOdcj7kc555f8dc9DmMd2YAyC2AMw= git.defalsify.org/vise.git v0.2.3-0.20250103172917-3e190a44568d/go.mod h1:jyBMe1qTYUz3mmuoC9JQ/TvFeW0vTanCUcPu3H8p4Ck= -git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250110203936-8387644019e6 h1:KvcNmeY9EpvsVtcwYW48FxTb7cTdDY1aX0Jcwd649c0= -git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250110203936-8387644019e6/go.mod h1:E6W7ZOa7ZvVr0Bc5ot0LNSwpSPYq4hXlAIvEPy3AJ7U= -git.grassecon.net/urdt/ussd v0.8.0-beta.11 h1:lAKH5DI21cD+YlS9J+69h5OR45LyYo7dQkufol926FI= -git.grassecon.net/urdt/ussd v0.8.0-beta.11/go.mod h1:Xct45L7FUE4pYtLN4gmhkMCoafUNpcOJ7horP9kPDAc= +git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250111151614-46bf21b7b8bd h1:mKCov8udBJBQuMF3aFg38SkClL8OvAUZmtArNzgIPak= +git.grassecon.net/grassrootseconomics/visedriver v0.8.0-beta.10.0.20250111151614-46bf21b7b8bd/go.mod h1:E6W7ZOa7ZvVr0Bc5ot0LNSwpSPYq4hXlAIvEPy3AJ7U= +git.grassecon.net/grassrootseconomics/visedriver-africastalking v0.0.0-20250111150203-fd8301144509 h1:xlX2FAJkjn1/VS/1z8A9eSGnKWDUmBJy+GtEEDRmggc= +git.grassecon.net/grassrootseconomics/visedriver-africastalking v0.0.0-20250111150203-fd8301144509/go.mod h1:FwJ9MQtaKlDThtL0ovxZXBIDJoDNgiSeSAxeZNriQJk= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g= diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index ccfbc87..3991789 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -21,7 +21,6 @@ import ( "git.grassecon.net/grassrootseconomics/visedriver/utils" "git.grassecon.net/grassrootseconomics/visedriver/models" "git.grassecon.net/grassrootseconomics/visedriver/remote" - "git.grassecon.net/grassrootseconomics/visedriver/handlers" "gopkg.in/leonelquinteros/gotext.v1" dbstorage "git.grassecon.net/grassrootseconomics/visedriver/storage/db" @@ -39,10 +38,6 @@ type FlagManager struct { parser *asm.FlagParser } -type MenuHandlers struct { - *handlers.Handlers -} - // NewFlagManager creates a new FlagManager instance func NewFlagManager(csvPath string) (*FlagManager, error) { parser := asm.NewFlagParser() @@ -61,12 +56,55 @@ func (fm *FlagManager) GetFlag(label string) (uint32, error) { return fm.parser.GetFlag(label) } -func ToMenuHandlers(h *handlers.Handlers) *MenuHandlers { - return &MenuHandlers{ - Handlers: h, - } +type MenuHandlers struct { + pe *persist.Persister + st *state.State + ca cache.Memory + userdataStore common.DataStore + adminstore *utils.AdminStore + flagManager *asm.FlagParser + accountService remote.AccountServiceInterface + prefixDb dbstorage.PrefixDb + profile *models.Profile + ReplaceSeparatorFunc func(string) string } +// NewHandlers creates a new instance of the Handlers struct with the provided dependencies. +func NewMenuHandlers(appFlags *asm.FlagParser, userdataStore db.Db, adminstore *utils.AdminStore, accountService remote.AccountServiceInterface, replaceSeparatorFunc func(string) string) (*MenuHandlers, error) { + if userdataStore == nil { + return nil, fmt.Errorf("cannot create handler with nil userdata store") + } + userDb := &common.UserDataStore{ + Db: userdataStore, + } + + // Instantiate the SubPrefixDb with "DATATYPE_USERDATA" prefix + prefix := common.ToBytes(db.DATATYPE_USERDATA) + prefixDb := dbstorage.NewSubPrefixDb(userdataStore, prefix) + + h := &MenuHandlers{ + userdataStore: userDb, + flagManager: appFlags, + adminstore: adminstore, + accountService: accountService, + prefixDb: prefixDb, + profile: &models.Profile{Max: 6}, + ReplaceSeparatorFunc: replaceSeparatorFunc, + } + return h, nil +} + +// WithPersister sets persister instance to the handlers. +//func (h *MenuHandlers) WithPersister(pe *persist.Persister) *MenuHandlers { +func (h *MenuHandlers) SetPersister(pe *persist.Persister) { + if h.pe != nil { + panic("persister already set") + } + h.pe = pe + //return h +} + + // Init initializes the handler for a new session. func (h *MenuHandlers) Init(ctx context.Context, sym string, input []byte) (resource.Result, error) { var r resource.Result @@ -121,6 +159,7 @@ func (h *MenuHandlers) SetLanguage(ctx context.Context, sym string, input []byte symbol, _ := h.st.Where() code := strings.Split(symbol, "_")[1] + // TODO: Use defaultlanguage from config if !utils.IsValidISO639(code) { //Fallback to english instead? code = "eng" diff --git a/handlers/application/menuhandler_test.go b/handlers/application/menuhandler_test.go index a87ce58..c34cc51 100644 --- a/handlers/application/menuhandler_test.go +++ b/handlers/application/menuhandler_test.go @@ -72,7 +72,7 @@ func InitializeTestSubPrefixDb(t *testing.T, ctx context.Context) *dbstorage.Sub return spdb } -func TestNewHandlers(t *testing.T) { +func TestNewMenuHandlers(t *testing.T) { _, store := InitializeTestStore(t) fm, err := NewFlagManager(flagsPath) @@ -84,7 +84,7 @@ func TestNewHandlers(t *testing.T) { // Test case for valid UserDataStore t.Run("Valid UserDataStore", func(t *testing.T) { - handlers, err := NewHandlers(fm.parser, store, nil, &accountService, mockReplaceSeparator) + handlers, err := NewMenuHandlers(fm.parser, store, nil, &accountService, mockReplaceSeparator) if err != nil { t.Fatalf("expected no error, got %v", err) } @@ -108,7 +108,7 @@ func TestNewHandlers(t *testing.T) { // Test case for nil UserDataStore t.Run("Nil UserDataStore", func(t *testing.T) { - handlers, err := NewHandlers(fm.parser, nil, nil, &accountService, mockReplaceSeparator) + handlers, err := NewMenuHandlers(fm.parser, nil, nil, &accountService, mockReplaceSeparator) if err == nil { t.Fatal("expected an error, got none") } @@ -144,23 +144,23 @@ func TestInit(t *testing.T) { tests := []struct { name string - setup func() (*Handlers, context.Context) + setup func() (*MenuHandlers, context.Context) input []byte expectedResult resource.Result }{ { name: "Handler not ready", - setup: func() (*Handlers, context.Context) { - return &Handlers{}, ctx + setup: func() (*MenuHandlers, context.Context) { + return &MenuHandlers{}, ctx }, input: []byte("1"), expectedResult: resource.Result{}, }, { name: "State and memory initialization", - setup: func() (*Handlers, context.Context) { + setup: func() (*MenuHandlers, context.Context) { pe := persist.NewPersister(store).WithSession(sessionId).WithContent(st, ca) - h := &Handlers{ + h := &MenuHandlers{ flagManager: fm.parser, adminstore: adminstore, pe: pe, @@ -174,9 +174,9 @@ func TestInit(t *testing.T) { }, { name: "Non-admin session initialization", - setup: func() (*Handlers, context.Context) { + setup: func() (*MenuHandlers, context.Context) { pe := persist.NewPersister(store).WithSession("0712345678").WithContent(st, ca) - h := &Handlers{ + h := &MenuHandlers{ flagManager: fm.parser, adminstore: adminstore, pe: pe, @@ -190,9 +190,9 @@ func TestInit(t *testing.T) { }, { name: "Move to top node on empty input", - setup: func() (*Handlers, context.Context) { + setup: func() (*MenuHandlers, context.Context) { pe := persist.NewPersister(store).WithSession(sessionId).WithContent(st, ca) - h := &Handlers{ + h := &MenuHandlers{ flagManager: fm.parser, adminstore: adminstore, pe: pe, @@ -253,7 +253,7 @@ func TestCreateAccount(t *testing.T) { t.Run(tt.name, func(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -275,20 +275,20 @@ func TestCreateAccount(t *testing.T) { func TestWithPersister(t *testing.T) { // Test case: Setting a persister - h := &Handlers{} + h := &MenuHandlers{} p := &persist.Persister{} - result := h.WithPersister(p) + h.SetPersister(p) assert.Equal(t, p, h.pe, "The persister should be set correctly.") - assert.Equal(t, h, result, "The returned handler should be the same instance.") + //assert.Equal(t, h, result, "The returned handler should be the same instance.") } func TestWithPersister_PanicWhenAlreadySet(t *testing.T) { // Test case: Panic on multiple calls - h := &Handlers{pe: &persist.Persister{}} + h := &MenuHandlers{pe: &persist.Persister{}} require.Panics(t, func() { - h.WithPersister(&persist.Persister{}) + h.SetPersister(&persist.Persister{}) }, "Should panic when trying to set a persister again.") } @@ -317,8 +317,8 @@ func TestSaveFirstname(t *testing.T) { expectedResult.FlagSet = []uint32{flag_firstname_set} - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, st: mockState, @@ -361,8 +361,8 @@ func TestSaveFamilyname(t *testing.T) { t.Fatal(err) } - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, st: mockState, flagManager: fm.parser, @@ -405,8 +405,8 @@ func TestSaveYoB(t *testing.T) { expectedResult.FlagSet = []uint32{flag_yob_set} - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, st: mockState, @@ -449,8 +449,8 @@ func TestSaveLocation(t *testing.T) { expectedResult.FlagSet = []uint32{flag_location_set} - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, st: mockState, @@ -493,8 +493,8 @@ func TestSaveOfferings(t *testing.T) { expectedResult.FlagSet = []uint32{flag_offerings_set} - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, st: mockState, @@ -560,8 +560,8 @@ func TestSaveGender(t *testing.T) { } mockState.ExecPath = append(mockState.ExecPath, tt.executingSymbol) - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, st: mockState, flagManager: fm.parser, @@ -597,8 +597,8 @@ func TestSaveTemporaryPin(t *testing.T) { flag_incorrect_pin, _ := fm.parser.GetFlag("flag_incorrect_pin") - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, userdataStore: store, } @@ -668,8 +668,8 @@ func TestCheckIdentifier(t *testing.T) { t.Fatal(err) } - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, } @@ -688,8 +688,8 @@ func TestGetSender(t *testing.T) { ctx, _ := InitializeTestStore(t) ctx = context.WithValue(ctx, "SessionId", sessionId) - // Create the Handlers instance - h := &Handlers{} + // Create the MenuHandlers instance + h := &MenuHandlers{} // Call the method res, _ := h.GetSender(ctx, "get_sender", []byte("")) @@ -717,8 +717,8 @@ func TestGetAmount(t *testing.T) { t.Fatal(err) } - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, } @@ -743,8 +743,8 @@ func TestGetRecipient(t *testing.T) { t.Fatal(err) } - // Create the Handlers instance with the mock store - h := &Handlers{ + // Create the MenuHandlers instance with the mock store + h := &MenuHandlers{ userdataStore: store, } @@ -810,8 +810,8 @@ func TestSetLanguage(t *testing.T) { // Set the ExecPath mockState.ExecPath = tt.execPath - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, userdataStore: store, st: mockState, @@ -854,8 +854,8 @@ func TestResetAllowUpdate(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, } @@ -896,8 +896,8 @@ func TestResetAccountAuthorized(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, } @@ -979,8 +979,8 @@ func TestIncorrectPinReset(t *testing.T) { t.Fatal(err) } - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, userdataStore: store, } @@ -1022,8 +1022,8 @@ func TestResetIncorrectYob(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - // Create the Handlers instance with the mock flag manager - h := &Handlers{ + // Create the MenuHandlers instance with the mock flag manager + h := &MenuHandlers{ flagManager: fm.parser, } @@ -1059,7 +1059,7 @@ func TestAuthorize(t *testing.T) { // Set 1234 is the correct account pin accountPIN := "1234" - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1133,7 +1133,7 @@ func TestVerifyYob(t *testing.T) { flag_incorrect_date_format, _ := fm.parser.GetFlag("flag_incorrect_date_format") ctx := context.WithValue(context.Background(), "SessionId", sessionId) - h := &Handlers{ + h := &MenuHandlers{ accountService: mockAccountService, flagManager: fm.parser, st: mockState, @@ -1199,7 +1199,7 @@ func TestVerifyCreatePin(t *testing.T) { flag_pin_mismatch, _ := fm.parser.GetFlag("flag_pin_mismatch") flag_pin_set, _ := fm.parser.GetFlag("flag_pin_set") - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1293,7 +1293,7 @@ func TestCheckAccountStatus(t *testing.T) { t.Run(tt.name, func(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1333,7 +1333,7 @@ func TestTransactionReset(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1380,7 +1380,7 @@ func TestResetTransactionAmount(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1424,7 +1424,7 @@ func TestInitiateTransaction(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1521,7 +1521,7 @@ func TestQuit(t *testing.T) { ctx := context.WithValue(context.Background(), "SessionId", sessionId) - h := &Handlers{ + h := &MenuHandlers{ accountService: mockAccountService, flagManager: fm.parser, } @@ -1570,7 +1570,7 @@ func TestValidateAmount(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -1691,8 +1691,8 @@ func TestValidateRecipient(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - // Create the Handlers instance - h := &Handlers{ + // Create the MenuHandlers instance + h := &MenuHandlers{ flagManager: fm.parser, userdataStore: store, accountService: mockAccountService, @@ -1745,7 +1745,7 @@ func TestCheckBalance(t *testing.T) { mockAccountService := new(mocks.MockAccountService) ctx := context.WithValue(ctx, "SessionId", tt.sessionId) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, } @@ -1780,7 +1780,7 @@ func TestGetProfile(t *testing.T) { mockAccountService := new(mocks.MockAccountService) mockState := state.NewState(16) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, st: mockState, @@ -1858,7 +1858,7 @@ func TestVerifyNewPin(t *testing.T) { flag_valid_pin, _ := fm.parser.GetFlag("flag_valid_pin") mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ flagManager: fm.parser, accountService: mockAccountService, } @@ -1904,7 +1904,7 @@ func TestConfirmPin(t *testing.T) { fm, _ := NewFlagManager(flagsPath) flag_pin_mismatch, _ := fm.parser.GetFlag("flag_pin_mismatch") mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, accountService: mockAccountService, @@ -1968,7 +1968,7 @@ func TestFetchCommunityBalance(t *testing.T) { mockAccountService := new(mocks.MockAccountService) mockState := state.NewState(16) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, st: mockState, accountService: mockAccountService, @@ -2033,7 +2033,7 @@ func TestSetDefaultVoucher(t *testing.T) { t.Run(tt.name, func(t *testing.T) { mockAccountService := new(mocks.MockAccountService) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, flagManager: fm.parser, @@ -2066,7 +2066,7 @@ func TestCheckVouchers(t *testing.T) { ctx = context.WithValue(ctx, "SessionId", sessionId) spdb := InitializeTestSubPrefixDb(t, ctx) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, accountService: mockAccountService, prefixDb: spdb, @@ -2108,8 +2108,8 @@ func TestGetVoucherList(t *testing.T) { spdb := InitializeTestSubPrefixDb(t, ctx) - // Initialize Handlers - h := &Handlers{ + // Initialize MenuHandlers + h := &MenuHandlers{ prefixDb: spdb, ReplaceSeparatorFunc: mockReplaceSeparator, } @@ -2142,7 +2142,7 @@ func TestViewVoucher(t *testing.T) { spdb := InitializeTestSubPrefixDb(t, ctx) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, prefixDb: spdb, @@ -2175,7 +2175,7 @@ func TestSetVoucher(t *testing.T) { ctx = context.WithValue(ctx, "SessionId", sessionId) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, } @@ -2215,7 +2215,7 @@ func TestGetVoucherDetails(t *testing.T) { tokA_AAddress := "0x0000000000000000000000000000000000000000" - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, flagManager: fm.parser, accountService: mockAccountService, @@ -2246,7 +2246,7 @@ func TestCountIncorrectPINAttempts(t *testing.T) { ctx = context.WithValue(ctx, "SessionId", sessionId) attempts := uint8(2) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, } err := store.WriteEntry(ctx, sessionId, common.DATA_INCORRECT_PIN_ATTEMPTS, []byte(strconv.Itoa(int(attempts)))) @@ -2279,7 +2279,7 @@ func TestResetIncorrectPINAttempts(t *testing.T) { t.Logf(err.Error()) } - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, } h.resetIncorrectPINAttempts(ctx, sessionId) @@ -2298,7 +2298,7 @@ func TestPersistLanguageCode(t *testing.T) { sessionId := "session123" ctx = context.WithValue(ctx, "SessionId", sessionId) - h := &Handlers{ + h := &MenuHandlers{ userdataStore: store, } tests := []struct { diff --git a/handlers/local.go b/handlers/local.go index 211e31e..bf800f1 100644 --- a/handlers/local.go +++ b/handlers/local.go @@ -16,7 +16,7 @@ import ( ) type HandlerService interface { - GetHandler() (*application.Handlers, error) + GetHandler() (*application.MenuHandlers, error) } func getParser(fp string, debug bool) (*asm.FlagParser, error) { @@ -64,16 +64,17 @@ func (ls *LocalHandlerService) SetDataStore(db *db.Db) { ls.UserdataStore = db } -func (ls *LocalHandlerService) GetHandler(accountService remote.AccountServiceInterface) (*application.Handlers, error) { +func (ls *LocalHandlerService) GetHandler(accountService remote.AccountServiceInterface) (*application.MenuHandlers, error) { replaceSeparatorFunc := func(input string) string { return strings.ReplaceAll(input, ":", ls.Cfg.MenuSeparator) } - appHandlers, err := application.NewHandlers(ls.Parser, *ls.UserdataStore, ls.AdminStore, accountService, replaceSeparatorFunc) + appHandlers, err := application.NewMenuHandlers(ls.Parser, *ls.UserdataStore, ls.AdminStore, accountService, replaceSeparatorFunc) if err != nil { return nil, err } - appHandlers = appHandlers.WithPersister(ls.Pe) + //appHandlers = appHandlers.WithPersister(ls.Pe) + appHandlers.SetPersister(ls.Pe) ls.DbRs.AddLocalFunc("set_language", appHandlers.SetLanguage) ls.DbRs.AddLocalFunc("create_account", appHandlers.CreateAccount) ls.DbRs.AddLocalFunc("save_temporary_pin", appHandlers.SaveTemporaryPin) diff --git a/services/registration/Makefile b/services/registration/Makefile new file mode 100644 index 0000000..80bbba2 --- /dev/null +++ b/services/registration/Makefile @@ -0,0 +1,23 @@ +# Variables to match files in the current directory +INPUTS = $(wildcard ./*.vis) +TXTS = $(wildcard ./*.txt.orig) +VISE_PATH := ../../go-vise + +# Rule to build .bin files from .vis files +%.vis: + go run $(VISE_PATH)/dev/asm/main.go -f pp.csv $(basename $@).vis > $(basename $@).bin + @echo "Built $(basename $@).bin from $(basename $@).vis" + +# Rule to copy .orig files to .txt +%.txt.orig: + cp -v $(basename $@).orig $(basename $@) + @echo "Copied $(basename $@).orig to $(basename $@)" + +# 'all' target depends on all .vis and .txt.orig files +all: $(INPUTS) $(TXTS) + @echo "Running all: $(INPUTS) $(TXTS)" + +clean: + rm -vf *.bin + +.PHONY: clean diff --git a/services/registration/_catch b/services/registration/_catch new file mode 100644 index 0000000..e81b8e9 --- /dev/null +++ b/services/registration/_catch @@ -0,0 +1 @@ +Something went wrong.Please try again \ No newline at end of file diff --git a/services/registration/_catch.bin b/services/registration/_catch.bin new file mode 100644 index 0000000000000000000000000000000000000000..549c57749cb66e8609c040c3247ff0f62a8e2dd7 GIT binary patch literal 2 JcmZQz2LJ#G00;m8 literal 0 HcmV?d00001 diff --git a/services/registration/_catch.vis b/services/registration/_catch.vis new file mode 100644 index 0000000..72e55ad --- /dev/null +++ b/services/registration/_catch.vis @@ -0,0 +1 @@ +HALT diff --git a/services/registration/_catch_swa b/services/registration/_catch_swa new file mode 100644 index 0000000..3affebd --- /dev/null +++ b/services/registration/_catch_swa @@ -0,0 +1 @@ +Tatizo la kimtambo limetokea,tafadhali jaribu tena baadaye. \ No newline at end of file diff --git a/services/registration/account_creation b/services/registration/account_creation new file mode 100644 index 0000000..e9463a6 --- /dev/null +++ b/services/registration/account_creation @@ -0,0 +1 @@ +Your account is being created... \ No newline at end of file diff --git a/services/registration/account_creation.bin b/services/registration/account_creation.bin new file mode 100644 index 0000000000000000000000000000000000000000..1bf6995044afa300bf4f70a544f44acde745e027 GIT binary patch literal 56 zcmZQz5iCnB%1o<_PcBMLEJ=+o$joD46h?63b2E!`6HAga7kEn;L~V8IY%V8s;TVo6F&&So@V;9@B(%`9QGWMF6D LV2lR}a6knBQ6U;a literal 0 HcmV?d00001 diff --git a/services/registration/address.vis b/services/registration/address.vis new file mode 100644 index 0000000..dfc46d1 --- /dev/null +++ b/services/registration/address.vis @@ -0,0 +1,8 @@ +LOAD check_identifier 0 +RELOAD check_identifier +MAP check_identifier +MOUT back 0 +MOUT quit 9 +HALT +INCMP _ 0 +INCMP quit 9 diff --git a/services/registration/address_swa b/services/registration/address_swa new file mode 100644 index 0000000..3e7a55e --- /dev/null +++ b/services/registration/address_swa @@ -0,0 +1 @@ +Anwani:{{.check_identifier}} \ No newline at end of file diff --git a/services/registration/amount b/services/registration/amount new file mode 100644 index 0000000..9142aba --- /dev/null +++ b/services/registration/amount @@ -0,0 +1,2 @@ +Maximum amount: {{.max_amount}} +Enter amount: \ No newline at end of file diff --git a/services/registration/amount.bin b/services/registration/amount.bin new file mode 100644 index 0000000000000000000000000000000000000000..35757a44177b96e7ef5158dded76aa0c0752a6a4 GIT binary patch literal 230 zcmZ9HK?=e!5JhK5#8T0ME8V$v+5Fs7pnwrNRH@%X0FKydj!yx|R~ljp$EL{Bb| zjWRkz!#KN$0IDA7ld%R}AZ$vg^_}bsZ?FZ`ys4LtB4@D${l5Y3XcF@v>1WS)M!&Yuu rlk;2C{5CFg literal 0 HcmV?d00001 diff --git a/services/registration/balances.vis b/services/registration/balances.vis new file mode 100644 index 0000000..9a346d5 --- /dev/null +++ b/services/registration/balances.vis @@ -0,0 +1,10 @@ +LOAD reset_account_authorized 0 +RELOAD reset_account_authorized +MOUT my_balance 1 +MOUT community_balance 2 +MOUT back 0 +HALT +INCMP _ 0 +INCMP my_balance 1 +INCMP community_balance 2 +INCMP . * diff --git a/services/registration/balances_swa b/services/registration/balances_swa new file mode 100644 index 0000000..1649055 --- /dev/null +++ b/services/registration/balances_swa @@ -0,0 +1 @@ +Salio: \ No newline at end of file diff --git a/services/registration/blocked_account.bin b/services/registration/blocked_account.bin new file mode 100644 index 0000000000000000000000000000000000000000..c8642b4d3b17e9639284e9bf76f5535cbc703cbc GIT binary patch literal 27 icmZQz7AeliFON^k$xqHsO^HuTPR=jQD`8|{U5ZSOWqmxPF>0J;D(eCqj4?Ycho(j*&ElbPn zRi%L_{K14#^ex_sH5@_1E_a{Q>a(QGtX&){+JtN78Rum@dUafAP2txhY^$)E74~$m Rf&(ZbEnWO{as2vqdI6u8G(`Xa literal 0 HcmV?d00001 diff --git a/services/registration/check_statement.vis b/services/registration/check_statement.vis new file mode 100644 index 0000000..d79b5ca --- /dev/null +++ b/services/registration/check_statement.vis @@ -0,0 +1,12 @@ +LOAD check_transactions 0 +RELOAD check_transactions +CATCH no_transfers flag_no_transfers 1 +LOAD authorize_account 6 +MOUT back 0 +MOUT quit 9 +HALT +RELOAD authorize_account +CATCH incorrect_pin flag_incorrect_pin 1 +INCMP _ 0 +INCMP quit 9 +INCMP transactions * diff --git a/services/registration/check_statement_menu b/services/registration/check_statement_menu new file mode 100644 index 0000000..70e2bd5 --- /dev/null +++ b/services/registration/check_statement_menu @@ -0,0 +1 @@ +Check statement \ No newline at end of file diff --git a/services/registration/check_statement_menu_swa b/services/registration/check_statement_menu_swa new file mode 100644 index 0000000..b8a338d --- /dev/null +++ b/services/registration/check_statement_menu_swa @@ -0,0 +1 @@ +Taarifa ya matumizi \ No newline at end of file diff --git a/services/registration/check_statement_swa b/services/registration/check_statement_swa new file mode 100644 index 0000000..468364f --- /dev/null +++ b/services/registration/check_statement_swa @@ -0,0 +1 @@ +Tafadhali weka PIN yako kuona taarifa ya matumizi: \ No newline at end of file diff --git a/services/registration/comminity_balance_swa b/services/registration/comminity_balance_swa new file mode 100644 index 0000000..d9f1d6e --- /dev/null +++ b/services/registration/comminity_balance_swa @@ -0,0 +1 @@ +{{.fetch_community_balance}} \ No newline at end of file diff --git a/services/registration/community_balance b/services/registration/community_balance new file mode 100644 index 0000000..d9f1d6e --- /dev/null +++ b/services/registration/community_balance @@ -0,0 +1 @@ +{{.fetch_community_balance}} \ No newline at end of file diff --git a/services/registration/community_balance.bin b/services/registration/community_balance.bin new file mode 100644 index 0000000000000000000000000000000000000000..2d7034c2f477e7fda483e4d3a5092890717d2e08 GIT binary patch literal 166 zcmZ{cy$ZrW5C-=n{+x=Wu#mihh1mKu%VpW%VseS+rpViSjdpg!Fbq|7*0(xak}+o$ z$A+qNr!EhcaTw-gzHl4+m_$K@L!6AeX#JcO4QTx@CLDiLo-E-6!ma>o^1PrX+OOIu VPuvQ;W^>$WO95O&_=-%rXW0F ziJVBx}OI#=r`4RO*l5pMu^UC>O4WSK)JctOY>$;|Yx zRmk^|4NsrY9@Mr9Csi5S;tLLtqn>wG*oJJoM74Lx8?g-ns6S`GaxJ%-&j|U?1DXR?hyW9kQW|_K0MY|_hZay@-lxv HthMJ4`Uonm literal 0 HcmV?d00001 diff --git a/services/registration/create_pin.vis b/services/registration/create_pin.vis new file mode 100644 index 0000000..40989ec --- /dev/null +++ b/services/registration/create_pin.vis @@ -0,0 +1,9 @@ +LOAD create_account 0 +CATCH account_creation_failed flag_account_creation_failed 1 +MOUT exit 0 +HALT +LOAD save_temporary_pin 6 +RELOAD save_temporary_pin +CATCH . flag_incorrect_pin 1 +INCMP quit 0 +INCMP confirm_create_pin * diff --git a/services/registration/create_pin_mismatch b/services/registration/create_pin_mismatch new file mode 100644 index 0000000..e75068c --- /dev/null +++ b/services/registration/create_pin_mismatch @@ -0,0 +1 @@ +The PIN is not a match. Try again \ No newline at end of file diff --git a/services/registration/create_pin_mismatch.bin b/services/registration/create_pin_mismatch.bin new file mode 100644 index 0000000000000000000000000000000000000000..a80717af81162ed46393f55e8ab034118effefdd GIT binary patch literal 53 zcmZSJVl7H7DXL^NWZ+^cEX^!ov}9ms;1EjA&r8cJ%8gGhN=+PZEU^UW|jODLQ-Ax1Vy zwa#M&!m@8momg4jxO(uqVXQ%;O~px>Ub0@YF<4i#a^40IWq(Z?|F>q@O`AI|G@&f- zr2QocP&moGMW-KMBd(PFGQw0=D_Il=Y-M}VasB$GVqbE^o(MUYE~z2huoG3hRUM2@ aE_fUS&EF_k%hCC&!%^60Em8hcdwv21y4t25JY#VLz5JnLMi0de6;ucBcaGEv(%A{EEjz1Pw!eMQ^;}N4m*!fOK>qI zcG(OP@CL%`G_*Fe@sh?I?49urdOCERjhnO@w3?!qo{a<_K~z0F(&q7LU)`+x#+9C_ z+K&2ti3AvY>0UG1pS8m;RsRrSr^-fs(u|KqoLkAp+q?9$DdI;WycF7TXgT4mU|YZ( eZ#ZeHOX{PuSz^FNQBzR#o|A-b#HX_L6#W6gXI~fq literal 0 HcmV?d00001 diff --git a/services/registration/edit_first_name.vis b/services/registration/edit_first_name.vis new file mode 100644 index 0000000..6848b9c --- /dev/null +++ b/services/registration/edit_first_name.vis @@ -0,0 +1,18 @@ +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH update_firstname flag_allow_update 1 +LOAD get_current_profile_info 0 +RELOAD get_current_profile_info +MAP get_current_profile_info +MOUT back 0 +HALT +RELOAD set_back +CATCH _ flag_back_set 1 +LOAD save_firstname 128 +RELOAD save_firstname +CATCH pin_entry flag_firstname_set 1 +CATCH edit_family_name flag_familyname_set 0 +CATCH edit_gender flag_gender_set 0 +CATCH edit_yob flag_yob_set 0 +CATCH edit_location flag_location_set 0 +CATCH edit_offerings flag_offerings_set 0 +CATCH pin_entry flag_firstname_set 0 diff --git a/services/registration/edit_first_name_menu b/services/registration/edit_first_name_menu new file mode 100644 index 0000000..c7383b7 --- /dev/null +++ b/services/registration/edit_first_name_menu @@ -0,0 +1 @@ +Edit name \ No newline at end of file diff --git a/services/registration/edit_first_name_menu_swa b/services/registration/edit_first_name_menu_swa new file mode 100644 index 0000000..9395f7c --- /dev/null +++ b/services/registration/edit_first_name_menu_swa @@ -0,0 +1 @@ +Weka jina \ No newline at end of file diff --git a/services/registration/edit_first_name_swa b/services/registration/edit_first_name_swa new file mode 100644 index 0000000..5776bf0 --- /dev/null +++ b/services/registration/edit_first_name_swa @@ -0,0 +1,2 @@ +Jina la kwanza la sasa: {{.get_current_profile_info}} +Weka majina yako ya kwanza: \ No newline at end of file diff --git a/services/registration/edit_gender_menu b/services/registration/edit_gender_menu new file mode 100644 index 0000000..8946918 --- /dev/null +++ b/services/registration/edit_gender_menu @@ -0,0 +1 @@ +Edit gender \ No newline at end of file diff --git a/services/registration/edit_gender_menu_swa b/services/registration/edit_gender_menu_swa new file mode 100644 index 0000000..6d31ea8 --- /dev/null +++ b/services/registration/edit_gender_menu_swa @@ -0,0 +1 @@ +Weka jinsia \ No newline at end of file diff --git a/services/registration/edit_location b/services/registration/edit_location new file mode 100644 index 0000000..4e11d1a --- /dev/null +++ b/services/registration/edit_location @@ -0,0 +1,2 @@ +Current location: {{.get_current_profile_info}} +Enter your location: \ No newline at end of file diff --git a/services/registration/edit_location.bin b/services/registration/edit_location.bin new file mode 100644 index 0000000000000000000000000000000000000000..5964b21af98387a7c7ab3860100512388b9fa918 GIT binary patch literal 234 zcmZ|J!3x4K5CqT}8n6mgK?LvW#Z&(%#55_vl9V(R{Cn4%6+G_lV|KtMM4NJUw&*cL z9tiH{u`|W#Az4#GiaZk4sdq)&S!5KMlMjQ_A^Jo>{XL>;CiDD?+GC^c#y;3$1yxTH r`WZoLUJ142sAb)PYpJH?aenbE1-GsXMJMlF4zZtj!IA*=FS)$|yo5!0 literal 0 HcmV?d00001 diff --git a/services/registration/edit_location.vis b/services/registration/edit_location.vis new file mode 100644 index 0000000..e4fcd8b --- /dev/null +++ b/services/registration/edit_location.vis @@ -0,0 +1,15 @@ +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH update_location flag_allow_update 1 +LOAD get_current_profile_info 0 +RELOAD get_current_profile_info +LOAD save_location 16 +MOUT back 0 +HALT +RELOAD set_back +CATCH _ flag_back_set 1 +RELOAD save_location +INCMP _ 0 +CATCH pin_entry flag_location_set 1 +CATCH edit_offerings flag_offerings_set 0 +CATCH pin_entry flag_location_set 0 +INCMP edit_offerings * diff --git a/services/registration/edit_location_menu b/services/registration/edit_location_menu new file mode 100644 index 0000000..39ff1b7 --- /dev/null +++ b/services/registration/edit_location_menu @@ -0,0 +1 @@ +Edit location \ No newline at end of file diff --git a/services/registration/edit_location_menu_swa b/services/registration/edit_location_menu_swa new file mode 100644 index 0000000..a2a0e59 --- /dev/null +++ b/services/registration/edit_location_menu_swa @@ -0,0 +1 @@ +Weka eneo \ No newline at end of file diff --git a/services/registration/edit_location_swa b/services/registration/edit_location_swa new file mode 100644 index 0000000..179c421 --- /dev/null +++ b/services/registration/edit_location_swa @@ -0,0 +1,2 @@ +Eneo la sasa: {{.get_current_profile_info}} +Weka eneo: \ No newline at end of file diff --git a/services/registration/edit_offerings b/services/registration/edit_offerings new file mode 100644 index 0000000..5bb0e7f --- /dev/null +++ b/services/registration/edit_offerings @@ -0,0 +1,2 @@ +Current offerings: {{.get_current_profile_info}} +Enter the services or goods you offer: \ No newline at end of file diff --git a/services/registration/edit_offerings.bin b/services/registration/edit_offerings.bin new file mode 100644 index 0000000000000000000000000000000000000000..b26c7e97b2cf92ac9a22f7625bc00d3b91df823f GIT binary patch literal 208 zcmZ{eK?=e!6hvoez$hq!3Lc1Ld%qweg3CYuG4sG>h&JWyY&Bzu z+z?z(nUNHCbc}-_gI$Bh2kZ0 z%SkG&L+AV1rSA~!nGMdNynBRV@%!goILhu|RAK}uM=*#P8=GWpW1FN`d&YMV^BYrp z>rOYg0`Zh#!`^Vj4-k~|DOC6gVw!^sS|uAiu0cF!66%_x^-YUkAj%)hN8I#FrSuM$ x@CXH63+DI$gxem{h!Kq$(X?g9I>|pL`tL*oCmK4@9U5ZuA4wV)R%dQ{YlC;uqKG?8GcL!nyjuroiTvF wM30YSLy?$L-tBTPV|M+cXQFVM^a@=}6SwrFisiDZVFfO^jPOkihpcMcoPIn*i9fQE)CH?;Qn_gme@|IJ0%g5-?{r|AYzJv=VsbCQTTjLQoQ;7{WK literal 0 HcmV?d00001 diff --git a/services/registration/enter_others_new_pin.vis b/services/registration/enter_others_new_pin.vis new file mode 100644 index 0000000..7711c97 --- /dev/null +++ b/services/registration/enter_others_new_pin.vis @@ -0,0 +1,12 @@ +LOAD validate_blocked_number 6 +RELOAD validate_blocked_number +CATCH unregistered_number flag_unregistered_number 1 +LOAD retrieve_blocked_number 0 +RELOAD retrieve_blocked_number +MAP retrieve_blocked_number +MOUT back 0 +HALT +LOAD verify_new_pin 6 +RELOAD verify_new_pin +INCMP _ 0 +INCMP * confirm_others_new_pin diff --git a/services/registration/enter_others_new_pin_swa b/services/registration/enter_others_new_pin_swa new file mode 100644 index 0000000..77ec2f3 --- /dev/null +++ b/services/registration/enter_others_new_pin_swa @@ -0,0 +1 @@ +Tafadhali weka PIN mpya ya: {{.retrieve_blocked_number}} \ No newline at end of file diff --git a/services/registration/enter_pin b/services/registration/enter_pin new file mode 100644 index 0000000..cbb44ca --- /dev/null +++ b/services/registration/enter_pin @@ -0,0 +1 @@ +Please enter your PIN: \ No newline at end of file diff --git a/services/registration/enter_pin.bin b/services/registration/enter_pin.bin new file mode 100644 index 0000000000000000000000000000000000000000..3919ba8fcc806f14fec6e7a7d72473731e26e1d1 GIT binary patch literal 42 vcmZSJVo6F&&So@VU}xZ9j0e&jA}N{01v!b8@dZWsX_+~x@tJvP`HWfszwHYN literal 0 HcmV?d00001 diff --git a/services/registration/enter_pin.vis b/services/registration/enter_pin.vis new file mode 100644 index 0000000..1217074 --- /dev/null +++ b/services/registration/enter_pin.vis @@ -0,0 +1,4 @@ +MOUT back 0 +HALT +INCMP _ 0 +INCMP display_profile_info * diff --git a/services/registration/enter_pin_swa b/services/registration/enter_pin_swa new file mode 100644 index 0000000..bb30cfd --- /dev/null +++ b/services/registration/enter_pin_swa @@ -0,0 +1 @@ +Weka PIN yako \ No newline at end of file diff --git a/services/registration/exit_menu b/services/registration/exit_menu new file mode 100644 index 0000000..1105a55 --- /dev/null +++ b/services/registration/exit_menu @@ -0,0 +1 @@ +Exit \ No newline at end of file diff --git a/services/registration/exit_menu_swa b/services/registration/exit_menu_swa new file mode 100644 index 0000000..474f1ff --- /dev/null +++ b/services/registration/exit_menu_swa @@ -0,0 +1 @@ +Ondoka \ No newline at end of file diff --git a/services/registration/female_menu b/services/registration/female_menu new file mode 100644 index 0000000..18b94e5 --- /dev/null +++ b/services/registration/female_menu @@ -0,0 +1 @@ +Female \ No newline at end of file diff --git a/services/registration/female_menu_swa b/services/registration/female_menu_swa new file mode 100644 index 0000000..0506300 --- /dev/null +++ b/services/registration/female_menu_swa @@ -0,0 +1 @@ +Mwanamke \ No newline at end of file diff --git a/services/registration/help.bin b/services/registration/help.bin new file mode 100644 index 0000000000000000000000000000000000000000..199c5db5584eee73df5cbf46ec5c6c0167ba4962 GIT binary patch literal 21 ccmZQz<|{1CEQv4AEXjz^NX;o=WME(i07bwC00000 literal 0 HcmV?d00001 diff --git a/services/registration/help.vis b/services/registration/help.vis new file mode 100644 index 0000000..6244d4d --- /dev/null +++ b/services/registration/help.vis @@ -0,0 +1,2 @@ +LOAD quit_with_help 0 +HALT diff --git a/services/registration/help_menu b/services/registration/help_menu new file mode 100644 index 0000000..0c64ced --- /dev/null +++ b/services/registration/help_menu @@ -0,0 +1 @@ +Help \ No newline at end of file diff --git a/services/registration/help_menu_swa b/services/registration/help_menu_swa new file mode 100644 index 0000000..393e0c8 --- /dev/null +++ b/services/registration/help_menu_swa @@ -0,0 +1 @@ +Usaidizi \ No newline at end of file diff --git a/services/registration/incorrect_date_format b/services/registration/incorrect_date_format new file mode 100644 index 0000000..56df792 --- /dev/null +++ b/services/registration/incorrect_date_format @@ -0,0 +1,2 @@ +The year of birth you entered is invalid. +Please try again. \ No newline at end of file diff --git a/services/registration/incorrect_date_format.bin b/services/registration/incorrect_date_format.bin new file mode 100644 index 0000000000000000000000000000000000000000..8188b43ce61e6f364a4fffcc5a59bee3446d7208 GIT binary patch literal 68 zcmZQzmM%&yPA!Sg%uCKMDoRZ*iBCx^NsUj-FUn0UVdP-oVl7H7DXL^NWZ+^cEX^!o Qv}9ms;9!gg3UELL0M>;Pga7~l literal 0 HcmV?d00001 diff --git a/services/registration/incorrect_date_format.vis b/services/registration/incorrect_date_format.vis new file mode 100644 index 0000000..f4a8a2b --- /dev/null +++ b/services/registration/incorrect_date_format.vis @@ -0,0 +1,6 @@ +LOAD reset_incorrect_date_format 8 +MOUT retry 1 +MOUT quit 9 +HALT +INCMP _ 1 +INCMP quit 9 diff --git a/services/registration/incorrect_date_format_swa b/services/registration/incorrect_date_format_swa new file mode 100644 index 0000000..bd85f21 --- /dev/null +++ b/services/registration/incorrect_date_format_swa @@ -0,0 +1,2 @@ +Mwaka wa kuzaliwa ulioweka sio sahihi. +Tafadhali jaribu tena. \ No newline at end of file diff --git a/services/registration/incorrect_pin b/services/registration/incorrect_pin new file mode 100644 index 0000000..13a9562 --- /dev/null +++ b/services/registration/incorrect_pin @@ -0,0 +1 @@ +Incorrect PIN. You have: {{.reset_incorrect}} remaining attempt(s). \ No newline at end of file diff --git a/services/registration/incorrect_pin.bin b/services/registration/incorrect_pin.bin new file mode 100644 index 0000000000000000000000000000000000000000..8817c23b79fe082cc04974a72d0f73adf294e9c0 GIT binary patch literal 113 zcmZQz<}XSuPA!Sg%uCKMDoRZ*VPs%nK^J3S#SmfSPs+(p&Q481qRAXe| gVl7H7DXL^NWZ+^cEX^!ov}9ms;9!gg3UELL0PuJqpa1{> literal 0 HcmV?d00001 diff --git a/services/registration/incorrect_pin.vis b/services/registration/incorrect_pin.vis new file mode 100644 index 0000000..167364a --- /dev/null +++ b/services/registration/incorrect_pin.vis @@ -0,0 +1,9 @@ +LOAD reset_incorrect 0 +RELOAD reset_incorrect +MAP reset_incorrect +CATCH blocked_account flag_account_blocked 1 +MOUT retry 1 +MOUT quit 9 +HALT +INCMP _ 1 +INCMP quit 9 diff --git a/services/registration/incorrect_pin_swa b/services/registration/incorrect_pin_swa new file mode 100644 index 0000000..ed22beb --- /dev/null +++ b/services/registration/incorrect_pin_swa @@ -0,0 +1 @@ +PIN ulioeka sio sahihi, una majaribio: {{.reset_incorrect}} yaliyobaki \ No newline at end of file diff --git a/services/registration/invalid_amount b/services/registration/invalid_amount new file mode 100644 index 0000000..c4bbe3f --- /dev/null +++ b/services/registration/invalid_amount @@ -0,0 +1 @@ +Amount {{.validate_amount}} is invalid, please try again: \ No newline at end of file diff --git a/services/registration/invalid_amount.bin b/services/registration/invalid_amount.bin new file mode 100644 index 0000000000000000000000000000000000000000..52bd9da9957c0ba9f0c6541924e9639e28f9a001 GIT binary patch literal 81 zcmZQzVPKIcN-a(;i7zQi%qvbzF3HT#gGq6*7NwRHRWcef XaIqAYW|lBoGO#mnFvbG~IG_RmIDZ$l literal 0 HcmV?d00001 diff --git a/services/registration/invalid_amount.vis b/services/registration/invalid_amount.vis new file mode 100644 index 0000000..d5b5f03 --- /dev/null +++ b/services/registration/invalid_amount.vis @@ -0,0 +1,7 @@ +MAP validate_amount +RELOAD reset_transaction_amount +MOUT retry 1 +MOUT quit 9 +HALT +INCMP _ 1 +INCMP quit 9 diff --git a/services/registration/invalid_amount_swa b/services/registration/invalid_amount_swa new file mode 100644 index 0000000..836d7b2 --- /dev/null +++ b/services/registration/invalid_amount_swa @@ -0,0 +1 @@ +Kiwango {{.validate_amount}} sio sahihi, tafadhali weka tena: \ No newline at end of file diff --git a/services/registration/invalid_others_pin b/services/registration/invalid_others_pin new file mode 100644 index 0000000..acdf45f --- /dev/null +++ b/services/registration/invalid_others_pin @@ -0,0 +1 @@ +The PIN you have entered is invalid.Please try a 4 digit number instead. \ No newline at end of file diff --git a/services/registration/invalid_others_pin.bin b/services/registration/invalid_others_pin.bin new file mode 100644 index 0000000000000000000000000000000000000000..5f3163d88f39b751e2bbb0c21c8ccb6c017cb9f0 GIT binary patch literal 55 zcmZSJVl7H7DXL^NWZ+^cEX^!ov}9ms;1Eg8D@iSi&o9YHEh>)BOD&Ht$jk$(;ee_E E0FWIILI3~& literal 0 HcmV?d00001 diff --git a/services/registration/invalid_others_pin.vis b/services/registration/invalid_others_pin.vis new file mode 100644 index 0000000..d218e6d --- /dev/null +++ b/services/registration/invalid_others_pin.vis @@ -0,0 +1,5 @@ +MOUT retry 1 +MOUT quit 9 +HALT +INCMP enter_others_new_pin 1 +INCMP quit 9 diff --git a/services/registration/invalid_pin b/services/registration/invalid_pin new file mode 100644 index 0000000..dd984ea --- /dev/null +++ b/services/registration/invalid_pin @@ -0,0 +1 @@ +The PIN you entered is invalid.The PIN must be different from your current PIN.For help call +254757628885 \ No newline at end of file diff --git a/services/registration/invalid_pin.bin b/services/registration/invalid_pin.bin new file mode 100644 index 0000000000000000000000000000000000000000..e154dca0896b1338ef347bb7c264644029d836b3 GIT binary patch literal 17 YcmZSJVo6F&&So@VU}xZ9jAt|e02kQ;aR2}S literal 0 HcmV?d00001 diff --git a/services/registration/invalid_pin.vis b/services/registration/invalid_pin.vis new file mode 100644 index 0000000..3790a08 --- /dev/null +++ b/services/registration/invalid_pin.vis @@ -0,0 +1,3 @@ +MOUT back 0 +HALT +INCMP _ 0 diff --git a/services/registration/invalid_pin_swa b/services/registration/invalid_pin_swa new file mode 100644 index 0000000..7512242 --- /dev/null +++ b/services/registration/invalid_pin_swa @@ -0,0 +1 @@ +PIN mpya na udhibitisho wa PIN mpya hazilingani.Tafadhali jaribu tena.Kwa usaidizi piga simu +254757628885. diff --git a/services/registration/invalid_recipient b/services/registration/invalid_recipient new file mode 100644 index 0000000..d9fcb1d --- /dev/null +++ b/services/registration/invalid_recipient @@ -0,0 +1 @@ +{{.validate_recipient}} is invalid, please try again: \ No newline at end of file diff --git a/services/registration/invalid_recipient.bin b/services/registration/invalid_recipient.bin new file mode 100644 index 0000000000000000000000000000000000000000..dcf9d4e294e9b62874f25a700905ae0a1dd9a684 GIT binary patch literal 77 zcmZQz6)H>2$xKNsNsTW`P0lRHOwB7{U=b`SO3W)xOfJdH&jX4Vr2$xKNsNsTW`P0lRHOwB7{;9@OGEh(yGG-Tjn%gigwEJ9Mk!+?|-(t^^gjgUX>rdyZtm?F(7sM|CWol@ON;Ni&hIWM2q9BDc zT}eks{w{KqL#9gWK6IW=kfJtrp!0OxL*wa!6dWzi+UGnm2g~W7U5+kCm+3(JH;6<{ A6#xJL literal 0 HcmV?d00001 diff --git a/services/registration/main.vis b/services/registration/main.vis new file mode 100644 index 0000000..2982f47 --- /dev/null +++ b/services/registration/main.vis @@ -0,0 +1,20 @@ +LOAD set_default_voucher 8 +RELOAD set_default_voucher +LOAD check_vouchers 10 +RELOAD check_vouchers +LOAD check_balance 128 +RELOAD check_balance +CATCH api_failure flag_api_call_error 1 +MAP check_balance +MOUT send 1 +MOUT vouchers 2 +MOUT account 3 +MOUT help 4 +MOUT quit 9 +HALT +INCMP send 1 +INCMP my_vouchers 2 +INCMP my_account 3 +INCMP help 4 +INCMP quit 9 +INCMP . * diff --git a/services/registration/main_swa b/services/registration/main_swa new file mode 100644 index 0000000..afae8c1 --- /dev/null +++ b/services/registration/main_swa @@ -0,0 +1 @@ +{{.check_balance}} \ No newline at end of file diff --git a/services/registration/male_menu b/services/registration/male_menu new file mode 100644 index 0000000..183883f --- /dev/null +++ b/services/registration/male_menu @@ -0,0 +1 @@ +Male \ No newline at end of file diff --git a/services/registration/male_menu_swa b/services/registration/male_menu_swa new file mode 100644 index 0000000..7afdee9 --- /dev/null +++ b/services/registration/male_menu_swa @@ -0,0 +1 @@ +Mwanaume \ No newline at end of file diff --git a/services/registration/my_account b/services/registration/my_account new file mode 100644 index 0000000..7aa9fe9 --- /dev/null +++ b/services/registration/my_account @@ -0,0 +1 @@ +My Account \ No newline at end of file diff --git a/services/registration/my_account.bin b/services/registration/my_account.bin new file mode 100644 index 0000000000000000000000000000000000000000..7df7853dbd41853dc572768841ce9062cd1d28f4 GIT binary patch literal 251 zcmZwB+X{m)3dRkLQEezb`kF&*WNhQ z`)GO>umCB$x1y>_WWWc=tR&sy8FCO=N5-X9Y`8K}ExP!l3-NVBf~UYQEOryzkxOmo NE(M5ufd!uM_yPPGNn`*3 literal 0 HcmV?d00001 diff --git a/services/registration/my_account.vis b/services/registration/my_account.vis new file mode 100644 index 0000000..e3956d2 --- /dev/null +++ b/services/registration/my_account.vis @@ -0,0 +1,17 @@ +LOAD reset_allow_update 0 +MOUT profile 1 +MOUT change_language 2 +MOUT check_balance 3 +MOUT check_statement 4 +MOUT pin_options 5 +MOUT my_address 6 +MOUT back 0 +HALT +INCMP main 0 +INCMP edit_profile 1 +INCMP change_language 2 +INCMP balances 3 +INCMP check_statement 4 +INCMP pin_management 5 +INCMP address 6 +INCMP . * diff --git a/services/registration/my_account_swa b/services/registration/my_account_swa new file mode 100644 index 0000000..c77102f --- /dev/null +++ b/services/registration/my_account_swa @@ -0,0 +1 @@ +Akaunti yangu \ No newline at end of file diff --git a/services/registration/my_address_menu b/services/registration/my_address_menu new file mode 100644 index 0000000..5c13a7d --- /dev/null +++ b/services/registration/my_address_menu @@ -0,0 +1 @@ +My Address \ No newline at end of file diff --git a/services/registration/my_address_menu_swa b/services/registration/my_address_menu_swa new file mode 100644 index 0000000..531bc4e --- /dev/null +++ b/services/registration/my_address_menu_swa @@ -0,0 +1 @@ +Anwani yangu \ No newline at end of file diff --git a/services/registration/my_balance b/services/registration/my_balance new file mode 100644 index 0000000..afae8c1 --- /dev/null +++ b/services/registration/my_balance @@ -0,0 +1 @@ +{{.check_balance}} \ No newline at end of file diff --git a/services/registration/my_balance.bin b/services/registration/my_balance.bin new file mode 100644 index 0000000000000000000000000000000000000000..3809958649d8d49866437433d1157120be4e6368 GIT binary patch literal 146 zcmY+6y$ZrW5C*@G_;V^Dg_W;hA+|ovvRPI<63*nj6u!OJDA*0dFlf5$FE0|4J#%&| z+@NXg;WkLGqb73#Jm?hVu5nzl^F*xw6R`aaWQvJLg1ZXhspL01V880s23{-7ODw!$ Ni$JL&d_~}e=MN4KCEx%6 literal 0 HcmV?d00001 diff --git a/services/registration/my_balance.vis b/services/registration/my_balance.vis new file mode 100644 index 0000000..b6094c0 --- /dev/null +++ b/services/registration/my_balance.vis @@ -0,0 +1,12 @@ +LOAD reset_incorrect 6 +LOAD check_balance 0 +CATCH api_failure flag_api_call_error 1 +MAP check_balance +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH pin_entry flag_account_authorized 0 +MOUT back 0 +MOUT quit 9 +HALT +INCMP _ 0 +INCMP quit 9 +INCMP . * diff --git a/services/registration/my_balance_menu b/services/registration/my_balance_menu new file mode 100644 index 0000000..fdd930b --- /dev/null +++ b/services/registration/my_balance_menu @@ -0,0 +1 @@ +My balance \ No newline at end of file diff --git a/services/registration/my_balance_menu_swa b/services/registration/my_balance_menu_swa new file mode 100644 index 0000000..810c386 --- /dev/null +++ b/services/registration/my_balance_menu_swa @@ -0,0 +1 @@ +Salio langu \ No newline at end of file diff --git a/services/registration/my_balance_swa b/services/registration/my_balance_swa new file mode 100644 index 0000000..afae8c1 --- /dev/null +++ b/services/registration/my_balance_swa @@ -0,0 +1 @@ +{{.check_balance}} \ No newline at end of file diff --git a/services/registration/my_vouchers b/services/registration/my_vouchers new file mode 100644 index 0000000..548de9c --- /dev/null +++ b/services/registration/my_vouchers @@ -0,0 +1 @@ +My vouchers \ No newline at end of file diff --git a/services/registration/my_vouchers.bin b/services/registration/my_vouchers.bin new file mode 100644 index 0000000000000000000000000000000000000000..7d139e5883cbe12bfa07f239ac99f72c0950e8d8 GIT binary patch literal 151 zcmZQzmMBUsPA!Q~Ois=(%>&Yxjq3rmS)RM%^oMJ{J1}>JQ#N=#70|s^m4#s#O&4H_5?xGepU)azWr1v&*Csds)roJ`&qknX n@?pmw3|KlJ=R=5Dv;=G7G5?QkSd^2Cx)w@4Cr&tm#SYsS=`9)x literal 0 HcmV?d00001 diff --git a/services/registration/pin_management.vis b/services/registration/pin_management.vis new file mode 100644 index 0000000..5eb7d5a --- /dev/null +++ b/services/registration/pin_management.vis @@ -0,0 +1,8 @@ +MOUT change_pin 1 +MOUT reset_pin 2 +MOUT back 0 +HALT +INCMP my_account 0 +INCMP old_pin 1 +INCMP enter_other_number 2 +INCMP . * diff --git a/services/registration/pin_management_swa b/services/registration/pin_management_swa new file mode 100644 index 0000000..e69de29 diff --git a/services/registration/pin_options_menu b/services/registration/pin_options_menu new file mode 100644 index 0000000..778d28d --- /dev/null +++ b/services/registration/pin_options_menu @@ -0,0 +1 @@ +PIN options \ No newline at end of file diff --git a/services/registration/pin_options_menu_swa b/services/registration/pin_options_menu_swa new file mode 100644 index 0000000..e47ca0f --- /dev/null +++ b/services/registration/pin_options_menu_swa @@ -0,0 +1 @@ +Mipangilio ya PIN \ No newline at end of file diff --git a/services/registration/pin_reset_mismatch b/services/registration/pin_reset_mismatch new file mode 100644 index 0000000..dc0236b --- /dev/null +++ b/services/registration/pin_reset_mismatch @@ -0,0 +1 @@ +The PIN is not a match. Try again diff --git a/services/registration/pin_reset_mismatch.bin b/services/registration/pin_reset_mismatch.bin new file mode 100644 index 0000000000000000000000000000000000000000..6fd2407b0b5cbc293228ad08821583cd4e2922d8 GIT binary patch literal 53 zcmZSJVl7H7DXL^NWZ+^cEX^!ov}9ms;1EjA&r8cJ%8f6`%!^OXNX$!51*+hHssI3K Cn+`Yt literal 0 HcmV?d00001 diff --git a/services/registration/pin_reset_mismatch.vis b/services/registration/pin_reset_mismatch.vis new file mode 100644 index 0000000..5dc7e7c --- /dev/null +++ b/services/registration/pin_reset_mismatch.vis @@ -0,0 +1,6 @@ +MOUT retry 1 +MOUT quit 9 +HALT +INCMP confirm_pin_change 1 +INCMP quit 9 + diff --git a/services/registration/pin_reset_mismatch_swa b/services/registration/pin_reset_mismatch_swa new file mode 100644 index 0000000..5787790 --- /dev/null +++ b/services/registration/pin_reset_mismatch_swa @@ -0,0 +1 @@ +PIN uliyoweka hailingani.Jaribu tena. \ No newline at end of file diff --git a/services/registration/pin_reset_result b/services/registration/pin_reset_result new file mode 100644 index 0000000..60554b9 --- /dev/null +++ b/services/registration/pin_reset_result @@ -0,0 +1 @@ +PIN reset request for {{.retrieve_blocked_number}} was successful \ No newline at end of file diff --git a/services/registration/pin_reset_result.bin b/services/registration/pin_reset_result.bin new file mode 100644 index 0000000000000000000000000000000000000000..07c70a433311d4241e37542925e4e5810eb06df6 GIT binary patch literal 123 zcmZ|EK@Ni;5Cza7R7+em?!1OuPcs4iX^8@M9D4q;=(f9;JhGEOCE^1PM_G4loNEdY uL)85{vZLUFa?uy$;xlH`({KxZ-Ob$au2IcGcXE$*oP73ABxG&te)|Q(izWsD literal 0 HcmV?d00001 diff --git a/services/registration/pin_reset_result.vis b/services/registration/pin_reset_result.vis new file mode 100644 index 0000000..34b9789 --- /dev/null +++ b/services/registration/pin_reset_result.vis @@ -0,0 +1,8 @@ +LOAD retrieve_blocked_number 0 +MAP retrieve_blocked_number +LOAD reset_others_pin 6 +MOUT back 0 +MOUT quit 9 +HALT +INCMP pin_management 0 +INCMP quit 9 diff --git a/services/registration/pin_reset_result_swa b/services/registration/pin_reset_result_swa new file mode 100644 index 0000000..30de04e --- /dev/null +++ b/services/registration/pin_reset_result_swa @@ -0,0 +1 @@ +Ombi la kuweka upya PIN ya {{.retrieve_blocked_number}} limefanikiwa \ No newline at end of file diff --git a/services/registration/pin_reset_success b/services/registration/pin_reset_success new file mode 100644 index 0000000..e9326ec --- /dev/null +++ b/services/registration/pin_reset_success @@ -0,0 +1 @@ +Your PIN change request has been successful diff --git a/services/registration/pin_reset_success.bin b/services/registration/pin_reset_success.bin new file mode 100644 index 0000000000000000000000000000000000000000..c5e89736bb7c66780cda80524e11a1d02e9c60a6 GIT binary patch literal 106 zcmZQz7D~>~OUo?EjW5W|i%-r-%u7#YWME*yBFw-j1X5F!TAW%EpPN~nn^=;Z!N|+V iz{Qf3n4HaM0Av)FW|lBoGO#mnu;eCY<^jbxpke^#VIE8X literal 0 HcmV?d00001 diff --git a/services/registration/pin_reset_success.vis b/services/registration/pin_reset_success.vis new file mode 100644 index 0000000..96dee73 --- /dev/null +++ b/services/registration/pin_reset_success.vis @@ -0,0 +1,8 @@ +LOAD confirm_pin_change 0 +RELOAD confirm_pin_change +CATCH pin_reset_mismatch flag_pin_mismatch 1 +MOUT back 0 +MOUT quit 9 +HALT +INCMP main 0 +INCMP quit 9 diff --git a/services/registration/pin_reset_success_swa b/services/registration/pin_reset_success_swa new file mode 100644 index 0000000..af69b9f --- /dev/null +++ b/services/registration/pin_reset_success_swa @@ -0,0 +1 @@ +Ombi lako la kubadili PIN limefanikiwa diff --git a/services/registration/pp.csv b/services/registration/pp.csv new file mode 100644 index 0000000..aa1eb05 --- /dev/null +++ b/services/registration/pp.csv @@ -0,0 +1,32 @@ +flag,flag_language_set,8,checks whether the user has set their prefered language +flag,flag_account_created,9,this is set when an account has been created on the API +flag,flag_account_creation_failed,10,this is set when there's an error from the API during account creation +flag,flag_account_pending,11,this is set when an account does not have a status of SUCCESS +flag,flag_account_success,12,this is set when an account has a status of SUCCESS +flag,flag_pin_mismatch,13,this is set when the confirmation PIN matches the initial PIN during registration +flag,flag_pin_set,14,this is set when a newly registered user sets a PIN. This must be present for an account to access the main menu +flag,flag_account_authorized,15,this is set to allow a user access guarded nodes after providing a correct PIN +flag,flag_invalid_recipient,16,this is set when the transaction recipient is invalid +flag,flag_invalid_recipient_with_invite,17,this is set when the transaction recipient is valid but not on the platform +flag,flag_invalid_amount,18,this is set when the given transaction amount is invalid +flag,flag_incorrect_pin,19,this is set when the provided PIN is invalid or does not match the current account's PIN +flag,flag_valid_pin,20,this is set when the given PIN is valid +flag,flag_allow_update,21,this is set to allow a user to update their profile data +flag,flag_single_edit,22,this is set to allow a user to edit a single profile item such as year of birth +flag,flag_incorrect_date_format,23,this is set when the given year of birth is invalid +flag,flag_incorrect_voucher,24,this is set when the selected voucher is invalid +flag,flag_api_call_error,25,this is set when communication to an external service fails +flag,flag_no_active_voucher,26,this is set when a user does not have an active voucher +flag,flag_admin_privilege,27,this is set when a user has admin privileges. +flag,flag_unregistered_number,28,this is set when an unregistered phonenumber tries to perform an action +flag,flag_no_transfers,29,this is set when a user does not have any transactions +flag,flag_incorrect_statement,30,this is set when the selected statement is invalid +flag,flag_firstname_set,31,this is set when the first name of the profile is set +flag,flag_familyname_set,32,this is set when the family name of the profile is set +flag,flag_yob_set,33,this is set when the yob of the profile is set +flag,flag_gender_set,34,this is set when the gender of the profile is set +flag,flag_location_set,35,this is set when the location of the profile is set +flag,flag_offerings_set,36,this is set when the offerings of the profile is set +flag,flag_back_set,37,this is set when it is a back navigation +flag,flag_account_blocked,38,this is set when an account has been blocked after the allowed incorrect PIN attempts have been exceeded + diff --git a/services/registration/prev_menu b/services/registration/prev_menu new file mode 100644 index 0000000..72d90d8 --- /dev/null +++ b/services/registration/prev_menu @@ -0,0 +1 @@ +Prev \ No newline at end of file diff --git a/services/registration/prev_menu_swa b/services/registration/prev_menu_swa new file mode 100644 index 0000000..e5a3e45 --- /dev/null +++ b/services/registration/prev_menu_swa @@ -0,0 +1 @@ +Nyuma \ No newline at end of file diff --git a/services/registration/profile_menu b/services/registration/profile_menu new file mode 100644 index 0000000..0d6af58 --- /dev/null +++ b/services/registration/profile_menu @@ -0,0 +1 @@ +Profile \ No newline at end of file diff --git a/services/registration/profile_menu_swa b/services/registration/profile_menu_swa new file mode 100644 index 0000000..8a12b7d --- /dev/null +++ b/services/registration/profile_menu_swa @@ -0,0 +1 @@ +Wasifu wangu \ No newline at end of file diff --git a/services/registration/profile_update_success b/services/registration/profile_update_success new file mode 100644 index 0000000..652942a --- /dev/null +++ b/services/registration/profile_update_success @@ -0,0 +1 @@ +Profile updated successfully diff --git a/services/registration/profile_update_success.bin b/services/registration/profile_update_success.bin new file mode 100644 index 0000000000000000000000000000000000000000..f152be1f11123e7066f61bf586516d4819b3c753 GIT binary patch literal 102 zcmZQzmMASqNi0c?Pt3`QFDS}S%gjlQ&n!vJEoNk3V8JQLz{Qf3n4HaM0Av)FW|lBo UGO#mn@T8_>mcUE_%5gyD0IQ=PHvj+t literal 0 HcmV?d00001 diff --git a/services/registration/profile_update_success.vis b/services/registration/profile_update_success.vis new file mode 100644 index 0000000..f670e6e --- /dev/null +++ b/services/registration/profile_update_success.vis @@ -0,0 +1,7 @@ +LOAD update_all_profile_items 0 +RELOAD update_all_profile_items +MOUT back 0 +MOUT quit 9 +HALT +INCMP edit_profile 0 +INCMP quit 9 diff --git a/services/registration/profile_update_success_swa b/services/registration/profile_update_success_swa new file mode 100644 index 0000000..df0af2c --- /dev/null +++ b/services/registration/profile_update_success_swa @@ -0,0 +1 @@ +Ombi la Kuweka wasifu limefanikiwa diff --git a/services/registration/quit.bin b/services/registration/quit.bin new file mode 100644 index 0000000000000000000000000000000000000000..6368a904adf3c926893e3bfe3554a796ee91afe2 GIT binary patch literal 11 ScmZQzW+^PqEMa6|UmN@ literal 0 HcmV?d00001 diff --git a/services/registration/quit.vis b/services/registration/quit.vis new file mode 100644 index 0000000..0c8bb46 --- /dev/null +++ b/services/registration/quit.vis @@ -0,0 +1,2 @@ +LOAD quit 0 +HALT diff --git a/services/registration/quit_menu b/services/registration/quit_menu new file mode 100644 index 0000000..f3f23ca --- /dev/null +++ b/services/registration/quit_menu @@ -0,0 +1 @@ +Quit \ No newline at end of file diff --git a/services/registration/quit_menu_swa b/services/registration/quit_menu_swa new file mode 100644 index 0000000..474f1ff --- /dev/null +++ b/services/registration/quit_menu_swa @@ -0,0 +1 @@ +Ondoka \ No newline at end of file diff --git a/services/registration/reset_pin_menu b/services/registration/reset_pin_menu new file mode 100644 index 0000000..1f5d676 --- /dev/null +++ b/services/registration/reset_pin_menu @@ -0,0 +1 @@ +Reset other's PIN \ No newline at end of file diff --git a/services/registration/reset_pin_menu_swa b/services/registration/reset_pin_menu_swa new file mode 100644 index 0000000..49214fe --- /dev/null +++ b/services/registration/reset_pin_menu_swa @@ -0,0 +1 @@ +Badili PIN ya mwenzio \ No newline at end of file diff --git a/services/registration/retry_menu b/services/registration/retry_menu new file mode 100644 index 0000000..ffde86c --- /dev/null +++ b/services/registration/retry_menu @@ -0,0 +1 @@ +Retry \ No newline at end of file diff --git a/services/registration/retry_menu_swa b/services/registration/retry_menu_swa new file mode 100644 index 0000000..c43b419 --- /dev/null +++ b/services/registration/retry_menu_swa @@ -0,0 +1 @@ +Jaribu tena \ No newline at end of file diff --git a/services/registration/root b/services/registration/root new file mode 100644 index 0000000..3928a82 --- /dev/null +++ b/services/registration/root @@ -0,0 +1 @@ +Welcome to Sarafu Network \ No newline at end of file diff --git a/services/registration/root.bin b/services/registration/root.bin new file mode 100644 index 0000000000000000000000000000000000000000..e6a440be5e123fd308dd9cace1c0837ca811158a GIT binary patch literal 167 zcmZwAOAf*?3Rj4uoDd&rk88Cd2&$d^O%IPCh#H VtvqWoDaMj)U`^m=ar?#iYV4DPa#<9G{X6mkNXm%sn660HWq^NV@55C%BScI{BP8((4jZ m6!y+bi+k-nEWdD}6)BjiN~JnBgGx{43#;v9e;+8Eae4#fPCdT> literal 0 HcmV?d00001 diff --git a/services/registration/select_gender.vis b/services/registration/select_gender.vis new file mode 100644 index 0000000..e41da10 --- /dev/null +++ b/services/registration/select_gender.vis @@ -0,0 +1,14 @@ +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH profile_update_success flag_allow_update 1 +LOAD get_current_profile_info 0 +RELOAD get_current_profile_info +MOUT male 1 +MOUT female 2 +MOUT unspecified 3 +MOUT back 0 +HALT +INCMP _ 0 +INCMP set_male 1 +INCMP set_female 2 +INCMP set_unspecified 3 +INCMP . * diff --git a/services/registration/select_gender_swa b/services/registration/select_gender_swa new file mode 100644 index 0000000..39d99d5 --- /dev/null +++ b/services/registration/select_gender_swa @@ -0,0 +1,2 @@ +Jinsia ya sasa: {{.get_current_profile_info}} +Chagua jinsia \ No newline at end of file diff --git a/services/registration/select_language b/services/registration/select_language new file mode 100644 index 0000000..b3d4304 --- /dev/null +++ b/services/registration/select_language @@ -0,0 +1,2 @@ +Welcome to Sarafu Network +Please select a language \ No newline at end of file diff --git a/services/registration/select_language.bin b/services/registration/select_language.bin new file mode 100644 index 0000000000000000000000000000000000000000..7071dd0241c38ad9faeac046b62bd3ac307324d2 GIT binary patch literal 58 zcmZSJVo%LW&&e##U^Hal;>^x0E>FzJ%*kXlVqj_CIcGE>W8CNTyuu%HMqFf!^fN-#2TFvbH7 11 +INCMP < 22 +INCMP view_voucher * diff --git a/services/registration/select_voucher_menu b/services/registration/select_voucher_menu new file mode 100644 index 0000000..8ee06df --- /dev/null +++ b/services/registration/select_voucher_menu @@ -0,0 +1 @@ +Select voucher \ No newline at end of file diff --git a/services/registration/select_voucher_menu_swa b/services/registration/select_voucher_menu_swa new file mode 100644 index 0000000..2cb4daf --- /dev/null +++ b/services/registration/select_voucher_menu_swa @@ -0,0 +1 @@ +Chagua Sarafu \ No newline at end of file diff --git a/services/registration/select_voucher_swa b/services/registration/select_voucher_swa new file mode 100644 index 0000000..b4720bf --- /dev/null +++ b/services/registration/select_voucher_swa @@ -0,0 +1,2 @@ +Chagua nambari au ishara kutoka kwa salio zako: +{{.get_vouchers}} \ No newline at end of file diff --git a/services/registration/send b/services/registration/send new file mode 100644 index 0000000..306466c --- /dev/null +++ b/services/registration/send @@ -0,0 +1 @@ +Enter recipient's phone number/address/alias: \ No newline at end of file diff --git a/services/registration/send.bin b/services/registration/send.bin new file mode 100644 index 0000000000000000000000000000000000000000..0c1c15bbf9fe8978da5fbf9a0dc2ac183033f920 GIT binary patch literal 175 zcmZvVK?=e!6b0X-K}%PSxbg_DyixeZfFCuH^tb0XxN6buFwCIyRwYjoO-l|nP00wj zUkVPngr&^!o+?ko;I0xMykL*+u*g$yVyP9PzBOgz5$+ELz2>jIQb&Sg!@3E0qGxD> LekZRox8(T)$(A)S literal 0 HcmV?d00001 diff --git a/services/registration/send.vis b/services/registration/send.vis new file mode 100644 index 0000000..8928725 --- /dev/null +++ b/services/registration/send.vis @@ -0,0 +1,11 @@ +LOAD transaction_reset 0 +RELOAD transaction_reset +CATCH no_voucher flag_no_active_voucher 1 +MOUT back 0 +HALT +LOAD validate_recipient 20 +RELOAD validate_recipient +CATCH invalid_recipient flag_invalid_recipient 1 +CATCH invite_recipient flag_invalid_recipient_with_invite 1 +INCMP _ 0 +INCMP amount * diff --git a/services/registration/send_menu b/services/registration/send_menu new file mode 100644 index 0000000..5f5a837 --- /dev/null +++ b/services/registration/send_menu @@ -0,0 +1 @@ +Send \ No newline at end of file diff --git a/services/registration/send_menu_swa b/services/registration/send_menu_swa new file mode 100644 index 0000000..605c8e8 --- /dev/null +++ b/services/registration/send_menu_swa @@ -0,0 +1 @@ +Tuma \ No newline at end of file diff --git a/services/registration/send_swa b/services/registration/send_swa new file mode 100644 index 0000000..016760e --- /dev/null +++ b/services/registration/send_swa @@ -0,0 +1 @@ +Weka nambari ya simu: \ No newline at end of file diff --git a/services/registration/set_default.bin b/services/registration/set_default.bin new file mode 100644 index 0000000000000000000000000000000000000000..2317371db1e33e10551a1374ab246d0879ffe3c2 GIT binary patch literal 62 zcmZQz<|$4siO)&QOD|1KPi16dU_lXJU}P;xEy^usRmg}6NDKHzYf^N-R%QpxZR$2|jH zS&Eub@iehui=n<#&Av^#Q0K@JiQ9tDz!O#WwCD#P5dD=#E!kNGU!iWR(!M8S8D@Nk K+kXHw+s7aD{4T)& literal 0 HcmV?d00001 diff --git a/services/registration/set_female.vis b/services/registration/set_female.vis new file mode 100644 index 0000000..da92520 --- /dev/null +++ b/services/registration/set_female.vis @@ -0,0 +1,10 @@ +LOAD save_gender 32 +RELOAD save_gender +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH update_gender flag_allow_update 1 +CATCH pin_entry flag_gender_set 1 +CATCH edit_yob flag_yob_set 0 +CATCH edit_location flag_location_set 0 +CATCH edit_offerings flag_offerings_set 0 +CATCH pin_entry flag_gender_set 0 +MOVE edit_yob diff --git a/services/registration/set_male.bin b/services/registration/set_male.bin new file mode 100644 index 0000000000000000000000000000000000000000..34e11b69273f0732c1cbb400d738665a4f05c4d9 GIT binary patch literal 162 zcmYj}TMEKJ3`G-^qKHx`F2KjWhH)k>fs&Lo3f;Y-AElq?+y@*kbN*2pNGch&aNINC zm8GZ|6;Bfjb{OhA)$H5k9_k!fB5_;r8F-?~o)-P!1ERmus3kkA;49Q^RoeGtEW?cN LaQhE{X8ZU9>&z~( literal 0 HcmV?d00001 diff --git a/services/registration/set_male.vis b/services/registration/set_male.vis new file mode 100644 index 0000000..9a95937 --- /dev/null +++ b/services/registration/set_male.vis @@ -0,0 +1,10 @@ +LOAD save_gender 16 +RELOAD save_gender +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH update_gender flag_allow_update 1 +CATCH pin_entry flag_gender_set 1 +CATCH edit_yob flag_yob_set 0 +CATCH edit_location flag_location_set 0 +CATCH edit_offerings flag_offerings_set 0 +CATCH pin_entry flag_gender_set 0 +MOVE edit_yob diff --git a/services/registration/set_swa.bin b/services/registration/set_swa.bin new file mode 100644 index 0000000000000000000000000000000000000000..2317371db1e33e10551a1374ab246d0879ffe3c2 GIT binary patch literal 62 zcmZQz<|$4siO)&QOD|1KPi16dU_lXJU}P;xEy^us0ZB?4h2GxKMd|Xr?*~rTCI2W*B$W(XI3F4C z#!}Rbil>>q#UG%l$C literal 0 HcmV?d00001 diff --git a/services/registration/set_unspecified.vis b/services/registration/set_unspecified.vis new file mode 100644 index 0000000..824105c --- /dev/null +++ b/services/registration/set_unspecified.vis @@ -0,0 +1,10 @@ +LOAD save_gender 8 +RELOAD save_gender +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH update_gender flag_allow_update 1 +CATCH pin_entry flag_gender_set 1 +CATCH edit_yob flag_yob_set 0 +CATCH edit_location flag_location_set 0 +CATCH edit_offerings flag_offerings_set 0 +CATCH pin_entry flag_gender_set 0 +MOVE edit_yob diff --git a/services/registration/terms b/services/registration/terms new file mode 100644 index 0000000..8af5b06 --- /dev/null +++ b/services/registration/terms @@ -0,0 +1,2 @@ +Do you agree to terms and conditions? +https://grassecon.org/pages/terms-and-conditions diff --git a/services/registration/terms.bin b/services/registration/terms.bin new file mode 100644 index 0000000000000000000000000000000000000000..90a3872f3427e86c04491cdaf638d0ac8e725511 GIT binary patch literal 41 vcmZSJVy;XrW;A5rV#>>BG-6<9;NVIwN=+-ZV%F(KrbL3@3?dFsc9m literal 0 HcmV?d00001 diff --git a/services/registration/transaction_initiated.vis b/services/registration/transaction_initiated.vis new file mode 100644 index 0000000..f8cf19c --- /dev/null +++ b/services/registration/transaction_initiated.vis @@ -0,0 +1,11 @@ +LOAD reset_incorrect 6 +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH _ flag_account_authorized 0 +RELOAD get_amount +MAP get_amount +RELOAD get_recipient +MAP get_recipient +RELOAD get_sender +MAP get_sender +LOAD initiate_transaction 0 +HALT diff --git a/services/registration/transaction_pin b/services/registration/transaction_pin new file mode 100644 index 0000000..a1b7125 --- /dev/null +++ b/services/registration/transaction_pin @@ -0,0 +1,2 @@ +{{.get_recipient}} will receive {{.get_amount}} from {{.get_sender}} +Please enter your PIN to confirm: \ No newline at end of file diff --git a/services/registration/transaction_pin.bin b/services/registration/transaction_pin.bin new file mode 100644 index 0000000000000000000000000000000000000000..4980bb2370e2bd0c649cdb62bdbdbfe27ab183f3 GIT binary patch literal 206 zcmZXN!3qK~3`7&GS_*p*@h3ca-LEOJ8#IXN+D$Khy<1#C^!R3YGvLC7Ez&(#HCTUx z>snJd$tc{)AAXw?>%e6(7YOc5>4ql=?oq|Cht-a%U2~BqM@p%k;Rd$g{&T=iH03fM eTO37kkKi%RYyPw54^~JgN+wyOsF;xPfX5f+uRmk} literal 0 HcmV?d00001 diff --git a/services/registration/transaction_pin.vis b/services/registration/transaction_pin.vis new file mode 100644 index 0000000..0388f0c --- /dev/null +++ b/services/registration/transaction_pin.vis @@ -0,0 +1,15 @@ +RELOAD get_amount +MAP get_amount +RELOAD get_recipient +MAP get_recipient +RELOAD get_sender +MAP get_sender +MOUT back 0 +MOUT quit 9 +LOAD authorize_account 6 +HALT +RELOAD authorize_account +CATCH incorrect_pin flag_incorrect_pin 1 +INCMP _ 0 +INCMP quit 9 +INCMP transaction_initiated * diff --git a/services/registration/transaction_pin_swa b/services/registration/transaction_pin_swa new file mode 100644 index 0000000..1924166 --- /dev/null +++ b/services/registration/transaction_pin_swa @@ -0,0 +1,2 @@ +{{.get_recipient}} atapokea {{.get_amount}} kutoka kwa {{.get_sender}} +Tafadhali weka PIN yako kudhibitisha: \ No newline at end of file diff --git a/services/registration/transactions b/services/registration/transactions new file mode 100644 index 0000000..8152c42 --- /dev/null +++ b/services/registration/transactions @@ -0,0 +1 @@ +{{.get_transactions}} \ No newline at end of file diff --git a/services/registration/transactions.bin b/services/registration/transactions.bin new file mode 100644 index 0000000000000000000000000000000000000000..be5a5051295b15b803ed7602f7c576ef82ee6d97 GIT binary patch literal 173 zcmZQz7D!Jmi7zQi%qvbzF3HT#D`sS1V8sw*;9^NiOwMLB05S?oGfS8(Eg863@=_~G zm<$aWcvuRGQp=c(j2PG%nEA>wQ_JIvOA<>`b5rw5fX1<)2{AA->M_bOGH@`)0S)AU V8_2 11 +INCMP < 22 +INCMP view_statement * diff --git a/services/registration/transactions_swa b/services/registration/transactions_swa new file mode 100644 index 0000000..8152c42 --- /dev/null +++ b/services/registration/transactions_swa @@ -0,0 +1 @@ +{{.get_transactions}} \ No newline at end of file diff --git a/services/registration/unregistered_number b/services/registration/unregistered_number new file mode 100644 index 0000000..9cc33d7 --- /dev/null +++ b/services/registration/unregistered_number @@ -0,0 +1 @@ +The number you have entered is either not registered with Sarafu or is invalid. \ No newline at end of file diff --git a/services/registration/unregistered_number.bin b/services/registration/unregistered_number.bin new file mode 100644 index 0000000000000000000000000000000000000000..cf18ba133a79514e7c967c1e3a0e7d2804a3cc73 GIT binary patch literal 93 zcmZQzmMlswPA!Qq%_~Yx&nzxUElN#^&nwMMN-bh!U|_*5%fQ8wl$e~&XaHmsmS&bP QS~9RRa4^OJ1vsDr0Ih@@v;Y7A literal 0 HcmV?d00001 diff --git a/services/registration/unregistered_number.vis b/services/registration/unregistered_number.vis new file mode 100644 index 0000000..0ff96be --- /dev/null +++ b/services/registration/unregistered_number.vis @@ -0,0 +1,7 @@ +LOAD reset_unregistered_number 0 +RELOAD reset_unregistered_number +MOUT back 0 +MOUT quit 9 +HALT +INCMP ^ 0 +INCMP quit 9 diff --git a/services/registration/unregistered_number_swa b/services/registration/unregistered_number_swa new file mode 100644 index 0000000..19810cb --- /dev/null +++ b/services/registration/unregistered_number_swa @@ -0,0 +1 @@ +Nambari uliyoingiza haijasajiliwa na Sarafu au sio sahihi. \ No newline at end of file diff --git a/services/registration/unspecified_menu b/services/registration/unspecified_menu new file mode 100644 index 0000000..4cd1a5c --- /dev/null +++ b/services/registration/unspecified_menu @@ -0,0 +1 @@ +Unspecified \ No newline at end of file diff --git a/services/registration/unspecified_menu_swa b/services/registration/unspecified_menu_swa new file mode 100644 index 0000000..009301f --- /dev/null +++ b/services/registration/unspecified_menu_swa @@ -0,0 +1 @@ +Haijabainishwa \ No newline at end of file diff --git a/services/registration/update_age b/services/registration/update_age new file mode 100644 index 0000000..76ca306 --- /dev/null +++ b/services/registration/update_age @@ -0,0 +1,2 @@ +RELOAD save_yob +CATCH profile_update_success flag_allow_update 1 \ No newline at end of file diff --git a/services/registration/update_familyname.bin b/services/registration/update_familyname.bin new file mode 100644 index 0000000000000000000000000000000000000000..7183798e5cfd37fec12514735a552693e4e25b1c GIT binary patch literal 46 zcmZQz;V(`sON~!U%+1WH%uCEoWndI5D9TUE%t?(eEl5c$NsTWqO-@cNE@l*E1ORFG B51s%3 literal 0 HcmV?d00001 diff --git a/services/registration/update_familyname.vis b/services/registration/update_familyname.vis new file mode 100644 index 0000000..7cd4d9f --- /dev/null +++ b/services/registration/update_familyname.vis @@ -0,0 +1,2 @@ +RELOAD save_familyname +CATCH profile_update_success flag_allow_update 1 diff --git a/services/registration/update_firstname.bin b/services/registration/update_firstname.bin new file mode 100644 index 0000000000000000000000000000000000000000..379245a74320a58e3bea669bf1399f80311402d7 GIT binary patch literal 45 zcmZQz;VVuoON~# 11 +INCMP < 22 diff --git a/services/registration/view_swa b/services/registration/view_swa new file mode 100644 index 0000000..bd84b19 --- /dev/null +++ b/services/registration/view_swa @@ -0,0 +1 @@ +Angalia Wasifu \ No newline at end of file diff --git a/services/registration/view_voucher b/services/registration/view_voucher new file mode 100644 index 0000000..3940982 --- /dev/null +++ b/services/registration/view_voucher @@ -0,0 +1,2 @@ +Enter PIN to confirm selection: +{{.view_voucher}} \ No newline at end of file diff --git a/services/registration/view_voucher.bin b/services/registration/view_voucher.bin new file mode 100644 index 0000000000000000000000000000000000000000..56034b2a8cb5d7aaec72c571ed8dd36d7fb8eba9 GIT binary patch literal 127 zcmZQzUP85uYj00rN}e)Pdb7irsNk`f^aw9Gnx1rhCLhJld5>?SJfv=71P$P8>gQ>%4s l2~tr4qI%xbA9^-{HPXMMOr}vU>~7c&8`&dA!Ql?Y8!oV79Ap3h literal 0 HcmV?d00001 diff --git a/services/registration/voucher_set.vis b/services/registration/voucher_set.vis new file mode 100644 index 0000000..e75c693 --- /dev/null +++ b/services/registration/voucher_set.vis @@ -0,0 +1,10 @@ +LOAD reset_incorrect 6 +CATCH incorrect_pin flag_incorrect_pin 1 +CATCH _ flag_account_authorized 0 +LOAD set_voucher 12 +MAP set_voucher +MOUT back 0 +MOUT quit 9 +HALT +INCMP ^ 0 +INCMP quit 9 diff --git a/services/registration/voucher_set_swa b/services/registration/voucher_set_swa new file mode 100644 index 0000000..97d3fde --- /dev/null +++ b/services/registration/voucher_set_swa @@ -0,0 +1 @@ +Hongera! {{.set_voucher}} ni Sarafu inayotumika sasa. \ No newline at end of file diff --git a/services/registration/vouchers_menu b/services/registration/vouchers_menu new file mode 100644 index 0000000..5084c32 --- /dev/null +++ b/services/registration/vouchers_menu @@ -0,0 +1 @@ +My Vouchers \ No newline at end of file diff --git a/services/registration/vouchers_menu_swa b/services/registration/vouchers_menu_swa new file mode 100644 index 0000000..64ba54e --- /dev/null +++ b/services/registration/vouchers_menu_swa @@ -0,0 +1 @@ +Sarafu yangu \ No newline at end of file diff --git a/services/registration/yes_menu b/services/registration/yes_menu new file mode 100644 index 0000000..3fdfb3d --- /dev/null +++ b/services/registration/yes_menu @@ -0,0 +1 @@ +Yes \ No newline at end of file diff --git a/services/registration/yes_menu_swa b/services/registration/yes_menu_swa new file mode 100644 index 0000000..542d3c3 --- /dev/null +++ b/services/registration/yes_menu_swa @@ -0,0 +1 @@ +Ndio \ No newline at end of file