✨ feat(manager.py): add method run_migrations_test() to check if all models are in the database and up to date with all columns
✨ feat(manager.py): add method check_table() to check if a table exists and if all expected columns are present
🔧 fix(utils.py): import missing dependencies to resolve NameError and improve code readability
✨ feat(utils.py): add dataclasses Result and TableResults to store check results for tables and columns
🔧 chore(test_cli.py): update test to use the new run command instead of serve command
✨ feat(test_cli.py): add test for creating a superuser with the superuser command
✨ feat(adds_tables.py): add support for creating 'user_id' column in 'flow' table if it does not exist
🔧 fix(adds_tables.py): fix index creation for 'flow' table when 'user_id' column exists
✨ feat(manager.py): add check_schema_health method to DatabaseManager to verify the integrity of the database schema
🐛 fix(utils.py): add error handling when checking schema health in initialize_database method
✨ feat(adds_tables.py): add unique index on "username" column in "user" table for faster username lookups
✨ feat(adds_tables.py): add unique index on "api_key" column in "apikey" table for faster API key lookups
✨ feat(adds_tables.py): add index on "name" column in "apikey" table for faster name lookups
✨ feat(adds_tables.py): add index on "user_id" column in "apikey" table for faster user ID lookups
🔧 chore(crud.py): rename api_key variable to api_key_object in check_key function for better clarity
🔧 chore(crud.py): change return value of check_key function from True to api_key_object.user to provide the associated user with the API key
🐛 fix(endpoints.py): add 'api_key' parameter to 'process_flow' function to fix missing dependency error
🐛 fix(endpoints.py): add exception chaining to HTTPException in 'process_flow' function for better error handling
🐛 fix(utils.py): change return type of 'api_key_security' function to Optional[ApiKey] for better type hinting
🐛 fix(utils.py): change variable name from 'e' to 'exc' for better readability and semantics
🔥 refactor(alembic): remove add_flow_table migration
✨ feat(alembic): add adds_tables migration to create user and apikey tables
🔥 chore(alembic): remove unnecessary alembic migration files
The following alembic migration files were removed:
- `5512e39b4012_add_apikey_table.py`
- `6384181fb7e8_update_api_key.py`
- `d3749cf7ac7e_update_all_tables.py`
These files are no longer needed as they are no longer relevant to the current state of the database schema. Removing them helps to keep the project's codebase clean and organized.
🔒 fix(utils.py): use the provided username and password parameters if available when creating the super user, instead of relying solely on the settings manager
✨ feat(ApiKeysPage): add conditional rendering for keysList.current to display appropriate messages when there are no keys assigned or when loading keys
✨ feat(test_endpoints.py): add test case for handling invalid API key in 'test_process_flow_invalid_api_key' function
✨ feat(test_endpoints.py): add test case for handling invalid flow ID in 'test_process_flow_invalid_id' function
✨ feat(test_endpoints.py): add test case for handling flow not found in 'test_process_flow_invalid_id' function
✨ feat(test_endpoints.py): add test case for testing process flow without autologin in 'test_process_flow_without_autologin' function
✨ feat(api_key/crud.py): prepend 'lf-' to generated API key for better identification and readability
✨ feat(api_key/crud.py): add check_key function to validate API key and update total uses and last used at timestamp
🔧 fix(endpoints.py): update import statement for api_key_security function to match the new location
🔧 fix(endpoints.py): update dependencies argument in router.post calls to use a list instead of multiple lines for better readability
🔧 fix(endpoints.py): remove valid argument from process_flow function as it is no longer needed
🔧 fix(api_key.py): remove hashed_api_key field as it is no longer used
🔧 fix(api_key.py): add total_uses field to track the number of times the API key has been used
🔧 fix(api_key.py): add is_active field to track the status of the API key
🔒 chore(utils.py): refactor auth_scheme_dependency to use OAuth2PasswordBearer for better security
🔒 chore(utils.py): refactor validate_api_key to use check_key function from crud module for better code reuse
🔒 chore(utils.py): add api_key_security function to handle API key authentication logic
🔒 chore(utils.py): refactor get_current_user to use oauth2_login dependency for better security
🔒 chore(utils.py): remove unused validate_api_key function
🔒 chore(auth.py): remove unused oauth2_scheme variable for better code organization
✨ feat(conftest.py): add fixture 'flow' to create a test flow in tests/conftest.py
🐛 fix(test_endpoints.py): import missing get_settings_manager function in tests/test_endpoints.py to fix NameError
✨ feat(test_endpoints.py): add test case 'test_process_flow_without_autologin' to test flow processing without auto login
🐛 fix(test_endpoints.py): fix incorrect endpoint URL in test case 'test_process_flow_without_autologin' in tests/test_endpoints.py
✨ feat(test_endpoints.py): add test case 'test_process_flow_fails_autologin_off' to test flow processing failure when auto login is off
✨ feat(endpoints.py): add validation of API key in process_flow endpoint to ensure only valid requests are processed
🔧 chore(utils.py): add validate_api_key function to validate API key against database
🔧 chore(test_endpoints.py): add test case for process_flow endpoint to test API key validation and processing
✨ feat(ApiKeysPage): add Header component to the page layout for better organization and structure
🐛 fix(ApiKeysPage): fix import order to follow convention and improve readability
🐛 fix(ApiKeysPage): fix indentation and formatting issues for better code readability
✨ feat(ApiKeysPage): add conditional rendering for displaying a message when user has no assigned keys
🐛 fix(ApiKeysPage): fix indentation and formatting issues for better code readability
✨ feat(ApiKeysPage): add table component to display the list of keys with their details
🐛 fix(ApiKeysPage): fix indentation and formatting issues for better code readability
✨ feat(ApiKeysPage): add ConfirmationModal component for deleting keys with appropriate title and content
🐛 fix(ApiKeysPage): fix indentation and formatting issues for better code readability
✨ feat(authContext.tsx): move autoLogin logic from App component to AuthProvider to improve separation of concerns
🔧 fix(index.tsx): reorder context providers to ensure correct execution order
🔧 fix(tabsContext.tsx): add comment to clarify the purpose of the useEffect hook
🔧 fix(typesContext.tsx): add comment to clarify the purpose of the useEffect hook
🔧 fix(routes.tsx): rename ProtectedAdminRoute to ProtectedRoute for consistency
✨ feat(authContext.tsx): add support for process.env.PORT environment variable to be able to run app on a configurable port
🐛 fix(tabsContext.tsx): import missing AuthContext and use getAuthentication function to conditionally fetch data
🐛 fix(typesContext.tsx): import missing AuthContext and use getAuthentication function to conditionally fetch data
🐛 fix(api.tsx): add check to not refresh token if refreshToken is "auto"
fix(API): remove unused user_id parameter in createApiKey function and add name parameter
fix(API): change deleteApiKey parameter from user_id to api_key
fix(SecretKeyModal): change createApiKey parameter from data to apiKeyName
fix(ApiKeysPage): remove unused user_id parameter in getApiKey function and add console.log for debugging