Commit graph

5,858 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
09d4ee43cf 🔧 fix(store.py): remove duplicate list_components endpoint to avoid conflicts and improve code organization
 feat(store.py): add new list_components endpoint to retrieve a paginated list of components from the store
2023-10-20 11:26:08 -03:00
Gabriel Luiz Freitas Almeida
4c8550579d 🐛 fix(service.py): remove unnecessary try-except block and improve error handling in GET request 2023-10-20 11:08:38 -03:00
Gabriel Luiz Freitas Almeida
3b14cdbe9f 🐛 fix(service.py): catch all exceptions when raising ValueError in the search method to provide more informative error message 2023-10-20 11:06:16 -03:00
Gabriel Luiz Freitas Almeida
b7aa3274f8 🐛 fix(service.py): improve error handling in StoreService search method
 feat(service.py): change default sort parameter in StoreService search method to sort by likes in descending order
2023-10-20 11:02:38 -03:00
Gabriel Luiz Freitas Almeida
5667dd4540 🐛 fix(service.py): remove redundant assignment to params variable to fix incorrect behavior 2023-10-20 07:54:19 -03:00
Gabriel Luiz Freitas Almeida
51929df2b0 🐛 fix(service.py): remove redundant assignment to params variable
The redundant assignment to the params variable was removed to prevent overwriting the initial assignment.
2023-10-20 07:53:11 -03:00
Gabriel Luiz Freitas Almeida
4c6dc748a0 updates to colliding endpoints and search 2023-10-19 22:52:38 -03:00
Gabriel Luiz Freitas Almeida
09a1e332a5 update download method 2023-10-19 22:15:44 -03:00
Gabriel Luiz Freitas Almeida
54c2535b95 update schema for store endpoints 2023-10-19 22:14:45 -03:00
Gabriel Luiz Freitas Almeida
717334841f add guard in case api key is a str 2023-10-19 22:14:11 -03:00
Gabriel Luiz Freitas Almeida
062a709151 fix fields and likes count 2023-10-19 22:13:39 -03:00
Gabriel Luiz Freitas Almeida
a3bede0187 Add store schema 2023-10-19 22:12:49 -03:00
cristhianzl
405f74bef9 adding confirmation modal and save flow integratio 2023-10-19 21:27:29 -03:00
anovazzi1
79cdcaf19a fix(typesContext.tsx): update component type key to match newKey value for consistency and clarity 2023-10-19 20:09:14 -03:00
Gabriel Luiz Freitas Almeida
5aed852bb0 🔧 chore(service.py): add aggregation parameter to store service API call to retrieve count of likes for each component 2023-10-19 18:14:56 -03:00
Gabriel Luiz Freitas Almeida
242f741567 🔧 refactor(store.py): remove unused imports and variables to improve code readability and maintainability
🔒 chore(store.py): add dependency injection for store API key retrieval to improve code modularity and testability
🔒 chore(store.py): add error handling for missing store API key to provide better user feedback
🔒 chore(store.py): refactor create_component, read_component, and list_components to use store API key from dependency injection instead of user object
2023-10-19 18:14:56 -03:00
cristhianzl
91d0da573d Merge branch 'saveComponent' into feature/store 2023-10-19 18:08:52 -03:00
anovazzi1
38d668e5f3 fix(App.tsx): remove unused setErrorData and setLoading variables to improve code readability
feat(App.tsx): add support for successData, successOpen, and setSuccessOpen variables from alertContext to handle success alerts
feat(App.tsx): add support for fetchError variable from typesContext to handle fetch errors
fix(tabsContext.tsx): add setData variable to useContext to update data state
feat(tabsContext.tsx): add support for saving custom components to data state in typesContext
fix(typesContext.tsx): remove unused imports and commented code
feat(typesContext.tsx): add support for saveFlowToDatabase function to save flow to the database
fix(index.ts): add missing newline at the end of the file
2023-10-19 17:36:25 -03:00
Gabriel Luiz Freitas Almeida
cc6da7626e 🐛 fix(store.py): add validation to check if user has a store API key set before creating a component 2023-10-19 16:40:15 -03:00
Gabriel Luiz Freitas Almeida
ce955a82fe 🔨 refactor(store.py): change parameter name from 'component' to 'component_create' for clarity and consistency
🔨 refactor(store.py): change type annotation of 'component' parameter from 'Flow' to 'FlowCreate' to match the expected type
2023-10-19 16:34:19 -03:00
anovazzi1
609016139e feat(typesContext.tsx): add saveFlowStore function to API controller to save a new flow to the database
fix(typesContext.tsx): call saveFlowStore function to save the newly created flow component to the database
2023-10-19 16:31:52 -03:00
anovazzi1
2d3490c047 refactor(types): change isComponent property to is_component in FlowType and NodeType to follow naming convention
refactor(utils): change isComponent property to is_component in createFlowComponent function to match updated naming convention
2023-10-19 16:16:43 -03:00
anovazzi1
2963bbdf53 fix(typesContext.tsx): import createFlowComponent function from reactflowUtils to fix compilation error
fix(typesContext.tsx): update assignment of custom_components in data object to use correct property name
fix(typesContext.tsx): update assignment of custom_components in data object to use correct property value
fix(typesContext.tsx): update assignment of components in savedComponentsJSON to use createFlowComponent function
fix(typesContext.tsx): update setData function to use functional update to avoid stale state
fix(entities/index.ts): update type of components property in localStorageUserType to use FlowType
fix(flow/index.ts): update property name isNode to isComponent in FlowType
fix(reactflowUtils.ts): update property name isNode to isComponent in createFlowComponent function
2023-10-19 16:08:29 -03:00
Gabriel Luiz Freitas Almeida
2a25865340 🐛 fix(flow.py): make 'is_component' field nullable to allow for optional values 2023-10-19 16:05:54 -03:00
anovazzi1
b78f17f9b0 update package lock 2023-10-19 15:22:34 -03:00
anovazzi1
9c6930bd0f Merge remote-tracking branch 'origin/dev' into saveComponent 2023-10-19 15:17:12 -03:00
anovazzi1
3e8384eff9 update package json 2023-10-19 15:16:13 -03:00
anovazzi1
337f0f8794 fix(parameterComponent): update readonly condition to only check for data.node?.flow
fix(promptComponent): prevent update from prompt template after group node if prompt is wrongly marked as not dynamic
fix(EditNodeModal): update readonly condition to only check for myData.current.node?.flow
2023-10-19 15:02:32 -03:00
cristhianzl
7a96951fd1 fix(StoreApiKeyModal): close modal after successfully saving API Key to improve user experience 2023-10-19 14:43:40 -03:00
anovazzi1
5a5ed630ed
update har file getAll content (#1075) 2023-10-19 14:42:22 -03:00
anovazzi1
b0bbe39c89 update har file getAll content 2023-10-19 14:40:27 -03:00
cristhianzl
b9eefade27 Merge branch 'saveComponent' into feature/store 2023-10-19 14:29:49 -03:00
Gabriel Luiz Freitas Almeida
b19c75dc3c 🐛 fix(api_key.py): rename api_key parameter to api_key_request in save_store_api_key function for clarity and consistency 2023-10-19 14:28:48 -03:00
cristhianzl
4b09ced2ec Merge branch 'saveComponent' into feature/store 2023-10-19 14:15:46 -03:00
Gabriel Luiz Freitas Almeida
c5262f39f2 🔒 refactor(api_key.py): update encrypt_api_key function call to pass settings_service as a keyword argument for clarity and maintainability 2023-10-19 14:08:51 -03:00
cristhianzl
e7f6f63864 Merge branch 'saveComponent' into feature/store 2023-10-19 13:49:28 -03:00
Gabriel Luiz Freitas Almeida
68e5cb4cce Merge remote-tracking branch 'origin/main' into dev 2023-10-19 11:04:09 -03:00
Gabriel Luiz Freitas Almeida
218788d5df 🔧 chore(Makefile): exclude alembic directory from ruff linting to avoid unnecessary errors
🔧 chore(Makefile): add exclusion of alembic directory from ruff linting to improve linting process
2023-10-19 10:59:44 -03:00
Gabriel Luiz Freitas Almeida
f080c75d6a 🐛 fix(utils.py): add padding to SECRET_KEY before initializing Fernet to ensure it has the correct length 2023-10-19 10:57:52 -03:00
Gabriel Luiz Freitas Almeida
0286353695 🐛 fix(base.py): include vertex ID in error message to provide more context when building a node fails 2023-10-19 09:25:53 -03:00
cristhianzl
4397f88890 fix(StoreApiKeyModal/index.tsx): add error handling when saving API key and display success/error messages
feat(StoreApiKeyModal/index.tsx): add functionality to save API key using addApiKeyStore function
2023-10-19 00:24:06 -03:00
cristhianzl
e473570c5d Merge branch 'saveComponent' into feature/store 2023-10-19 00:02:21 -03:00
cristhianzl
2fbb68d6a6 fix(keyPairListComponent.spec.ts): fix typo in test case description
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): add assertion to check if input field value with spaces is correctly filled
fix(keyPairListComponent.spec.ts): update test case to fill input field with a value containing spaces for better coverage
fix(keyPairListComponent.spec.ts): update assertion to check if input field value with spaces is correctly filled
2023-10-18 23:58:09 -03:00
cristhianzl
64aea7f589 feat(API): add function to add an API key to the API key store
This commit adds a new function `addApiKeyStore` to the API controller. This function is used to add an API key to the API key store by making a POST request to the `/api_key/store` endpoint with the provided key. If the request is successful (status code 200), the function returns the response data. If there is an error, it is logged to the console and re-thrown.
2023-10-18 23:33:22 -03:00
Cristhian Zanforlin Lousa
c939edbb2b
Fix no space no keyPairList (#1072)
fix(reactflowUtils.t): modify convertValuesToNumbers function to
correctly handle values that are numbers represented as strings
feat(reactflowUtils.ts): add check to convertValuesToNumbers function to
only convert values that are valid numbers represented as strings
2023-10-18 23:31:53 -03:00
Gabriel Luiz Freitas Almeida
d66944ae7e 🔧 chore(alembic): add store updates migration script
🔧 chore(alembic): add user id can be null in flow migration script
🔧 chore(flow.py): make is_component field nullable in Flow model
🔧 chore(flow.py): make user_id field nullable in Flow model
🔧 chore(service.py): add schema health check after running migrations and handle autogenerate diffs detected case
2023-10-18 23:23:10 -03:00
Gabriel Luiz Freitas Almeida
08bd16b8f2 🔧 chore(OpenAIConversationalAgent.py): enable handling of parsing errors in ConversationalAgent class 2023-10-18 22:14:14 -03:00
anovazzi1
6c6127203f test(saveComponents.spec.ts): add test case to make front work without backend
test(saveComponents.spec.ts): add test case to save default component and delete it
2023-10-18 21:56:53 -03:00
anovazzi1
0f92dacb65 test(saveComponents.spec.ts): refactor saveComponent function to improve code readability and reusability
test(saveComponents.spec.ts): add test case to save the same component multiple times and verify the count of saved components
2023-10-18 21:38:57 -03:00
anovazzi1
cd5204b566 fix(extraSidebarComponent): remove unnecessary empty line
fix(extraSidebarComponent): remove unused variable
feat(extraSidebarComponent): add sectionName prop to SidebarDraggableComponent for better component identification
fix(sideBarDraggableComponent): add sectionName prop to SidebarDraggableComponent for better component identification
test(saveComponents.spec): rename test case to "save group component tests"
test(saveComponents.spec): add test case for saving default component with custom values
2023-10-18 21:15:51 -03:00