Commit graph

6,354 commits

Author SHA1 Message Date
Lucas Oliveira
8c8d46b570 fixed card numbers 2023-11-16 22:55:01 -03:00
Lucas Oliveira
844e7127af Added api key as dependency 2023-11-16 22:32:02 -03:00
Lucas Oliveira
598cd04b31 Added error handling 2023-11-16 22:29:56 -03:00
Lucas Oliveira
4e7a0fcc32 Fixed adding 2023-11-16 22:25:48 -03:00
Gabriel Luiz Freitas Almeida
34fe9a7bbb Fix unauthorized exception handling 2023-11-16 22:16:42 -03:00
Lucas Oliveira
6531d36fd5 fix card component braking 2023-11-16 19:23:28 -03:00
Lucas Oliveira
60fb76f1c4 Deleted Community Page 2023-11-16 19:23:28 -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
ebb6e5ffec Update CommunityPage with CollectionCardComponent 2023-11-16 19:14:41 -03:00
Lucas Oliveira
f7903043fe Fixed errors on code and made MarketCard default 2023-11-16 18:49:08 -03:00
Lucas Oliveira
dff58ee29e Fixed naming 2023-11-16 18:22:07 -03:00
Lucas Oliveira
4babb19614 Added checking on Like Component if the request is valid 2023-11-16 18:02:29 -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
anovazzi1
7bd79d8302 feat(API): add support for saving last tested version of a flow in the flow store
The `saveFlowStore` function in the API controller now accepts an optional `last_tested_version` parameter. This parameter allows the user to specify the last tested version of a flow when saving it to the flow store. The value of `last_tested_version` is now included in the request payload when creating a new flow in the flow store.
2023-11-16 17:57:14 -03:00
Lucas Oliveira
ebae35bf66 Refactored API Key state to update components when updating API key 2023-11-16 17:54:38 -03:00
anovazzi1
7f55da1df9 fix(flowsContext.tsx): add version property to FlowsContextInitialValue to prevent undefined errors
feat(flowsContext.tsx): add support for version property in FlowsProvider to store and retrieve the version of the app
fix(exportModal/index.tsx): change version property to last_tested_version to match FlowType definition
fix(extraSidebarComponent/index.tsx): add version property to saveFlowStore function call to match FlowType definition
fix(extraSidebarComponent/sideBarDraggableComponent/index.tsx): add version property to downloadNode function call to match FlowType definition
fix(nodeToolbarComponent/index.tsx): add version property to saveFlowStore function call to match FlowType definition
fix(FlowPage/index.tsx): add version property to useContext to prevent undefined errors
fix(ViewPage/index.tsx): add version property to useContext to prevent undefined errors
fix(flow/index.ts): change version property to last_tested_version to match FlowType definition
fix(tabs/index.ts): add version property to FlowsContextType to prevent undefined errors
fix(reactflowUtils.ts): change createFlowComponent function signature to include version parameter
2023-11-16 17:47:34 -03:00
Lucas Oliveira
0f034b9a2e Added message when API key is not valid or is not existent 2023-11-16 17:45:09 -03:00
Lucas Oliveira
ffadcf5cf0 added validation on fetch store data 2023-11-16 17:22:27 -03:00
anovazzi1
15c4532e5b feat(exportModal): add version field to exported flow data
The version field is added to the exported flow data in order to keep track of the version of the flow. This allows for better management and identification of different versions of the flow.

fix(exportModal): fetch and set version from API

The version is fetched from the API using the `getVersion` function and then set in the state variable `version` using the `setVersion` function. This ensures that the correct version is used when exporting the flow.

feat(flow): add version field to FlowType

The `FlowType` interface is updated to include a `version` field. This allows for storing and retrieving the version of the flow when needed.
2023-11-16 17:19:44 -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
Lucas Oliveira
68dc2fa53d removed from-store 2023-11-16 17:18:01 -03:00
Lucas Oliveira
dcde9b7ae3 Refactored API Key handling 2023-11-16 17:17:04 -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
fa68c4e678 Refactor store component filters 2023-11-16 16:27:41 -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
cristhianzl
111ddb1d8c feat(API): add postStoreComponents function to handle POST request for storing components in the API 2023-11-16 15:33:51 -03:00
cristhianzl
9c10f11fa1 Merge branch 'feature/store' of github.com:logspace-ai/langflow into feature/store 2023-11-16 15:33:32 -03:00
cristhianzl
7673402a0c feat(storeContext.tsx): modify getStoreComponents function to accept an object with optional parameters for better readability and maintainability
fix(API/index.ts): remove unused import and modify getStoreComponents function to accept an object with optional parameters for better readability and maintainability

fix(from-store/index.tsx): modify handleGetComponents function to pass an object with optional parameters to getStoreComponents for better readability and maintainability

fix(StorePage/index.tsx): modify handleGetComponents function to pass an object with optional parameters to getStoreComponents for better readability and maintainability
2023-11-16 15:33:24 -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
Lucas Oliveira
72f8d1987f Fixed total rows count when error 2023-11-16 12:16:16 -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
Lucas Oliveira
219d8803b8 Added condition to filter by user and likes when unauthorized 2023-11-16 12:10:09 -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
Lucas Oliveira
9c78d0afd9 Fixed filterByUser 2023-11-16 12:03:15 -03:00
Lucas Oliveira
5bf969f8b4 Added distinction between components and flows 2023-11-16 11:51:34 -03:00
cristhianzl
8803e944ee fix(market-card.tsx): add conditional rendering for username to prevent error when data.user_created.username is undefined 2023-11-16 11:47:39 -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
Lucas Oliveira
d1f0076988 Added author 2023-11-16 11:14:51 -03:00
Lucas Oliveira
5d145bd15a Fixed search width 2023-11-16 11:09:11 -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
Lucas Oliveira
36cb4c31a0 Added liked and created by me filter, liked not working and created not implemented at backend 2023-11-16 11:02:14 -03:00