Commit graph

2,109 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
bf11ee9a10 🔧 fix(login.py): remove unnecessary dependency on get_current_active_user in refresh_token endpoint 2023-11-21 20:09:27 -03:00
Gabriel Luiz Freitas Almeida
1656896b1c Add fields parameter to get_components API 2023-11-21 20:07:31 -03:00
Gabriel Luiz Freitas Almeida
5af8a82a13 Refactor StoreService class to include fields
parameter in search method
2023-11-21 20:07:25 -03:00
Gabriel Luiz Freitas Almeida
754e6e845a 🔧 fix(utils.py): update error message in get_current_user function to include JWT token as a valid authentication method 2023-11-21 20:07:04 -03:00
Gabriel Luiz Freitas Almeida
0f21f1c800 🔧 chore(schema.py): add 'private' field to the ListComponentResponse schema to support private components 2023-11-21 17:20:59 -03:00
Gabriel Luiz Freitas Almeida
586f1d5f8f 🔧 chore(service.py): reorder imports to follow PEP8 guidelines
🔧 chore(service.py): remove duplicate import of logger from loguru module
🔧 chore(service.py): add "private" field to the list of fields to retrieve from the store API
2023-11-21 17:15:34 -03:00
Gabriel Luiz Freitas Almeida
020488e97b Fix typos and update method names 2023-11-21 14:49:47 -03:00
Gabriel Luiz Freitas Almeida
f956c2a77e Fix store_api_Key typo in get_components function 2023-11-21 14:45:23 -03:00
Gabriel Luiz Freitas Almeida
c6dfb90bcf 🐛 fix(flows.py): remove unused imports and fix function call to read_flows
🐛 fix(test_database.py): fix function call to Flow.model_validate
🐛 fix(test_llms_template.py): fix values in test cases
🔥 chore(test_store.py): remove unused test file and test case
2023-11-21 14:45:02 -03:00
Gabriel Luiz Freitas Almeida
62e470b03b Add store parameter to run function 2023-11-21 11:29:08 -03:00
Gabriel Luiz Freitas Almeida
9dbb8d3578 🔧 fix(store.py): remove unnecessary comment in download_component function
🔧 fix(utils.py): replace requests library with httpx library for getting latest released version of langflow from PyPI to improve performance and reliability
2023-11-20 21:35:12 -03:00
Gabriel Luiz Freitas Almeida
5c65e18289 Fix exception handling in API endpoints 2023-11-20 21:13:41 -03:00
Gabriel Luiz Freitas Almeida
3753c2884c Update base.py with new store URLs 2023-11-20 21:04:39 -03:00
Gabriel Luiz Freitas Almeida
437aec4e44 Refactor import statements in auth.py and
service.py
2023-11-20 21:04:39 -03:00
Gabriel Luiz Freitas Almeida
339073a514 Update token expiration time 2023-11-20 21:04:38 -03:00
Gabriel Luiz Freitas Almeida
3432a07285 🐛 fix(store.py): rename create_component function to share_component for better semantics
 feat(store.py): add support for private query parameter in get_components function to filter components by privacy
🐛 fix(schema.py): set default value of private field in StoreComponentCreate schema to True
🐛 fix(service.py): change status field to private field in build_filter_conditions and get_list_component_response_model functions to filter components by privacy
2023-11-20 19:49:11 -03:00
Gabriel Luiz Freitas Almeida
bbba05b49b 🐛 fix(store.py): replace generic exception handling with custom exceptions to provide more specific error messages and status codes
🔀 merge(exceptions.py): add custom exceptions with status codes to handle specific errors in the store service
🔀 merge(service.py): replace ValueError with custom exceptions in the store service to provide more specific error messages and status codes
2023-11-19 19:35:23 -03:00
Gabriel Luiz Freitas Almeida
4fd5fbaf70 Refactor service.py and utils.py 2023-11-17 16:16:16 -03:00
Gabriel Luiz Freitas Almeida
b3e4d42817 🐛 fix(store.py): remove unnecessary raise statement to prevent raising a 403 status code unnecessarily 2023-11-17 16:15:59 -03:00
Gabriel Luiz Freitas Almeida
340a0b4431 Refactor store service to update components with
user data
2023-11-17 09:22:50 -03:00
Gabriel Luiz Freitas Almeida
e3b0941df9 Add authorization check for store_api_Key 2023-11-17 09:20:37 -03:00
Gabriel Luiz Freitas Almeida
d9ecbcac5d Refactor field_typing module imports 2023-11-17 08:43:34 -03:00
Gabriel Luiz Freitas Almeida
34fe9a7bbb Fix unauthorized exception handling 2023-11-16 22:16:42 -03:00
Gabriel Luiz Freitas Almeida
4a214661be 🔧 fix(schema.py): remove unused downloads_count field from DownloadComponentResponse class
🔧 fix(service.py): handle case when component is returned as a list instead of a dictionary in download method
2023-11-16 19:21:19 -03:00
Gabriel Luiz Freitas Almeida
cc557f7898 🐛 fix(store.py): handle HTTPStatusError exceptions and raise appropriate HTTPExceptions with corresponding status codes and details 2023-11-16 18:01:57 -03:00
Gabriel Luiz Freitas Almeida
7c27cceb98 Refactor store.py to check if api_key is valid 2023-11-16 17:19:20 -03:00
Gabriel Luiz Freitas Almeida
42b0f70f81 Add trailing slash to /check endpoint in store.py 2023-11-16 17:09:23 -03:00
Gabriel Luiz Freitas Almeida
159f825a2b 🐛 fix(store.py): change check_if_store_has_api_key function to be async and handle exceptions properly
 feat(store.py): add support for checking if store has a valid API key using the StoreService
🐛 fix(service.py): remove unused import and fix formatting
 feat(service.py): add check_api_key method to StoreService to check if an API key is valid
2023-11-16 17:05:22 -03:00
Gabriel Luiz Freitas Almeida
d460b05a6c 🐛 fix(schema.py): set count field in ListComponentResponseModel as Optional with default value of 0 to handle cases where count is not provided
🐛 fix(service.py): import logger from loguru module to fix logger import error
 feat(service.py): add support for metadata in _get method to handle additional metadata returned in API response
 feat(service.py): add support for metadata in query_components method to handle additional metadata returned in API response
2023-11-16 16:27:27 -03:00
Gabriel Luiz Freitas Almeida
bd33ae961a Refactor build_liked_filter method and add webhook
URL checks
2023-11-16 15:31:34 -03:00
Gabriel Luiz Freitas Almeida
50ededfd3e Refactor store service and list components
endpoint
2023-11-16 15:14:53 -03:00
Gabriel Luiz Freitas Almeida
33cac23446 Add new parameters to get_components function 2023-11-16 14:01:32 -03:00
Gabriel Luiz Freitas Almeida
966c4dad0b Fix error handling in get_components and add
missing condition in StoreService
2023-11-16 13:01:35 -03:00
Gabriel Luiz Freitas Almeida
581c9a8853 Fix API Key parameter in get_component_likes_count
method.
2023-11-16 12:32:35 -03:00
Gabriel Luiz Freitas Almeida
966451f6a8 🐛 fix(store.py): remove unnecessary import statement to improve code readability
🐛 fix(store.py): fix the call to get_component_likes_count method by removing api_key parameter since it's not needed
🐛 fix(service.py): fix the return type of _get method to always return a list of dictionaries
🐛 fix(service.py): fix the call to get_component_likes_count method by removing api_key parameter since it's not needed
2023-11-16 12:28:48 -03:00
Gabriel Luiz Freitas Almeida
0d8ad42ea0 🐛 fix(store.py): add use_api_key parameter to count_components method to correctly handle API key usage
🐛 fix(store.py): fix incorrect type hint for get_liked_by_user_components method
🐛 fix(service.py): fix incorrect method name in upload method
2023-11-16 12:13:14 -03:00
Gabriel Luiz Freitas Almeida
750a24521a 🐛 fix(store.py): change variable name 'liked' to 'use_api_key' for better clarity and semantics
🔧 refactor(store.py): remove unnecessary condition for 'status' variable in build_search_filter_conditions method
🔧 refactor(store.py): remove unnecessary condition for 'liked' variable in build_liked_filter method
🔧 refactor(store.py): remove unnecessary condition for 'liked' variable in query_components method
🔧 refactor(store.py): remove unnecessary condition for 'use_api_key' variable in query_components method
🔧 refactor(store.py): remove unnecessary condition for 'store_api_Key' variable in query_components method
🔧 refactor(store.py): add default value for 'use_api_key' parameter in query_components method
🔧 refactor(store.py): remove unnecessary condition for 'liked' variable in query_components method
🔧
🔧 refactor(store
2023-11-16 12:04:26 -03:00
Gabriel Luiz Freitas Almeida
c7ceb43979 Update user_created field to use username instead
of first_name
2023-11-16 11:33:25 -03:00
Gabriel Luiz Freitas Almeida
c91d89380a 🐛 fix(store.py): remove unnecessary code that checks for liked and store_api_Key variables
🐛 fix(service.py): remove unnecessary import statement for logger
 feat(store.py): add support for filtering components by liked status and store API key
 feat(service.py): add build_liked_filter method to build filter conditions based on liked status and store API key
2023-11-16 11:26:59 -03:00
Gabriel Luiz Freitas Almeida
99460fd181 🔧 chore(service.py): remove unused imports to improve code readability and maintainability
🔧 chore(service.py): change user_data_context from contextmanager to asynccontextmanager to support asynchronous operations
🔧 chore(service.py): handle case when user_data is a list and take the first element
🔧 chore(service.py): remove liked and api_key parameters from get_components method and handle public components separately
🔧 chore(service.py): handle case when results is a dictionary and convert it to a list of results_objects
2023-11-16 11:21:59 -03:00
Gabriel Luiz Freitas Almeida
23f6e5941a 🐛 fix(store.py): add validation for filtering by likes and raise an error if API key is missing
 feat(store.py): add support for filtering components by likes using the provided API key
2023-11-16 11:21:49 -03:00
Gabriel Luiz Freitas Almeida
ccd851cad0 🐛 fix(store.py): add filter_by_user parameter to get_components function to enable filtering components by user
🐛 fix(service.py): add filter_by_user parameter to StoreService's get_components method to enable filtering components by user
🐛 fix(index.ts): add filterByUser parameter to getStoreComponents function to enable filtering components by user
2023-11-16 11:03:45 -03:00
Gabriel Luiz Freitas Almeida
0547dd5d76 Handle 401 Unauthorized error in get_components
function
2023-11-16 10:57:02 -03:00
Gabriel Luiz Freitas Almeida
ce1a8d6835 Refactor store service and API router
Add error handling for unauthorized access to resources
2023-11-16 10:55:40 -03:00
Lucas Oliveira
4d0baef491 fixed combobox and formatting 2023-11-16 10:47:58 -03:00
Gabriel Luiz Freitas Almeida
8f23c29818 Refactor StoreService upload method to return
CreateComponentResponse
2023-11-16 09:44:17 -03:00
Gabriel Luiz Freitas Almeida
e925da5671 Add last tested version to component creation and
handle outdated versions
2023-11-16 09:44:07 -03:00
Gabriel Luiz Freitas Almeida
978757c757 Add default values for parent and liked_by_user
fields in schema.py
2023-11-16 09:18:16 -03:00
Gabriel Luiz Freitas Almeida
79acc81c76 Refactor read_component to download_component 2023-11-16 09:09:28 -03:00
Gabriel Luiz Freitas Almeida
33e0c4b645 Add Langflow version check and update components
with user data function
2023-11-15 22:22:22 -03:00