rasa-pro 3.13.1a4__py3-none-any.whl → 3.13.1a6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/builder/project_generator.py +6 -1
- rasa/cli/project_templates/finance/actions/__init__.py +0 -0
- rasa/cli/project_templates/finance/actions/action_add_payee.py +47 -0
- rasa/cli/project_templates/finance/actions/action_ask_account.py +50 -0
- rasa/cli/project_templates/finance/actions/action_ask_account_from.py +50 -0
- rasa/cli/project_templates/finance/actions/action_ask_card.py +47 -0
- rasa/cli/project_templates/finance/actions/action_check_balance.py +40 -0
- rasa/cli/project_templates/finance/actions/action_check_card_existence.py +35 -0
- rasa/cli/project_templates/finance/actions/action_check_payee_existence.py +40 -0
- rasa/cli/project_templates/finance/actions/action_check_sufficient_funds.py +41 -0
- rasa/cli/project_templates/finance/actions/action_list_payees.py +45 -0
- rasa/cli/project_templates/finance/actions/action_process_immediate_payment.py +18 -0
- rasa/cli/project_templates/finance/actions/action_remove_payee.py +49 -0
- rasa/cli/project_templates/finance/actions/action_schedule_payment.py +19 -0
- rasa/cli/project_templates/finance/actions/action_session_start.py +69 -0
- rasa/cli/project_templates/finance/actions/action_update_card_status.py +45 -0
- rasa/cli/project_templates/finance/actions/action_validate_payment_date.py +36 -0
- rasa/cli/project_templates/finance/actions/database.py +233 -0
- rasa/cli/project_templates/finance/config.yml +16 -1
- rasa/cli/project_templates/finance/csvs/accounts.csv +8 -0
- rasa/cli/project_templates/finance/csvs/advisors.csv +7 -0
- rasa/cli/project_templates/finance/csvs/appointments.csv +211 -0
- rasa/cli/project_templates/finance/csvs/branches.csv +10 -0
- rasa/cli/project_templates/finance/csvs/cards.csv +11 -0
- rasa/cli/project_templates/finance/csvs/payees.csv +10 -0
- rasa/cli/project_templates/finance/csvs/transactions.csv +71 -0
- rasa/cli/project_templates/finance/csvs/users.csv +4 -0
- rasa/cli/project_templates/finance/data/flows/add_payee.yml +29 -0
- rasa/cli/project_templates/finance/data/flows/block_card.yml +66 -0
- rasa/cli/project_templates/finance/data/flows/check_balance.yml +9 -0
- rasa/cli/project_templates/finance/data/flows/list_payees.yml +5 -0
- rasa/cli/project_templates/finance/data/flows/remove_payee.yml +21 -0
- rasa/cli/project_templates/finance/data/flows/select_card.yml +12 -0
- rasa/cli/project_templates/finance/data/flows/transfer_money.yml +64 -2
- rasa/cli/project_templates/finance/data/flows/welcome.yml +14 -0
- rasa/cli/project_templates/finance/data/nlu.yml +29 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_chitchat.yml +7 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_completed.yml +6 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_search.yml +5 -0
- rasa/cli/project_templates/finance/data/patterns/pattern_session_start.yml +5 -3
- rasa/cli/project_templates/finance/data/source/accounts.json +51 -0
- rasa/cli/project_templates/finance/data/source/advisors.json +44 -0
- rasa/cli/project_templates/finance/data/source/appointments.json +1474 -0
- rasa/cli/project_templates/finance/data/source/branches.json +47 -0
- rasa/cli/project_templates/finance/data/source/cards.json +72 -0
- rasa/cli/project_templates/finance/data/source/payees.json +74 -0
- rasa/cli/project_templates/finance/data/source/transactions.json +492 -0
- rasa/cli/project_templates/finance/data/source/users.json +29 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/consequences_of_blocking_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/reasons_to_block_card.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/recovering_from_card_fraud.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/tips_for_card_security.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/block_card/what_to_do_if_card_is_lost.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/account_balance_security.txt +7 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/common_balance_inquiries.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/methods_to_check_balance.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/understanding_balance_updates.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/check_balance/what_to_do_if_balance_is_incorrect.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/benefits_of_authorised_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/common_issues_with_payees.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/general_payee_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/payee_management_tips.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/manage_payees/understanding_payee_types.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/common_transfer_errors.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/fees_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/general_transfer_information.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/security_tips_for_transfers.txt +8 -0
- rasa/cli/project_templates/finance/docs/bank_of_rasa_faq/transfer_money/transfer_processing_times.txt +8 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part1.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part10.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part11.txt +48 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part12.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part13.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part14.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part15.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part16.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part17.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part18.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part19.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part2.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part20.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part21.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part22.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part23.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part24.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part25.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part26.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part27.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part28.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part29.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part3.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part30.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part31.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part32.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part33.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part34.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part35.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part36.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part37.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part38.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part39.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part4.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part40.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part41.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part42.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part43.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part44.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part45.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part46.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part47.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part48.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part49.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part5.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part50.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part51.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part52.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part53.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part54.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part55.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part56.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part57.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part58.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part59.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part6.txt +47 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part60.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part61.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part7.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part8.txt +50 -0
- rasa/cli/project_templates/finance/docs/huggingface_alpaca_dataset/questions_part9.txt +47 -0
- rasa/cli/project_templates/finance/domain/add_payee.yml +47 -0
- rasa/cli/project_templates/finance/domain/block_card.yml +101 -0
- rasa/cli/project_templates/finance/domain/check_balance.yml +9 -0
- rasa/cli/project_templates/finance/domain/default_actions.yml +16 -0
- rasa/cli/project_templates/finance/domain/default_flows.yml +33 -0
- rasa/cli/project_templates/finance/domain/list_payees.yml +4 -0
- rasa/cli/project_templates/finance/domain/remove_payee.yml +16 -0
- rasa/cli/project_templates/finance/domain/select_card.yml +12 -0
- rasa/cli/project_templates/finance/domain/transfer_money.yml +79 -0
- rasa/cli/project_templates/finance/endpoints.yml +6 -2
- rasa/cli/project_templates/finance/prompts/command-generator.jinja2 +57 -0
- rasa/cli/project_templates/finance/prompts/rephraser_demo_personality_prompt.jinja2 +19 -0
- rasa/cli/project_templates/finance/requirements.txt +1 -0
- rasa/cli/project_templates/plain/actions/__init__.py +0 -0
- rasa/cli/project_templates/telco/actions/actions_billing.py +151 -0
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +27 -0
- rasa/cli/project_templates/telco/actions/actions_run_diagnostics.py +23 -0
- rasa/cli/project_templates/telco/actions/actions_session_start.py +13 -0
- rasa/cli/project_templates/{telecom → telco}/config.yml +9 -1
- rasa/cli/project_templates/telco/csvs/billing.csv +10 -0
- rasa/cli/project_templates/telco/csvs/customers.csv +5 -0
- rasa/cli/project_templates/telco/data/flows/flow_global.yml +5 -0
- rasa/cli/project_templates/telco/data/flows/flow_reboot_router.yml +8 -0
- rasa/cli/project_templates/telco/data/flows/flow_reset_router.yml +7 -0
- rasa/cli/project_templates/telco/data/flows/flow_solve_internet_issue.yml +73 -0
- rasa/cli/project_templates/telco/data/flows/flow_undertand_bill.yml +45 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_completed.yml +7 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_human_handoff.yml +6 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_search.yml +7 -0
- rasa/cli/project_templates/telco/data/patterns/pattern_session_start.yml +9 -0
- rasa/cli/project_templates/telco/docs/reset_vs_rboot_router.txt +1 -0
- rasa/cli/project_templates/telco/docs/restart_router.txt +6 -0
- rasa/cli/project_templates/telco/docs/run_speed_test.txt +6 -0
- rasa/cli/project_templates/telco/domain/domain_global.yml +29 -0
- rasa/cli/project_templates/telco/domain/domain_patterns.yml +17 -0
- rasa/cli/project_templates/telco/domain/domain_reboot_router.yml +20 -0
- rasa/cli/project_templates/telco/domain/domain_reset_router.yml +11 -0
- rasa/cli/project_templates/telco/domain/domain_run_speed_test.yml +24 -0
- rasa/cli/project_templates/telco/domain/domain_solve_internet_issue.yml +74 -0
- rasa/cli/project_templates/telco/domain/domain_undertand_bill.yml +102 -0
- rasa/cli/project_templates/{telecom → telco}/endpoints.yml +4 -2
- rasa/cli/project_templates/telco/prompts/command-generator.jinja2 +57 -0
- rasa/cli/project_templates/telco/tests/e2e_results_failed.yml +62 -0
- rasa/cli/project_templates/telco/tests/e2e_results_passed.yml +130 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/billing_test_cases.yml +68 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/global_test_cases.yml +13 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/internet_slow_test_case.yml +47 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/out_of_scope_test_case.yml +21 -0
- rasa/cli/project_templates/telco/tests/e2e_test_cases/patterns_test_cases.yml +15 -0
- rasa/cli/scaffold.py +1 -1
- rasa/core/channels/studio_chat.py +1 -0
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a4.dist-info → rasa_pro-3.13.1a6.dist-info}/METADATA +1 -1
- {rasa_pro-3.13.1a4.dist-info → rasa_pro-3.13.1a6.dist-info}/RECORD +187 -20
- rasa/cli/project_templates/finance/domain.yml +0 -7
- rasa/cli/project_templates/telecom/data/flows/upgrade_contract.yml +0 -5
- rasa/cli/project_templates/telecom/data/patterns/pattern_session_start.yml +0 -7
- rasa/cli/project_templates/telecom/domain.yml +0 -7
- /rasa/cli/project_templates/{telecom → telco}/credentials.yml +0 -0
- {rasa_pro-3.13.1a4.dist-info → rasa_pro-3.13.1a6.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a4.dist-info → rasa_pro-3.13.1a6.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a4.dist-info → rasa_pro-3.13.1a6.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
import pandas as pd
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Database:
|
|
9
|
+
def __init__(self, csv_path: Optional[Path] = None) -> None:
|
|
10
|
+
"""Initialize the database with CSV file paths."""
|
|
11
|
+
self.project_root_path = Path(__file__).resolve().parent.parent
|
|
12
|
+
self.csv_path = csv_path or self.project_root_path / "csvs"
|
|
13
|
+
self.logger = self.setup_logger()
|
|
14
|
+
|
|
15
|
+
def setup_logger(self) -> logging.Logger:
|
|
16
|
+
"""Set up logging configuration."""
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
logger.setLevel(logging.DEBUG)
|
|
19
|
+
|
|
20
|
+
formatter = logging.Formatter(
|
|
21
|
+
"%(asctime)s %(levelname)8s %(name)s - %(message)s"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
console_handler = logging.StreamHandler()
|
|
25
|
+
console_handler.setLevel(logging.DEBUG)
|
|
26
|
+
console_handler.setFormatter(formatter)
|
|
27
|
+
logger.addHandler(console_handler)
|
|
28
|
+
|
|
29
|
+
return logger
|
|
30
|
+
|
|
31
|
+
def get_user_by_name(self, username: str) -> Optional[Dict[str, Any]]:
|
|
32
|
+
"""Get user information by username."""
|
|
33
|
+
try:
|
|
34
|
+
df = pd.read_csv(self.csv_path / "users.csv")
|
|
35
|
+
user_data = df[df["name"] == username]
|
|
36
|
+
if user_data.empty:
|
|
37
|
+
return None
|
|
38
|
+
return user_data.iloc[0].to_dict()
|
|
39
|
+
except Exception as e:
|
|
40
|
+
self.logger.error(f"Error getting user by name: {e}")
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
def get_user_by_id(self, user_id: int) -> Optional[Dict[str, Any]]:
|
|
44
|
+
"""Get user information by user_id."""
|
|
45
|
+
try:
|
|
46
|
+
df = pd.read_csv(self.csv_path / "users.csv")
|
|
47
|
+
user_data = df[df["id"] == user_id]
|
|
48
|
+
if user_data.empty:
|
|
49
|
+
return None
|
|
50
|
+
return user_data.iloc[0].to_dict()
|
|
51
|
+
except Exception as e:
|
|
52
|
+
self.logger.error(f"Error getting user by id: {e}")
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
def get_account_by_user_and_number(
|
|
56
|
+
self, user_id: int, account_number: str
|
|
57
|
+
) -> Optional[Dict[str, Any]]:
|
|
58
|
+
"""Get account information by user_id and account number."""
|
|
59
|
+
try:
|
|
60
|
+
df = pd.read_csv(self.csv_path / "accounts.csv")
|
|
61
|
+
account_data = df[
|
|
62
|
+
(df["user_id"] == user_id) & (df["number"] == account_number)
|
|
63
|
+
]
|
|
64
|
+
if account_data.empty:
|
|
65
|
+
return None
|
|
66
|
+
return account_data.iloc[0].to_dict()
|
|
67
|
+
except Exception as e:
|
|
68
|
+
self.logger.error(f"Error getting account: {e}")
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
def get_accounts_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
72
|
+
"""Get all accounts for a user."""
|
|
73
|
+
try:
|
|
74
|
+
df = pd.read_csv(self.csv_path / "accounts.csv")
|
|
75
|
+
accounts_data = df[df["user_id"] == user_id]
|
|
76
|
+
return accounts_data.to_dict("records")
|
|
77
|
+
except Exception as e:
|
|
78
|
+
self.logger.error(f"Error getting accounts by user: {e}")
|
|
79
|
+
return []
|
|
80
|
+
|
|
81
|
+
def get_payees_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
82
|
+
"""Get all payees for a user."""
|
|
83
|
+
try:
|
|
84
|
+
df = pd.read_csv(self.csv_path / "payees.csv")
|
|
85
|
+
payees_data = df[df["user_id"] == user_id]
|
|
86
|
+
return payees_data.to_dict("records")
|
|
87
|
+
except Exception as e:
|
|
88
|
+
self.logger.error(f"Error getting payees by user: {e}")
|
|
89
|
+
return []
|
|
90
|
+
|
|
91
|
+
def get_payee_by_name_and_user(
|
|
92
|
+
self, payee_name: str, user_id: int
|
|
93
|
+
) -> Optional[Dict[str, Any]]:
|
|
94
|
+
"""Get payee information by name and user_id."""
|
|
95
|
+
try:
|
|
96
|
+
df = pd.read_csv(self.csv_path / "payees.csv")
|
|
97
|
+
payee_data = df[(df["name"] == payee_name) & (df["user_id"] == user_id)]
|
|
98
|
+
if payee_data.empty:
|
|
99
|
+
return None
|
|
100
|
+
return payee_data.iloc[0].to_dict()
|
|
101
|
+
except Exception as e:
|
|
102
|
+
self.logger.error(f"Error getting payee by name and user: {e}")
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
def get_cards_by_user(self, user_id: int) -> List[Dict[str, Any]]:
|
|
106
|
+
"""Get all cards for a user."""
|
|
107
|
+
try:
|
|
108
|
+
df = pd.read_csv(self.csv_path / "cards.csv")
|
|
109
|
+
cards_data = df[df["user_id"] == user_id]
|
|
110
|
+
return cards_data.to_dict("records")
|
|
111
|
+
except Exception as e:
|
|
112
|
+
self.logger.error(f"Error getting cards by user: {e}")
|
|
113
|
+
return []
|
|
114
|
+
|
|
115
|
+
def get_card_by_number(self, card_number: str) -> Optional[Dict[str, Any]]:
|
|
116
|
+
"""Get card information by card number."""
|
|
117
|
+
try:
|
|
118
|
+
df = pd.read_csv(self.csv_path / "cards.csv")
|
|
119
|
+
card_data = df[df["number"] == card_number]
|
|
120
|
+
if card_data.empty:
|
|
121
|
+
return None
|
|
122
|
+
return card_data.iloc[0].to_dict()
|
|
123
|
+
except Exception as e:
|
|
124
|
+
self.logger.error(f"Error getting card by number: {e}")
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
def update_card_status(self, card_number: str, status: str) -> bool:
|
|
128
|
+
"""Update card status."""
|
|
129
|
+
try:
|
|
130
|
+
df = pd.read_csv(self.csv_path / "cards.csv")
|
|
131
|
+
df.loc[df["number"] == card_number, "status"] = status
|
|
132
|
+
df.to_csv(self.csv_path / "cards.csv", index=False)
|
|
133
|
+
return True
|
|
134
|
+
except Exception as e:
|
|
135
|
+
self.logger.error(f"Error updating card status: {e}")
|
|
136
|
+
return False
|
|
137
|
+
|
|
138
|
+
def add_payee(
|
|
139
|
+
self,
|
|
140
|
+
user_id: int,
|
|
141
|
+
name: str,
|
|
142
|
+
sort_code: str,
|
|
143
|
+
account_number: str,
|
|
144
|
+
payee_type: str,
|
|
145
|
+
reference: str = "",
|
|
146
|
+
) -> bool:
|
|
147
|
+
"""Add a new payee."""
|
|
148
|
+
try:
|
|
149
|
+
df = pd.read_csv(self.csv_path / "payees.csv")
|
|
150
|
+
|
|
151
|
+
# Get the next ID
|
|
152
|
+
next_id = df["id"].max() + 1 if not df.empty else 1
|
|
153
|
+
|
|
154
|
+
# Create new payee record
|
|
155
|
+
new_payee = {
|
|
156
|
+
"id": next_id,
|
|
157
|
+
"user_id": user_id,
|
|
158
|
+
"name": name,
|
|
159
|
+
"sort_code": sort_code,
|
|
160
|
+
"account_number": account_number,
|
|
161
|
+
"type": payee_type,
|
|
162
|
+
"reference": reference,
|
|
163
|
+
"added_at": pd.Timestamp.now().strftime("%Y-%m-%d %H:%M:%S"),
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
# Add to dataframe and save
|
|
167
|
+
df = pd.concat([df, pd.DataFrame([new_payee])], ignore_index=True)
|
|
168
|
+
df.to_csv(self.csv_path / "payees.csv", index=False)
|
|
169
|
+
return True
|
|
170
|
+
except Exception as e:
|
|
171
|
+
self.logger.error(f"Error adding payee: {e}")
|
|
172
|
+
return False
|
|
173
|
+
|
|
174
|
+
def remove_payee(self, payee_name: str, user_id: int) -> bool:
|
|
175
|
+
"""Remove a payee."""
|
|
176
|
+
try:
|
|
177
|
+
df = pd.read_csv(self.csv_path / "payees.csv")
|
|
178
|
+
df = df[~((df["name"] == payee_name) & (df["user_id"] == user_id))]
|
|
179
|
+
df.to_csv(self.csv_path / "payees.csv", index=False)
|
|
180
|
+
return True
|
|
181
|
+
except Exception as e:
|
|
182
|
+
self.logger.error(f"Error removing payee: {e}")
|
|
183
|
+
return False
|
|
184
|
+
|
|
185
|
+
def check_sufficient_funds(
|
|
186
|
+
self, user_id: int, account_number: str, amount: float
|
|
187
|
+
) -> bool:
|
|
188
|
+
"""Check if account has sufficient funds."""
|
|
189
|
+
try:
|
|
190
|
+
account = self.get_account_by_user_and_number(user_id, account_number)
|
|
191
|
+
if not account:
|
|
192
|
+
return False
|
|
193
|
+
return float(account["balance"]) >= amount
|
|
194
|
+
except Exception as e:
|
|
195
|
+
self.logger.error(f"Error checking sufficient funds: {e}")
|
|
196
|
+
return False
|
|
197
|
+
|
|
198
|
+
def get_branches(self) -> List[Dict[str, Any]]:
|
|
199
|
+
"""Get all branches."""
|
|
200
|
+
try:
|
|
201
|
+
df = pd.read_csv(self.csv_path / "branches.csv")
|
|
202
|
+
return df.to_dict("records")
|
|
203
|
+
except Exception as e:
|
|
204
|
+
self.logger.error(f"Error getting branches: {e}")
|
|
205
|
+
return []
|
|
206
|
+
|
|
207
|
+
def get_advisors_by_branch(self, branch_id: int) -> List[Dict[str, Any]]:
|
|
208
|
+
"""Get all advisors for a branch."""
|
|
209
|
+
try:
|
|
210
|
+
df = pd.read_csv(self.csv_path / "advisors.csv")
|
|
211
|
+
advisors_data = df[df["branch_id"] == branch_id]
|
|
212
|
+
return advisors_data.to_dict("records")
|
|
213
|
+
except Exception as e:
|
|
214
|
+
self.logger.error(f"Error getting advisors by branch: {e}")
|
|
215
|
+
return []
|
|
216
|
+
|
|
217
|
+
def get_appointments_by_advisor(self, advisor_id: int) -> List[Dict[str, Any]]:
|
|
218
|
+
"""Get all appointments for an advisor."""
|
|
219
|
+
try:
|
|
220
|
+
df = pd.read_csv(self.csv_path / "appointments.csv")
|
|
221
|
+
appointments_data = df[df["advisor_id"] == advisor_id]
|
|
222
|
+
return appointments_data.to_dict("records")
|
|
223
|
+
except Exception as e:
|
|
224
|
+
self.logger.error(f"Error getting appointments by advisor: {e}")
|
|
225
|
+
return []
|
|
226
|
+
|
|
227
|
+
def __enter__(self):
|
|
228
|
+
"""Enter the runtime context related to this object."""
|
|
229
|
+
return self
|
|
230
|
+
|
|
231
|
+
def __exit__(self, exc_type, exc_value, traceback):
|
|
232
|
+
"""Exit the runtime context related to this object."""
|
|
233
|
+
self.logger.info("Database connection closed")
|
|
@@ -7,11 +7,26 @@ assistant_id: placeholder_default
|
|
|
7
7
|
|
|
8
8
|
language: en
|
|
9
9
|
pipeline:
|
|
10
|
+
- name: WhitespaceTokenizer
|
|
11
|
+
- name: RegexFeaturizer
|
|
12
|
+
- name: LexicalSyntacticFeaturizer
|
|
13
|
+
- name: CountVectorsFeaturizer
|
|
14
|
+
- name: CountVectorsFeaturizer
|
|
15
|
+
analyzer: char_wb
|
|
16
|
+
min_ngram: 1
|
|
17
|
+
max_ngram: 4
|
|
18
|
+
- name: LogisticRegressionClassifier
|
|
19
|
+
# - name: NLUCommandAdapter
|
|
10
20
|
- name: CompactLLMCommandGenerator
|
|
11
21
|
llm:
|
|
12
22
|
model_group: openai-gpt-4o
|
|
23
|
+
prompt_template: prompts/command-generator.jinja2
|
|
13
24
|
|
|
14
25
|
# Configuration for Rasa Core.
|
|
15
26
|
policies:
|
|
16
27
|
- name: FlowPolicy
|
|
17
|
-
- name:
|
|
28
|
+
- name: EnterpriseSearchPolicy
|
|
29
|
+
model: openai-gpt-4o
|
|
30
|
+
vector_store:
|
|
31
|
+
type: "faiss"
|
|
32
|
+
source: "./docs"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
id,user_id,balance,type,number,sort_code,created_at
|
|
2
|
+
1,1,10123.45,savings,12345678,123456,"2024-10-02 17:33:16"
|
|
3
|
+
2,1,4923.67,current,23456789,123456,"2024-10-02 17:33:16"
|
|
4
|
+
3,2,14789.32,current,34567890,234567,"2024-10-02 17:33:16"
|
|
5
|
+
4,2,7134.56,savings,45678901,234567,"2024-10-02 17:33:16"
|
|
6
|
+
5,2,2987.23,business,56789012,234567,"2024-10-02 17:33:16"
|
|
7
|
+
6,3,20245.67,savings,67890123,345678,"2024-10-02 17:33:16"
|
|
8
|
+
7,3,8034.12,current,78901234,345678,"2024-10-02 17:33:16"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
id,branch_id,name,email,phone,position
|
|
2
|
+
1,1,"Eto Demerzel",eto.demerzel@trantorbranch.com,02079460001,"Business Loan Advisor"
|
|
3
|
+
2,1,"Bayta Darell",bayta.darell@trantorbranch.com,02079460003,"Wealth Management Advisor"
|
|
4
|
+
3,2,"Daneel Olivaw",daneel.olivaw@terminusbranch.com,02079460004,"Retirement Planning Advisor"
|
|
5
|
+
4,3,"Hober Mallow",hober.mallow@asimovbranch.com,02079460007,"Personal Finance Advisor"
|
|
6
|
+
5,3,"Bel Riose",bel.riose@asimovbranch.com,02079460008,"Investment Advisor"
|
|
7
|
+
6,3,Pritcher,pritcher@asimovbranch.com,02079460009,"Investment Advisor"
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
id,advisor_id,date,start_time,end_time,status
|
|
2
|
+
1,1,2024-10-01,09:00,09:30,open
|
|
3
|
+
2,1,2024-10-01,10:00,10:30,booked
|
|
4
|
+
3,1,2024-10-01,11:00,11:30,open
|
|
5
|
+
4,1,2024-10-01,14:00,14:30,booked
|
|
6
|
+
5,1,2024-10-01,15:00,15:30,booked
|
|
7
|
+
6,1,2024-10-02,09:00,09:30,booked
|
|
8
|
+
7,1,2024-10-02,10:00,10:30,open
|
|
9
|
+
8,1,2024-10-02,11:00,11:30,open
|
|
10
|
+
9,1,2024-10-02,14:00,14:30,booked
|
|
11
|
+
10,1,2024-10-02,15:00,15:30,booked
|
|
12
|
+
11,1,2024-10-03,09:00,09:30,open
|
|
13
|
+
12,1,2024-10-03,10:00,10:30,booked
|
|
14
|
+
13,1,2024-10-03,11:00,11:30,open
|
|
15
|
+
14,1,2024-10-03,14:00,14:30,booked
|
|
16
|
+
15,1,2024-10-03,15:00,15:30,booked
|
|
17
|
+
16,1,2024-10-04,09:00,09:30,booked
|
|
18
|
+
17,1,2024-10-04,10:00,10:30,open
|
|
19
|
+
18,1,2024-10-04,11:00,11:30,booked
|
|
20
|
+
19,1,2024-10-04,14:00,14:30,open
|
|
21
|
+
20,1,2024-10-04,15:00,15:30,booked
|
|
22
|
+
21,1,2024-10-05,09:00,09:30,booked
|
|
23
|
+
22,1,2024-10-05,10:00,10:30,open
|
|
24
|
+
23,1,2024-10-05,11:00,11:30,booked
|
|
25
|
+
24,1,2024-10-05,14:00,14:30,booked
|
|
26
|
+
25,1,2024-10-05,15:00,15:30,open
|
|
27
|
+
26,1,2024-10-06,09:00,09:30,open
|
|
28
|
+
27,1,2024-10-06,10:00,10:30,booked
|
|
29
|
+
28,1,2024-10-06,11:00,11:30,booked
|
|
30
|
+
29,1,2024-10-06,14:00,14:30,open
|
|
31
|
+
30,1,2024-10-06,15:00,15:30,booked
|
|
32
|
+
31,1,2024-10-07,09:00,09:30,booked
|
|
33
|
+
32,1,2024-10-07,10:00,10:30,open
|
|
34
|
+
33,1,2024-10-07,11:00,11:30,open
|
|
35
|
+
34,1,2024-10-07,14:00,14:30,booked
|
|
36
|
+
35,1,2024-10-07,15:00,15:30,booked
|
|
37
|
+
36,2,2024-10-01,09:00,09:30,open
|
|
38
|
+
37,2,2024-10-01,10:00,10:30,booked
|
|
39
|
+
38,2,2024-10-01,11:00,11:30,open
|
|
40
|
+
39,2,2024-10-01,14:00,14:30,booked
|
|
41
|
+
40,2,2024-10-01,15:00,15:30,booked
|
|
42
|
+
41,2,2024-10-02,09:00,09:30,booked
|
|
43
|
+
42,2,2024-10-02,10:00,10:30,open
|
|
44
|
+
43,2,2024-10-02,11:00,11:30,open
|
|
45
|
+
44,2,2024-10-02,14:00,14:30,booked
|
|
46
|
+
45,2,2024-10-02,15:00,15:30,booked
|
|
47
|
+
46,2,2024-10-03,09:00,09:30,open
|
|
48
|
+
47,2,2024-10-03,10:00,10:30,booked
|
|
49
|
+
48,2,2024-10-03,11:00,11:30,open
|
|
50
|
+
49,2,2024-10-03,14:00,14:30,booked
|
|
51
|
+
50,2,2024-10-03,15:00,15:30,booked
|
|
52
|
+
51,2,2024-10-04,09:00,09:30,booked
|
|
53
|
+
52,2,2024-10-04,10:00,10:30,open
|
|
54
|
+
53,2,2024-10-04,11:00,11:30,booked
|
|
55
|
+
54,2,2024-10-04,14:00,14:30,open
|
|
56
|
+
55,2,2024-10-04,15:00,15:30,booked
|
|
57
|
+
56,2,2024-10-05,09:00,09:30,booked
|
|
58
|
+
57,2,2024-10-05,10:00,10:30,open
|
|
59
|
+
58,2,2024-10-05,11:00,11:30,booked
|
|
60
|
+
59,2,2024-10-05,14:00,14:30,booked
|
|
61
|
+
60,2,2024-10-05,15:00,15:30,open
|
|
62
|
+
61,2,2024-10-06,09:00,09:30,open
|
|
63
|
+
62,2,2024-10-06,10:00,10:30,booked
|
|
64
|
+
63,2,2024-10-06,11:00,11:30,booked
|
|
65
|
+
64,2,2024-10-06,14:00,14:30,open
|
|
66
|
+
65,2,2024-10-06,15:00,15:30,booked
|
|
67
|
+
66,2,2024-10-07,09:00,09:30,booked
|
|
68
|
+
67,2,2024-10-07,10:00,10:30,open
|
|
69
|
+
68,2,2024-10-07,11:00,11:30,open
|
|
70
|
+
69,2,2024-10-07,14:00,14:30,booked
|
|
71
|
+
70,2,2024-10-07,15:00,15:30,booked
|
|
72
|
+
71,3,2024-10-01,09:00,09:30,open
|
|
73
|
+
72,3,2024-10-01,10:00,10:30,booked
|
|
74
|
+
73,3,2024-10-01,11:00,11:30,open
|
|
75
|
+
74,3,2024-10-01,14:00,14:30,booked
|
|
76
|
+
75,3,2024-10-01,15:00,15:30,booked
|
|
77
|
+
76,3,2024-10-02,09:00,09:30,booked
|
|
78
|
+
77,3,2024-10-02,10:00,10:30,open
|
|
79
|
+
78,3,2024-10-02,11:00,11:30,open
|
|
80
|
+
79,3,2024-10-02,14:00,14:30,booked
|
|
81
|
+
80,3,2024-10-02,15:00,15:30,booked
|
|
82
|
+
81,3,2024-10-03,09:00,09:30,booked
|
|
83
|
+
82,3,2024-10-03,10:00,10:30,booked
|
|
84
|
+
83,3,2024-10-03,11:00,11:30,open
|
|
85
|
+
84,3,2024-10-03,14:00,14:30,open
|
|
86
|
+
85,3,2024-10-03,15:00,15:30,booked
|
|
87
|
+
86,3,2024-10-04,09:00,09:30,open
|
|
88
|
+
87,3,2024-10-04,10:00,10:30,booked
|
|
89
|
+
88,3,2024-10-04,11:00,11:30,booked
|
|
90
|
+
89,3,2024-10-04,14:00,14:30,open
|
|
91
|
+
90,3,2024-10-04,15:00,15:30,booked
|
|
92
|
+
91,3,2024-10-05,09:00,09:30,booked
|
|
93
|
+
92,3,2024-10-05,10:00,10:30,open
|
|
94
|
+
93,3,2024-10-05,11:00,11:30,booked
|
|
95
|
+
94,3,2024-10-05,14:00,14:30,booked
|
|
96
|
+
95,3,2024-10-05,15:00,15:30,open
|
|
97
|
+
96,3,2024-10-06,09:00,09:30,open
|
|
98
|
+
97,3,2024-10-06,10:00,10:30,booked
|
|
99
|
+
98,3,2024-10-06,11:00,11:30,booked
|
|
100
|
+
99,3,2024-10-06,14:00,14:30,open
|
|
101
|
+
100,3,2024-10-06,15:00,15:30,booked
|
|
102
|
+
101,3,2024-10-07,09:00,09:30,booked
|
|
103
|
+
102,3,2024-10-07,10:00,10:30,open
|
|
104
|
+
103,3,2024-10-07,11:00,11:30,open
|
|
105
|
+
104,3,2024-10-07,14:00,14:30,booked
|
|
106
|
+
105,3,2024-10-07,15:00,15:30,booked
|
|
107
|
+
106,4,2024-10-01,09:00,09:30,open
|
|
108
|
+
107,4,2024-10-01,10:00,10:30,booked
|
|
109
|
+
108,4,2024-10-01,11:00,11:30,open
|
|
110
|
+
109,4,2024-10-01,14:00,14:30,booked
|
|
111
|
+
110,4,2024-10-01,15:00,15:30,booked
|
|
112
|
+
111,4,2024-10-02,09:00,09:30,booked
|
|
113
|
+
112,4,2024-10-02,10:00,10:30,open
|
|
114
|
+
113,4,2024-10-02,11:00,11:30,open
|
|
115
|
+
114,4,2024-10-02,14:00,14:30,booked
|
|
116
|
+
115,4,2024-10-02,15:00,15:30,booked
|
|
117
|
+
116,4,2024-10-03,09:00,09:30,open
|
|
118
|
+
117,4,2024-10-03,10:00,10:30,booked
|
|
119
|
+
118,4,2024-10-03,11:00,11:30,open
|
|
120
|
+
119,4,2024-10-03,14:00,14:30,booked
|
|
121
|
+
120,4,2024-10-03,15:00,15:30,booked
|
|
122
|
+
121,4,2024-10-04,09:00,09:30,booked
|
|
123
|
+
122,4,2024-10-04,10:00,10:30,open
|
|
124
|
+
123,4,2024-10-04,11:00,11:30,booked
|
|
125
|
+
124,4,2024-10-04,14:00,14:30,booked
|
|
126
|
+
125,4,2024-10-04,15:00,15:30,open
|
|
127
|
+
126,4,2024-10-05,09:00,09:30,open
|
|
128
|
+
127,4,2024-10-05,10:00,10:30,booked
|
|
129
|
+
128,4,2024-10-05,11:00,11:30,booked
|
|
130
|
+
129,4,2024-10-05,14:00,14:30,booked
|
|
131
|
+
130,4,2024-10-05,15:00,15:30,open
|
|
132
|
+
131,4,2024-10-06,09:00,09:30,open
|
|
133
|
+
132,4,2024-10-06,10:00,10:30,open
|
|
134
|
+
133,4,2024-10-06,11:00,11:30,booked
|
|
135
|
+
134,4,2024-10-06,14:00,14:30,booked
|
|
136
|
+
135,4,2024-10-06,15:00,15:30,open
|
|
137
|
+
136,4,2024-10-07,09:00,09:30,open
|
|
138
|
+
137,4,2024-10-07,10:00,10:30,open
|
|
139
|
+
138,4,2024-10-07,11:00,11:30,booked
|
|
140
|
+
139,4,2024-10-07,14:00,14:30,open
|
|
141
|
+
140,4,2024-10-07,15:00,15:30,booked
|
|
142
|
+
141,5,2024-10-01,09:00,09:30,open
|
|
143
|
+
142,5,2024-10-01,10:00,10:30,booked
|
|
144
|
+
143,5,2024-10-01,11:00,11:30,open
|
|
145
|
+
144,5,2024-10-01,14:00,14:30,booked
|
|
146
|
+
145,5,2024-10-01,15:00,15:30,booked
|
|
147
|
+
146,5,2024-10-02,09:00,09:30,booked
|
|
148
|
+
147,5,2024-10-02,10:00,10:30,open
|
|
149
|
+
148,5,2024-10-02,11:00,11:30,open
|
|
150
|
+
149,5,2024-10-02,14:00,14:30,booked
|
|
151
|
+
150,5,2024-10-02,15:00,15:30,booked
|
|
152
|
+
151,5,2024-10-03,09:00,09:30,open
|
|
153
|
+
152,5,2024-10-03,10:00,10:30,booked
|
|
154
|
+
153,5,2024-10-03,11:00,11:30,open
|
|
155
|
+
154,5,2024-10-03,14:00,14:30,booked
|
|
156
|
+
155,5,2024-10-03,15:00,15:30,booked
|
|
157
|
+
156,5,2024-10-04,09:00,09:30,booked
|
|
158
|
+
157,5,2024-10-04,10:00,10:30,open
|
|
159
|
+
158,5,2024-10-04,11:00,11:30,booked
|
|
160
|
+
159,5,2024-10-04,14:00,14:30,booked
|
|
161
|
+
160,5,2024-10-04,15:00,15:30,open
|
|
162
|
+
161,5,2024-10-05,09:00,09:30,open
|
|
163
|
+
162,5,2024-10-05,10:00,10:30,booked
|
|
164
|
+
163,5,2024-10-05,11:00,11:30,booked
|
|
165
|
+
164,5,2024-10-05,14:00,14:30,booked
|
|
166
|
+
165,5,2024-10-05,15:00,15:30,open
|
|
167
|
+
166,5,2024-10-06,09:00,09:30,open
|
|
168
|
+
167,5,2024-10-06,10:00,10:30,open
|
|
169
|
+
168,5,2024-10-06,11:00,11:30,booked
|
|
170
|
+
169,5,2024-10-06,14:00,14:30,booked
|
|
171
|
+
170,5,2024-10-06,15:00,15:30,open
|
|
172
|
+
171,5,2024-10-07,09:00,09:30,open
|
|
173
|
+
172,5,2024-10-07,10:00,10:30,open
|
|
174
|
+
173,5,2024-10-07,11:00,11:30,booked
|
|
175
|
+
174,5,2024-10-07,14:00,14:30,open
|
|
176
|
+
175,5,2024-10-07,15:00,15:30,booked
|
|
177
|
+
176,6,2024-10-01,09:00,09:30,open
|
|
178
|
+
177,6,2024-10-01,10:00,10:30,booked
|
|
179
|
+
178,6,2024-10-01,11:00,11:30,open
|
|
180
|
+
179,6,2024-10-01,14:00,14:30,booked
|
|
181
|
+
180,6,2024-10-01,15:00,15:30,booked
|
|
182
|
+
181,6,2024-10-02,09:00,09:30,booked
|
|
183
|
+
182,6,2024-10-02,10:00,10:30,open
|
|
184
|
+
183,6,2024-10-02,11:00,11:30,open
|
|
185
|
+
184,6,2024-10-02,14:00,14:30,booked
|
|
186
|
+
185,6,2024-10-02,15:00,15:30,booked
|
|
187
|
+
186,6,2024-10-03,09:00,09:30,open
|
|
188
|
+
187,6,2024-10-03,10:00,10:30,booked
|
|
189
|
+
188,6,2024-10-03,11:00,11:30,open
|
|
190
|
+
189,6,2024-10-03,14:00,14:30,booked
|
|
191
|
+
190,6,2024-10-03,15:00,15:30,booked
|
|
192
|
+
191,6,2024-10-04,09:00,09:30,booked
|
|
193
|
+
192,6,2024-10-04,10:00,10:30,open
|
|
194
|
+
193,6,2024-10-04,11:00,11:30,booked
|
|
195
|
+
194,6,2024-10-04,14:00,14:30,booked
|
|
196
|
+
195,6,2024-10-04,15:00,15:30,open
|
|
197
|
+
196,6,2024-10-05,09:00,09:30,open
|
|
198
|
+
197,6,2024-10-05,10:00,10:30,booked
|
|
199
|
+
198,6,2024-10-05,11:00,11:30,booked
|
|
200
|
+
199,6,2024-10-05,14:00,14:30,booked
|
|
201
|
+
200,6,2024-10-05,15:00,15:30,open
|
|
202
|
+
201,6,2024-10-06,09:00,09:30,open
|
|
203
|
+
202,6,2024-10-06,10:00,10:30,open
|
|
204
|
+
203,6,2024-10-06,11:00,11:30,booked
|
|
205
|
+
204,6,2024-10-06,14:00,14:30,booked
|
|
206
|
+
205,6,2024-10-06,15:00,15:30,open
|
|
207
|
+
206,6,2024-10-07,09:00,09:30,open
|
|
208
|
+
207,6,2024-10-07,10:00,10:30,open
|
|
209
|
+
208,6,2024-10-07,11:00,11:30,booked
|
|
210
|
+
209,6,2024-10-07,14:00,14:30,open
|
|
211
|
+
210,6,2024-10-07,15:00,15:30,booked
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
id,name,address,distance_km
|
|
2
|
+
1,"Trantor Square Branch","10 Psychohistorical Way, Trantor Square, London, SW1A 1AB",0.2
|
|
3
|
+
2,"Foundation Central Branch","5 Foundation Road, Trantor Square, London, SW1A 1AC",0.3
|
|
4
|
+
3,"Trantor East Branch","12 Trantor Lane, Trantor Square, London, SW1A 1AD",0.4
|
|
5
|
+
4,"Terminus Park Branch","3 Foundation Drive, Terminus Park, London, E1 6AP",0.5
|
|
6
|
+
5,"Foundation Retail Branch","8 Terminus Avenue, Terminus Park, London, E1 6AQ",0.6
|
|
7
|
+
6,"Terminus Square Branch","6 Terminus Way, Terminus Park, London, E1 6AR",0.7
|
|
8
|
+
7,"Asimov Gardens Branch","4 Scholar's Lane, Asimov Gardens, London, WC1B 5HB",0.3
|
|
9
|
+
8,"Garden Square Branch","8 Asimov Way, Asimov Gardens, London, WC1B 5HC",0.5
|
|
10
|
+
9,"Scholar's Lane Branch","2 Scholar's Court, Asimov Gardens, London, WC1B 5HD",0.4
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
id,user_id,account_id,number,type,status,issued_at,updated_at
|
|
2
|
+
1,1,1,1111222233334444,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
3
|
+
2,1,2,1234567812345678,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
4
|
+
3,1,,5555666677778888,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
5
|
+
4,2,3,9999000011112222,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
6
|
+
5,2,4,2345678923456789,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
7
|
+
6,2,5,3456789034567890,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
8
|
+
7,2,,3333444455556666,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
9
|
+
8,3,6,2222333344445555,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
10
|
+
9,3,7,4567890145678901,debit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
11
|
+
10,3,,6666777788889999,credit,active,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
id,user_id,name,sort_code,account_number,type,reference,added_at
|
|
2
|
+
1,1,Robert,123456,65432178,person,friend,"2024-10-02 17:33:16"
|
|
3
|
+
2,1,James,123456,87654321,person,son,"2024-10-02 17:33:16"
|
|
4
|
+
3,1,"Food Market",123456,11223344,business,groceries,"2024-10-02 17:33:16"
|
|
5
|
+
4,2,Richard,654321,12345678,person,"business partner","2024-10-02 17:33:16"
|
|
6
|
+
5,2,Susan,654321,87654321,person,friend,"2024-10-02 17:33:16"
|
|
7
|
+
6,2,"Electric Company",654321,99887766,business,utilities,"2024-10-02 17:33:16"
|
|
8
|
+
8,3,Amy,111111,33332222,person,colleague,"2024-10-02 17:33:16"
|
|
9
|
+
9,3,"Fitness Gym",111111,44556677,business,gym,"2024-10-02 17:33:16"
|
|
10
|
+
10,3,William,111111,22223333,person,friend,"2024-11-27 12:21:15"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
id,account_id,amount,datetime,description,payment_method,payee
|
|
2
|
+
1,1,500.0,"2024-08-11 02:45:50","Purchase at Galactic Market",debit,"Galactic Market"
|
|
3
|
+
2,1,1500.0,"2024-08-05 15:18:59","Rent Payment to Trantor Estates",regular,"Trantor Estates"
|
|
4
|
+
3,1,75.5,"2024-08-27 23:24:38","Dinner at Mycogen Sector Restaurant",debit,"Mycogen Cuisine"
|
|
5
|
+
4,1,250.0,"2024-08-29 19:59:35","Interplanetary Transport Fare",debit,"Imperial Spacelines"
|
|
6
|
+
5,1,120.75,"2024-09-23 01:41:01","Vault of Trantor Museum Tickets",debit,"Trantor Historical Society"
|
|
7
|
+
6,1,800.0,"2024-09-21 13:26:46","Personal Shield Maintenance",regular,"Imperial Tech Services"
|
|
8
|
+
7,1,45.99,"2024-09-05 22:04:38","Prime Radiant Data Subscription",debit,"Seldon Psychohistory Institute"
|
|
9
|
+
8,1,350.0,"2024-08-18 09:02:44","Gravitic Repulsor Boots",debit,"Terminus Outfitters"
|
|
10
|
+
9,1,1000.0,"2024-08-24 02:31:24","Spaceship Insurance Premium",regular,"Galactic Insurers"
|
|
11
|
+
10,1,180.25,"2024-08-10 22:43:41","Galactic Standard Language Course",regular,"Imperial University of Trantor"
|
|
12
|
+
11,2,200.0,"2024-08-11 03:31:18","Energy Bill for Terminus Power",regular,"Terminus Power"
|
|
13
|
+
12,2,1200.0,"2024-09-30 02:22:24","Subscription to Encyclopedia Galactica",regular,"Encyclopedia Galactica"
|
|
14
|
+
13,2,85.75,"2024-09-11 13:02:22","Hyperwave Transceiver Repair",debit,"Foundation TechnoFix"
|
|
15
|
+
14,2,450.0,"2024-08-01 23:17:02","Subetheric Communication Package",regular,GalactiComm
|
|
16
|
+
15,2,75.0,"2024-09-02 11:37:32","Atomic Converter Fuel",debit,"Anacreon Fuel Station"
|
|
17
|
+
16,2,300.0,"2024-09-06 10:46:27","Positronic Brain Maintenance",debit,"R. Daneel Olivaw Services"
|
|
18
|
+
17,2,1800.0,"2024-09-22 21:55:55","Vault of Trantor Access Fee",debit,"Imperial Library of Trantor"
|
|
19
|
+
18,2,95.5,"2024-09-08 01:17:03","Neuronic Whip Power Cell",debit,"Imperial Armory"
|
|
20
|
+
19,2,250.0,"2024-09-14 14:34:47","Holographic Home Decor",debit,"Kalgan Luxury Imports"
|
|
21
|
+
20,2,500.0,"2024-09-09 17:18:46","Gravitic Gymnasium Membership",regular,"Trantor Fitness"
|
|
22
|
+
21,3,450.0,"2024-09-03 20:59:43","Purchase from Anacreon Traders",debit,"Anacreon Traders"
|
|
23
|
+
22,3,320.0,"2024-09-07 10:27:28","Gym Membership at Imperial Fitness",regular,"Imperial Fitness"
|
|
24
|
+
23,3,150.75,"2024-09-08 01:41:20","Galactic Cuisine Cooking Class",debit,"Synnax Culinary Academy"
|
|
25
|
+
24,3,700.0,"2024-09-29 13:33:38","Jump Drive Upgrade",debit,"Terminus Shipyards"
|
|
26
|
+
25,3,45.99,"2024-07-12 16:08:22","Mycogen Sector Fungi Supplies",debit,"Mycogen Agri-Corp"
|
|
27
|
+
26,3,1200.0,"2024-08-22 17:56:27","Personal Force Field Maintenance",regular,"Terminus Technologies"
|
|
28
|
+
27,3,80.0,"2024-09-24 02:38:36","Trantorian Postal Service",debit,"Imperial Postal Service"
|
|
29
|
+
28,3,350.0,"2024-09-23 06:28:21","Psychohistory Conference Fee",regular,"Second Foundation"
|
|
30
|
+
29,3,25.5,"2024-09-13 19:45:03","Spaceship Debris Shield Insurance",regular,"Galactic Insurers"
|
|
31
|
+
30,3,500.0,"2024-09-21 00:09:11","Mental Static Device",debit,"Second Foundation Tech"
|
|
32
|
+
31,4,300.0,"2024-07-18 18:57:48","Dinner at Star's End Diner",debit,"Star's End Diner"
|
|
33
|
+
32,4,50.0,"2024-09-28 12:23:36","Coffee at Terminus Cafe",debit,"Terminus Cafe"
|
|
34
|
+
33,4,1500.0,"2024-08-20 18:21:20","Far Star Spacecraft Lease Payment",regular,"Foundation Fleet Services"
|
|
35
|
+
34,4,75.25,"2024-07-30 06:02:46","Zero-G Yoga Class",debit,"Synnax Fitness Studio"
|
|
36
|
+
35,4,200.0,"2024-07-23 22:29:14","Galactic Dating App Subscription",regular,"Hearts Across the Stars"
|
|
37
|
+
36,4,450.0,"2024-09-20 00:42:13","Vault of Trantor Virtual Access",regular,"Imperial Library of Trantor"
|
|
38
|
+
37,4,30.5,"2024-08-21 10:17:36","Anacreon Beast Feed",debit,"Anacreon Livestock Supplies"
|
|
39
|
+
38,4,800.0,"2024-09-07 03:32:28","Personal Force Field Repair",debit,"Foundation Tech Services"
|
|
40
|
+
39,4,150.0,"2024-09-16 10:58:24","Mule's Emotional Projector Experience",debit,"Kalgan Entertainment"
|
|
41
|
+
40,4,100.0,"2024-07-31 19:52:02","Mycogen Yeast Culture Subscription",regular,"Mycogen Sector Imports"
|
|
42
|
+
41,5,600.0,"2024-09-08 02:57:02","Office Supplies from Foundation Store",debit,"Foundation Office Store"
|
|
43
|
+
42,5,1000.0,"2024-08-18 13:06:49","Trantor Docking Fee",regular,"Imperial Spaceport Authority"
|
|
44
|
+
43,5,75.5,"2024-08-04 16:30:28","Galactic Standard Translator Device",debit,"Foundation Electronics"
|
|
45
|
+
44,5,250.0,"2024-08-26 16:22:14","Visi-Sonor Tuning",debit,"Rossem Instruments"
|
|
46
|
+
45,5,350.0,"2024-09-24 03:53:18","Planetary Defense Shield Subscription",regular,"Terminus Defense Systems"
|
|
47
|
+
46,5,120.75,"2024-08-03 01:43:36","Seldon Crisis Forecast Update",debit,"Psychohistory Institute"
|
|
48
|
+
47,5,800.0,"2024-08-11 14:16:35","Artificial Gravity Generator",debit,"Foundation Physics Corp"
|
|
49
|
+
48,5,40.0,"2024-09-13 23:44:14","Concentrated Food Tablets",debit,"Foundation Nutrition"
|
|
50
|
+
49,5,500.0,"2024-07-15 03:55:28","Hyper-sleep Chamber Rental",regular,"Anacreon Travel Services"
|
|
51
|
+
50,5,150.0,"2024-08-23 18:15:31","Vault of Trantor Artifact Insurance",regular,"Galactic Treasures Assurance"
|
|
52
|
+
51,6,900.0,"2024-09-22 11:01:35","Software Subscription to Seldon Analytics",regular,"Seldon Analytics"
|
|
53
|
+
52,6,1200.0,"2024-09-16 01:55:56","Purchase of Holographic Equipment",debit,HoloTech
|
|
54
|
+
53,6,50.25,"2024-09-27 10:41:20","Atomic Coffee Subscription",regular,"Trantor Roasters"
|
|
55
|
+
54,6,300.0,"2024-08-16 22:39:15","Hyperspace Communication Charges",regular,GalactiComm
|
|
56
|
+
55,6,75.0,"2024-07-20 13:41:10","Anti-Grav Hair Styling Gel",debit,"Kalgan Cosmetics"
|
|
57
|
+
56,6,450.0,"2024-07-08 16:39:22","R. Daneel Olivaw Model Upgrade",debit,"Aurora Robotics"
|
|
58
|
+
57,6,200.0,"2024-07-31 22:59:01","Space Pirate Insurance",regular,"Galactic Risk Management"
|
|
59
|
+
58,6,100.0,"2024-08-14 00:38:37","Terminus Mining Royalties",regular,"Foundation Resources"
|
|
60
|
+
59,6,750.0,"2024-09-07 06:51:00","Jump-2 Hyperdrive System",debit,"Foundation Fleet Tech"
|
|
61
|
+
60,6,25.5,"2024-07-30 23:58:23","Gravitic Repulsion Yoga Mat",debit,"Synnax Fitness Gear"
|
|
62
|
+
61,7,150.0,"2024-07-05 04:57:25","Book Purchase from Trantor Books",debit,"Trantor Books"
|
|
63
|
+
62,7,500.0,"2024-09-30 10:36:55","Personal Force Field System",debit,"Terminus Security Solutions"
|
|
64
|
+
63,7,75.25,"2024-09-06 02:16:38","Atomic Vibro-Blade Toothbrush",debit,"Foundation Health Tech"
|
|
65
|
+
64,7,1000.0,"2024-09-01 08:59:49","Spacecraft Neural Interface Upgrade",debit,"Foundation Fleet Systems"
|
|
66
|
+
65,7,250.0,"2024-09-05 23:57:50","Holographic History Tour of Trantor",debit,"Imperial Tourism Board"
|
|
67
|
+
66,7,180.0,"2024-08-12 04:01:36","Psychohistory for Beginners Course",regular,"Seldon Institute"
|
|
68
|
+
67,7,90.5,"2024-07-12 14:27:56","Trantorian Cuisine Delivery",debit,GalactiEats
|
|
69
|
+
68,7,550.0,"2024-08-24 12:45:00","Personal Mentalic Shield",debit,"Second Foundation Tech"
|
|
70
|
+
69,7,125.75,"2024-10-02 01:53:13","Vault of Trantor Virtual Tour",debit,"Imperial Library of Trantor"
|
|
71
|
+
70,7,300.0,"2024-07-04 21:10:25","Foundation Encyclopedia Update",regular,"Encyclopedia Galactica"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
id,name,email,phone,address,username,password,segment,created_at,updated_at
|
|
2
|
+
1,"John Smith",john.smith@example.com,0123456789,"1 Psychohistorical Way, Trantor Square, London, SW1A 1AA",john.smith,smith123,Corporate,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
3
|
+
2,"Mary Brown",mary.brown@example.com,0129876543,"2 Foundation Drive, Terminus Park, London, E1 6AN",mary.brown,brown123,Retail,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
4
|
+
3,"Dan Young",dan.young@example.com,0123345678,"3 Scholar's Lane, Asimov Gardens, London, WC1B 5HA",dan.young,young123,SME,"2024-10-02 17:33:16","2024-10-02 17:33:16"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
flows:
|
|
2
|
+
add_payee:
|
|
3
|
+
description: "Add a new payee to the user’s account by collecting and confirming details such as payee name, account number, payee type (person or business), and a reference note"
|
|
4
|
+
steps:
|
|
5
|
+
- collect: payee_name
|
|
6
|
+
description: "name of the payee"
|
|
7
|
+
- collect: account_number
|
|
8
|
+
description: "banking account number"
|
|
9
|
+
- collect: payee_type
|
|
10
|
+
description: "type of the payee that can be either person or business"
|
|
11
|
+
- collect: reference
|
|
12
|
+
description: "a short note to identify the payee or purpose"
|
|
13
|
+
- collect: confirm_payee_details
|
|
14
|
+
description: "confirmation from the user that all payee details are correct before proceeding"
|
|
15
|
+
ask_before_filling: true
|
|
16
|
+
next:
|
|
17
|
+
- if: slots.confirm_payee_details
|
|
18
|
+
then: action_add_payee_step
|
|
19
|
+
- else: END
|
|
20
|
+
- id: action_add_payee_step
|
|
21
|
+
action: action_add_payee
|
|
22
|
+
next:
|
|
23
|
+
- if: slots.payee_added
|
|
24
|
+
then:
|
|
25
|
+
- action: utter_payee_added_success
|
|
26
|
+
next: END
|
|
27
|
+
- else:
|
|
28
|
+
- action: utter_payee_added_failure
|
|
29
|
+
next: END
|