mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-16 02:09:40 +00:00
Clean up alembic migrations: fix HTTP request block columns and add parameters column (#2848)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
d23944bca7
commit
47f9f1dabb
11 changed files with 536 additions and 3 deletions
|
@ -371,6 +371,21 @@ class TaskV2BlockYAML(BlockYAML):
|
|||
max_steps: int = settings.MAX_STEPS_PER_TASK_V2
|
||||
|
||||
|
||||
class HttpRequestBlockYAML(BlockYAML):
|
||||
block_type: Literal[BlockType.HTTP_REQUEST] = BlockType.HTTP_REQUEST # type: ignore
|
||||
|
||||
# Individual HTTP parameters
|
||||
method: str = "GET"
|
||||
url: str | None = None
|
||||
headers: dict[str, str] | None = None
|
||||
body: dict[str, Any] | None = None # Changed to consistently be dict only
|
||||
timeout: int = 30
|
||||
follow_redirects: bool = True
|
||||
|
||||
# Parameter keys for templating
|
||||
parameter_keys: list[str] | None = None
|
||||
|
||||
|
||||
PARAMETER_YAML_SUBCLASSES = (
|
||||
AWSSecretParameterYAML
|
||||
| BitwardenLoginCredentialParameterYAML
|
||||
|
@ -404,6 +419,7 @@ BLOCK_YAML_SUBCLASSES = (
|
|||
| UrlBlockYAML
|
||||
| PDFParserBlockYAML
|
||||
| TaskV2BlockYAML
|
||||
| HttpRequestBlockYAML
|
||||
)
|
||||
BLOCK_YAML_TYPES = Annotated[BLOCK_YAML_SUBCLASSES, Field(discriminator="block_type")]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue