Commit graph

5,850 commits

Author SHA1 Message Date
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
anovazzi1
8cc955c147 code format 2023-10-18 20:10:51 -03:00
anovazzi1
dae7ee9b70 fix(extraSidebarComponent): import 'set' function from lodash to fix compilation error
fix(extraSidebarComponent): include display_name property in search filter condition to improve search functionality
fix(extraSidebarComponent): add 'data' dependency to useEffect to ensure proper re-rendering
feat(extraSidebarComponent): add support for process.env.PORT environment variable to be able to run app on a configurable port
test(onlyFront/saveComponents.spec): add test for saving a component in the frontend
test(onlyFront/saveComponents.spec): simulate dropping a file and assert that the flow is displayed
test(onlyFront/saveComponents.spec): simulate grouping elements and assert that the group is created
test(onlyFront/saveComponents.spec): simulate typing and saving a flow component
2023-10-18 20:08:51 -03:00
Gabriel Luiz Freitas Almeida
a497eebab1 🔧 fix(__main__.py): set "no_proxy" environment variable to "*" to avoid error with gunicorn in macos 2023-10-18 19:57:28 -03:00
Gabriel Luiz Freitas Almeida
d41798f192 feat(test_store.py): add test for search_components function in StoreService class
The test covers the search_components function in the StoreService class. It mocks the response from the HTTP GET request and asserts that the request was made with the correct parameters. It also asserts that the search method returns a list of ComponentResponse objects.
2023-10-18 19:56:49 -03:00
Gabriel Luiz Freitas Almeida
a65086c8e4 🐛 fix(alembic): add exception handling to prevent migration failure if columns already exist 2023-10-18 18:30:10 -03:00
anovazzi1
92a109b65c Merge remote-tracking branch 'origin/dev' into saveComponent 2023-10-18 18:23:34 -03:00
Gabriel Luiz Freitas Almeida
52900503de 🔧 chore(alembic): make changes for the store
🔧 chore(api_key.py): remove unused imports and update save_store_api_key endpoint to use ApiKeyCreateRequest model

🔧 chore(schemas.py): add ApiKeyCreateRequest model

🔧 chore(store.py): remove unused imports and update imports in store.py
2023-10-18 18:09:24 -03:00
anovazzi1
3cf800d12f
Create test ToogleComponent, IntComponent, FloatComponent, InputComponent (#1031)
This pull request introduces unit tests for four different components:
ToggleComponent, IntComponent, FloatComponent, and InputComponent. The
tests ensure that these components function as expected and help
maintain code quality.

Changes Made:
  Added a test suite for ToggleComponent to verify its functionality.
  Added a test suite for IntComponent to verify its functionality.
  Added a test suite for FloatComponent to verify its functionality.
  Added a test suite for InputComponent to verify its functionality.
2023-10-18 18:03:32 -03:00