add webhook url, proxy, totp support in run workflow of SkyvernClient (#1947)
This commit is contained in:
@@ -48,10 +48,17 @@ class SkyvernClient:
|
|||||||
workflow_input: dict | None = None,
|
workflow_input: dict | None = None,
|
||||||
webhook_url: str | None = None,
|
webhook_url: str | None = None,
|
||||||
proxy_location: ProxyLocation | None = None,
|
proxy_location: ProxyLocation | None = None,
|
||||||
|
totp_identifier: str | None = None,
|
||||||
|
totp_url: str | None = None,
|
||||||
) -> RunWorkflowResponse:
|
) -> RunWorkflowResponse:
|
||||||
data = None
|
data = {
|
||||||
|
"webhook_callback_url": webhook_url,
|
||||||
|
"proxy_location": proxy_location,
|
||||||
|
"totp_identifier": totp_identifier,
|
||||||
|
"totp_url": totp_url,
|
||||||
|
}
|
||||||
if workflow_input:
|
if workflow_input:
|
||||||
data = {"data": workflow_input}
|
data["data"] = workflow_input
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
response = await client.post(
|
response = await client.post(
|
||||||
f"{self.base_url}/api/v1/workflows/{workflow_id}/run",
|
f"{self.base_url}/api/v1/workflows/{workflow_id}/run",
|
||||||
|
|||||||
Reference in New Issue
Block a user