-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add webhook endpoint, and other fixes #1766
Conversation
… edge/base.py and graph/base.py
…tly assigned based on the api_key_user or flow object
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…int to provide clearer information on its purpose, arguments, and return value. Remove outdated request JSON structure and example request sections. Add information on the arguments and exceptions raised for better clarity.
I thought the webhook component would be processed later, but you seem like a genius. The code looks very Pythonic and well-written. Additionally, it would be great to add an unmodifiable "Copy" attribute with drag capabilities to the field_type in the frontend code, so users can easily copy the URL directly from the component. Of course, I think this type would be useful not only in this component but in all components where it can be applied. |
hey @yamonkjd How are you? You are too kind. hahah
I understand now and this is something I've been thinking about a lot lately. I'll think of a way to add that. |
…unction name to createTabsArray for clarity feat(constants.ts): add support for including webhook code in tabs array based on flow webhook property feat(index.tsx): update function calls to use new createTabsArray function and include webhook code in tabs array based on flow webhook property refactor(utils.ts): remove trailing commas in function parameters to improve code consistency and readability feat(utils.ts): add support for including webhook cURL code and tweaks code in tabs array creation for better code organization and presentation
The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data. The commit also includes a message that describes the invalid JSON payload for better error tracking. Note: This commit message follows the convention used in the recent user commits.
The Alembic revision IDs for adding webhook columns have been updated to reflect the latest changes. This ensures consistency and proper tracking of the database schema modifications. Note: The commit message has been generated based on the provided code changes and recent commits.
…ly identify flow ID or endpoint name for running a flow. Improve error handling for invalid UUID strings and flow not found scenarios.
The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data.
…eter The get_flow_by_id function in utils.py has been updated to handle the case where the flow_id parameter is None. Previously, the function would raise an exception if flow_id was not provided. Now, if flow_id is None, the function returns None instead of querying the database. This change improves the robustness of the function and allows for more flexible usage. Note: The commit message has been generated based on the provided code changes and recent commits.
…_name function 📝 (flow.py): Add get_flow_by_id_or_endpoint_name function to retrieve a Flow object by ID or endpoint name
…one flow_id parameter
…atus code when flow identifier is not found
The code changes in `test_endpoints.py` update the error message when a flow identifier is not found. Previously, the error message referenced the flow ID directly, but now it uses the more generic term "Flow identifier" to account for cases where the identifier could be an endpoint name. This change improves the clarity and flexibility of the error message. Note: This commit message has been generated based on the provided code changes and recent commits.
…he simple_run_flow function call to improve code readability and maintainability
First simple implementation of a webhook feature.
#1732