uipath 2.1.18__tar.gz → 2.1.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uipath-2.1.18 → uipath-2.1.20}/PKG-INFO +1 -1
- {uipath-2.1.18 → uipath-2.1.20}/pyproject.toml +1 -1
- uipath-2.1.20/samples/event-trigger/.python-version +1 -0
- uipath-2.1.20/samples/event-trigger/README.md +128 -0
- uipath-2.1.20/samples/event-trigger/main.py +34 -0
- uipath-2.1.20/samples/event-trigger/pyproject.toml +9 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_runtime/_runtime.py +43 -7
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_input_args.py +28 -1
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_parse_ast.py +12 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_project_files.py +7 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/connections_service.py +82 -2
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_infer_bindings.py +5 -2
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/__init__.py +2 -1
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/connections.py +17 -0
- uipath-2.1.20/src/uipath/utils/_endpoints_manager.py +200 -0
- uipath-2.1.20/tests/cli/test_input_args.py +114 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_pack.py +21 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_run.py +86 -0
- uipath-2.1.20/tests/sdk/services/test_connections_service.py +418 -0
- {uipath-2.1.18 → uipath-2.1.20}/uv.lock +1 -1
- uipath-2.1.18/src/uipath/utils/_endpoints_manager.py +0 -101
- uipath-2.1.18/tests/sdk/services/test_connections_service.py +0 -196
- {uipath-2.1.18 → uipath-2.1.20}/.cursorrules +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.editorconfig +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.gitattributes +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.github/workflows/test.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.gitignore +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.python-version +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.vscode/extensions.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.vscode/launch.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/.vscode/settings.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/CONTRIBUTING.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/LICENSE +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/README.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/FAQ.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/assets/favicon.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/cli/index.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/actions.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/assets.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/attachments.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/buckets.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/connections.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/getting_started.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/jobs.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/processes.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/queues.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/core/traced.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/hooks.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/index.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/overrides/main.html +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/release_policy.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/justfile +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/mkdocs.yml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/py.typed +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/scripts/debug_test.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_deterministic_evaluator_base.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_evaluator_base.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_evaluator_factory.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_exact_match_evaluator.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_json_similarity_evaluator.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_llm_as_judge_evaluator.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_evaluators/_trajectory_evaluator.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_models/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_models/_evaluation_set.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/_models/_evaluators.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/evaluation_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_evals/progress_reporter.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_studio_project.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_eval.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_config.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/job.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/py.typed +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/__init__.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/conftest.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_init.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_new.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_push.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/conftest.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/tracing/test_traced.py +0 -0
- {uipath-2.1.18 → uipath-2.1.20}/tests/tracing/test_tracing_manager.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.20
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "uipath"
|
3
|
-
version = "2.1.
|
3
|
+
version = "2.1.20"
|
4
4
|
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
6
6
|
requires-python = ">=3.10"
|
@@ -0,0 +1 @@
|
|
1
|
+
3.13
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# UiPath Coded Agents with Event Triggers
|
2
|
+
|
3
|
+
This guide explains how to create Python-based UiPath Coded Agents that respond to event triggers, enabling seamless event-driven agents.
|
4
|
+
|
5
|
+
## Overview
|
6
|
+
|
7
|
+
UiPath Coded Agents allow you to write automation logic directly in Python while leveraging UiPath's event trigger system. This project demonstrates how to create agents that handle external events from systems like Gmail, Slack, and other connectors.
|
8
|
+
|
9
|
+
## How to Set Up UiPath Coded Agents with Event Triggers
|
10
|
+
|
11
|
+
### Step 1: Install UiPath Python SDK
|
12
|
+
|
13
|
+
1. Open it with your prefered editor
|
14
|
+
2. In terminal run:
|
15
|
+
```bash
|
16
|
+
uv init
|
17
|
+
uv add uipath
|
18
|
+
uv run uipath new event-agent
|
19
|
+
uv run uipath init
|
20
|
+
```
|
21
|
+
|
22
|
+
### Step 2: Create Your Coded Agent
|
23
|
+
|
24
|
+
Create a Python file with your agent logic using the UiPath SDK:
|
25
|
+
|
26
|
+
```python
|
27
|
+
from dataclasses import dataclass
|
28
|
+
from uipath.models import EventArguments
|
29
|
+
from uipath import UiPath
|
30
|
+
import logging
|
31
|
+
|
32
|
+
logger = logging.getLogger(__name__)
|
33
|
+
|
34
|
+
@dataclass
|
35
|
+
class EchoOut:
|
36
|
+
message: dict
|
37
|
+
|
38
|
+
# use EventArguments when called by UiPath EventTriggers
|
39
|
+
def main(input: EventArguments) -> EchoOut:
|
40
|
+
sdk = UiPath()
|
41
|
+
|
42
|
+
# get the event payload, this will be different from event to event
|
43
|
+
payload = sdk.connections.retrieve_event_payload(input)
|
44
|
+
|
45
|
+
logger.info(f"Received payload: {payload}")
|
46
|
+
|
47
|
+
return EchoOut(payload)
|
48
|
+
```
|
49
|
+
|
50
|
+
Run `uipath init` again to update the input arguments.
|
51
|
+
|
52
|
+
### Step 3: Understanding the Event Flow
|
53
|
+
|
54
|
+
When an event trigger fires, UiPath will:
|
55
|
+
1. Pass event data through `EventArguments`
|
56
|
+
2. Your agent retrieves the full payload using `sdk.connections.retrieve_event_payload(input)`
|
57
|
+
3. Process the payload based on your business logic
|
58
|
+
4. Return structured output
|
59
|
+
|
60
|
+
### Step 4: Publish Your Coded Agent and setup Event Trigger
|
61
|
+
|
62
|
+
#### 4.1: Build and Publish
|
63
|
+
1. Use `uipath pack` and `uipath publish` to create and publish the package
|
64
|
+
2. Create an Orchestrator Automation from the published process
|
65
|
+
|
66
|
+
#### 4.2: Access Event Triggers
|
67
|
+
1. Log into UiPath Orchestrator
|
68
|
+
2. Navigate to **Automations** → **Processes**
|
69
|
+
3. Click on your coded workflow process
|
70
|
+
|
71
|
+
#### 4.3: Create Event Trigger
|
72
|
+
1. Go to the **Triggers** tab
|
73
|
+
2. Click **Add Trigger** → **Event Trigger**
|
74
|
+
|
75
|
+
#### 4.4: Configure Event Trigger Settings
|
76
|
+
1. **Name**: Descriptive name (e.g., "Gmail Event Handler")
|
77
|
+
2. **Event Source**: Select connector type:
|
78
|
+
- `uipath-google-gmailcustom` for Gmail
|
79
|
+
- `uipath-slack` for Slack
|
80
|
+
- `uipath-microsoft-outlookcustom` for Outlook
|
81
|
+
- Custom connectors
|
82
|
+
3. **Event Type**: Choose specific event:
|
83
|
+
- `EMAIL_RECEIVED` for emails
|
84
|
+
- `MESSAGE_RECEIVED` for chat messages
|
85
|
+
- Custom event types
|
86
|
+
4. **Filters**: Optional event filtering criteria
|
87
|
+
|
88
|
+
#### 4.5: Map Event to Input Arguments
|
89
|
+
The event data will automatically be passed to your `EventArguments` parameter.
|
90
|
+
|
91
|
+
#### 4.6: Enable the Trigger
|
92
|
+
1. Review configuration
|
93
|
+
2. Click **Create** to save
|
94
|
+
3. Ensure trigger status is **Enabled**
|
95
|
+
|
96
|
+
### Step 5: Test Your Setup
|
97
|
+
|
98
|
+
#### 5.1: Trigger Test Events
|
99
|
+
- Send test email (Gmail triggers)
|
100
|
+
- Post message in Slack (Slack triggers)
|
101
|
+
- Perform action matching your event source
|
102
|
+
|
103
|
+
#### 5.2: Monitor Execution
|
104
|
+
1. Check **Monitoring** → **Jobs** in Orchestrator
|
105
|
+
2. View job details and execution logs
|
106
|
+
3. Verify your coded agent processed the event correctly
|
107
|
+
|
108
|
+
#### 5.3: Debug with Logs
|
109
|
+
|
110
|
+
```python
|
111
|
+
import logging
|
112
|
+
|
113
|
+
logger = logging.getLogger(__name__)
|
114
|
+
|
115
|
+
def main(input: EventArguments) -> EchoOut:
|
116
|
+
sdk = UiPath()
|
117
|
+
|
118
|
+
# payload will be a json (dict) specific to your event
|
119
|
+
payload = sdk.connections.retrieve_event_payload(input)
|
120
|
+
logger.info(f"Successfully retrieved payload: {type(payload)}")
|
121
|
+
logger.debug(f"Payload details: {payload}")
|
122
|
+
|
123
|
+
# Your processing logic here
|
124
|
+
result = process_event(payload)
|
125
|
+
|
126
|
+
logger.info(f"Event processed successfully: {result}")
|
127
|
+
return EchoOut(result)
|
128
|
+
```
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from uipath.models import EventArguments
|
3
|
+
from uipath import UiPath
|
4
|
+
from uipath.tracing import traced
|
5
|
+
import logging
|
6
|
+
|
7
|
+
logger = logging.getLogger(__name__)
|
8
|
+
|
9
|
+
@dataclass
|
10
|
+
class EchoOut:
|
11
|
+
message: dict
|
12
|
+
|
13
|
+
@traced()
|
14
|
+
def handle_slack_event(payload: dict[str, any]) -> EchoOut:
|
15
|
+
"""Handle Slack message events"""
|
16
|
+
message = payload['event']['text'] if 'event' in payload and 'text' in payload['event'] else "No message"
|
17
|
+
user = payload['event']['user'] if 'event' in payload and 'user' in payload['event'] else "Unknown user"
|
18
|
+
|
19
|
+
logger.info(f"Slack message from {user}: {message}")
|
20
|
+
|
21
|
+
|
22
|
+
# use InputTriggerEventArgs when called by UiPath EventTriggers
|
23
|
+
@traced()
|
24
|
+
def main(input: EventArguments) -> EchoOut:
|
25
|
+
sdk = UiPath()
|
26
|
+
|
27
|
+
# get the event payload, this will be different from event to event
|
28
|
+
payload = sdk.connections.retrieve_event_payload(input)
|
29
|
+
|
30
|
+
handle_slack_event(payload)
|
31
|
+
|
32
|
+
logger.info(f"Received payload: {payload}")
|
33
|
+
|
34
|
+
return EchoOut(payload)
|
@@ -11,6 +11,7 @@ from typing import Any, Dict, Optional, Type, TypeVar, cast, get_type_hints
|
|
11
11
|
from opentelemetry import trace
|
12
12
|
from opentelemetry.sdk.trace import TracerProvider
|
13
13
|
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
14
|
+
from pydantic import BaseModel
|
14
15
|
|
15
16
|
from uipath.tracing import LlmOpsHttpExporter
|
16
17
|
|
@@ -162,9 +163,11 @@ class UiPathRuntime(UiPathBaseRuntime):
|
|
162
163
|
input_param = params[0]
|
163
164
|
input_type = input_param.annotation
|
164
165
|
|
165
|
-
# Case 2: Class or
|
166
|
+
# Case 2: Class, dataclass, or Pydantic model parameter
|
166
167
|
if input_type != inspect.Parameter.empty and (
|
167
|
-
is_dataclass(input_type)
|
168
|
+
is_dataclass(input_type)
|
169
|
+
or self._is_pydantic_model(input_type)
|
170
|
+
or hasattr(input_type, "__annotations__")
|
168
171
|
):
|
169
172
|
try:
|
170
173
|
valid_type = cast(Type[Any], input_type)
|
@@ -216,7 +219,16 @@ class UiPathRuntime(UiPathBaseRuntime):
|
|
216
219
|
)
|
217
220
|
|
218
221
|
def _convert_to_class(self, data: Dict[str, Any], cls: Type[T]) -> T:
|
219
|
-
"""Convert a dictionary to either a dataclass or regular class instance."""
|
222
|
+
"""Convert a dictionary to either a dataclass, Pydantic model, or regular class instance."""
|
223
|
+
# Handle Pydantic models
|
224
|
+
try:
|
225
|
+
if inspect.isclass(cls) and issubclass(cls, BaseModel):
|
226
|
+
return cast(T, cls.model_validate(data))
|
227
|
+
except TypeError:
|
228
|
+
# issubclass can raise TypeError if cls is not a class
|
229
|
+
pass
|
230
|
+
|
231
|
+
# Handle dataclasses
|
220
232
|
if is_dataclass(cls):
|
221
233
|
field_types = get_type_hints(cls)
|
222
234
|
converted_data = {}
|
@@ -227,13 +239,17 @@ class UiPathRuntime(UiPathBaseRuntime):
|
|
227
239
|
|
228
240
|
value = data[field_name]
|
229
241
|
if (
|
230
|
-
is_dataclass(field_type)
|
242
|
+
is_dataclass(field_type)
|
243
|
+
or self._is_pydantic_model(field_type)
|
244
|
+
or hasattr(field_type, "__annotations__")
|
231
245
|
) and isinstance(value, dict):
|
232
246
|
typed_field = cast(Type[Any], field_type)
|
233
247
|
value = self._convert_to_class(value, typed_field)
|
234
248
|
converted_data[field_name] = value
|
235
249
|
|
236
250
|
return cast(T, cls(**converted_data))
|
251
|
+
|
252
|
+
# Handle regular classes
|
237
253
|
else:
|
238
254
|
sig = inspect.signature(cls.__init__)
|
239
255
|
params = sig.parameters
|
@@ -254,6 +270,7 @@ class UiPathRuntime(UiPathBaseRuntime):
|
|
254
270
|
|
255
271
|
if (
|
256
272
|
is_dataclass(param_type)
|
273
|
+
or self._is_pydantic_model(param_type)
|
257
274
|
or hasattr(param_type, "__annotations__")
|
258
275
|
) and isinstance(value, dict):
|
259
276
|
typed_param = cast(Type[Any], param_type)
|
@@ -265,22 +282,41 @@ class UiPathRuntime(UiPathBaseRuntime):
|
|
265
282
|
|
266
283
|
return cls(**init_args)
|
267
284
|
|
285
|
+
def _is_pydantic_model(self, cls: Type[Any]) -> bool:
|
286
|
+
"""Safely check if a class is a Pydantic model."""
|
287
|
+
try:
|
288
|
+
return inspect.isclass(cls) and issubclass(cls, BaseModel)
|
289
|
+
except TypeError:
|
290
|
+
# issubclass can raise TypeError if cls is not a class
|
291
|
+
return False
|
292
|
+
|
268
293
|
def _convert_from_class(self, obj: Any) -> Dict[str, Any]:
|
269
|
-
"""Convert a class instance (dataclass or regular) to a dictionary."""
|
294
|
+
"""Convert a class instance (dataclass, Pydantic model, or regular) to a dictionary."""
|
270
295
|
if obj is None:
|
271
296
|
return {}
|
272
297
|
|
273
|
-
|
298
|
+
# Handle Pydantic models
|
299
|
+
if isinstance(obj, BaseModel):
|
300
|
+
return obj.model_dump()
|
301
|
+
|
302
|
+
# Handle dataclasses
|
303
|
+
elif is_dataclass(obj):
|
274
304
|
# Make sure obj is an instance, not a class
|
275
305
|
if isinstance(obj, type):
|
276
306
|
return {}
|
277
307
|
return asdict(obj)
|
308
|
+
|
309
|
+
# Handle regular classes
|
278
310
|
elif hasattr(obj, "__dict__"):
|
279
311
|
result = {}
|
280
312
|
for key, value in obj.__dict__.items():
|
281
313
|
# Skip private attributes
|
282
314
|
if not key.startswith("_"):
|
283
|
-
if
|
315
|
+
if (
|
316
|
+
isinstance(value, BaseModel)
|
317
|
+
or hasattr(value, "__dict__")
|
318
|
+
or is_dataclass(value)
|
319
|
+
):
|
284
320
|
result[key] = self._convert_from_class(value)
|
285
321
|
else:
|
286
322
|
result[key] = value
|
@@ -14,6 +14,8 @@ from typing import (
|
|
14
14
|
get_type_hints,
|
15
15
|
)
|
16
16
|
|
17
|
+
from pydantic import BaseModel
|
18
|
+
|
17
19
|
SchemaType = Literal["object", "integer", "double", "string", "boolean", "array"]
|
18
20
|
|
19
21
|
TYPE_MAP: Dict[str, SchemaType] = {
|
@@ -50,7 +52,30 @@ def get_type_schema(type_hint: Any) -> Dict[str, Any]:
|
|
50
52
|
return {"type": "object"}
|
51
53
|
|
52
54
|
if inspect.isclass(type_hint):
|
53
|
-
|
55
|
+
# Handle Pydantic models
|
56
|
+
if issubclass(type_hint, BaseModel):
|
57
|
+
properties = {}
|
58
|
+
required = []
|
59
|
+
|
60
|
+
# Get the model fields
|
61
|
+
model_fields = type_hint.model_fields
|
62
|
+
|
63
|
+
for field_name, field_info in model_fields.items():
|
64
|
+
# Use alias if defined, otherwise use field name
|
65
|
+
schema_field_name = field_info.alias if field_info.alias else field_name
|
66
|
+
|
67
|
+
# Get the field type schema
|
68
|
+
field_schema = get_type_schema(field_info.annotation)
|
69
|
+
properties[schema_field_name] = field_schema
|
70
|
+
|
71
|
+
# Check if field is required using Pydantic's built-in method
|
72
|
+
if field_info.is_required():
|
73
|
+
required.append(schema_field_name)
|
74
|
+
|
75
|
+
return {"type": "object", "properties": properties, "required": required}
|
76
|
+
|
77
|
+
# Handle dataclasses
|
78
|
+
elif is_dataclass(type_hint):
|
54
79
|
properties = {}
|
55
80
|
required = []
|
56
81
|
|
@@ -61,6 +86,8 @@ def get_type_schema(type_hint: Any) -> Dict[str, Any]:
|
|
61
86
|
required.append(field.name)
|
62
87
|
|
63
88
|
return {"type": "object", "properties": properties, "required": required}
|
89
|
+
|
90
|
+
# Handle regular classes with annotations
|
64
91
|
elif hasattr(type_hint, "__annotations__"):
|
65
92
|
properties = {}
|
66
93
|
required = []
|
@@ -8,6 +8,7 @@ from typing import Any, Dict, List, Optional, Tuple
|
|
8
8
|
from ..._services import (
|
9
9
|
AssetsService,
|
10
10
|
BucketsService,
|
11
|
+
ConnectionsService,
|
11
12
|
ContextGroundingService,
|
12
13
|
ProcessesService,
|
13
14
|
)
|
@@ -47,6 +48,7 @@ supported_bindings_by_service = {
|
|
47
48
|
"processes": ProcessesService,
|
48
49
|
"buckets": BucketsService,
|
49
50
|
"context_grounding": ContextGroundingService,
|
51
|
+
"connections": ConnectionsService,
|
50
52
|
}
|
51
53
|
|
52
54
|
|
@@ -103,7 +105,17 @@ class ServiceUsage:
|
|
103
105
|
|
104
106
|
# custom logic for connections bindings
|
105
107
|
elif self.service_name == "connections":
|
108
|
+
# First, try to get inferred bindings for connections if they exist
|
109
|
+
connections_service = supported_bindings_by_service.get("connections")
|
110
|
+
inferred_bindings = {}
|
111
|
+
if connections_service:
|
112
|
+
inferred_bindings = get_inferred_bindings_names(connections_service)
|
113
|
+
|
106
114
|
for call in self.method_calls:
|
115
|
+
# Skip methods that are decorated with @infer_bindings(ignore=False)
|
116
|
+
if call.method_name in inferred_bindings:
|
117
|
+
continue
|
118
|
+
|
107
119
|
if len(call.args) > 0:
|
108
120
|
connection_id = call.args[0]
|
109
121
|
if connection_id:
|
@@ -68,6 +68,7 @@ def get_project_config(directory: str) -> dict[str, str]:
|
|
68
68
|
"version": toml_data["version"],
|
69
69
|
"authors": toml_data["authors"],
|
70
70
|
"dependencies": toml_data.get("dependencies", {}),
|
71
|
+
"requires-python": toml_data.get("requires-python", {}),
|
71
72
|
}
|
72
73
|
|
73
74
|
|
@@ -97,6 +98,11 @@ def validate_config(config: dict[str, str]) -> None:
|
|
97
98
|
'Project authors cannot be empty. Please specify authors in pyproject.toml:\n authors = [{ name = "John Doe" }]'
|
98
99
|
)
|
99
100
|
|
101
|
+
if not config["requires-python"] or config["requires-python"].strip() == "":
|
102
|
+
console.error(
|
103
|
+
"'requires-python' field cannot be empty. Please specify it in pyproject.toml: requires-python = \">=3.10\""
|
104
|
+
)
|
105
|
+
|
100
106
|
invalid_chars = ["&", "<", ">", '"', "'", ";"]
|
101
107
|
for char in invalid_chars:
|
102
108
|
if char in config["project_name"]:
|
@@ -296,6 +302,7 @@ def read_toml_project(file_path: str) -> dict:
|
|
296
302
|
"version": project["version"].strip(),
|
297
303
|
"authors": author_name.strip(),
|
298
304
|
"dependencies": dependencies,
|
305
|
+
"requires-python": project.get("requires-python", "").strip(),
|
299
306
|
}
|
300
307
|
|
301
308
|
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import json
|
1
2
|
import logging
|
3
|
+
from typing import Any, Dict
|
2
4
|
|
3
5
|
from .._config import Config
|
4
6
|
from .._execution_context import ExecutionContext
|
5
|
-
from .._utils import Endpoint, RequestSpec
|
6
|
-
from ..models import Connection, ConnectionToken
|
7
|
+
from .._utils import Endpoint, RequestSpec, infer_bindings
|
8
|
+
from ..models import Connection, ConnectionToken, EventArguments
|
7
9
|
from ..tracing._traced import traced
|
8
10
|
from ._base_service import BaseService
|
9
11
|
|
@@ -112,6 +114,84 @@ class ConnectionsService(BaseService):
|
|
112
114
|
)
|
113
115
|
return ConnectionToken.model_validate(response.json())
|
114
116
|
|
117
|
+
@traced(
|
118
|
+
name="connections_retrieve_event_payload",
|
119
|
+
run_type="uipath",
|
120
|
+
)
|
121
|
+
@infer_bindings(resource_type="ignored", ignore=True)
|
122
|
+
def retrieve_event_payload(self, event_args: EventArguments) -> Dict[str, Any]:
|
123
|
+
"""Retrieve event payload from UiPath Integration Service.
|
124
|
+
|
125
|
+
Args:
|
126
|
+
event_args (EventArguments): The event arguments. Should be passed along from the job's input.
|
127
|
+
|
128
|
+
Returns:
|
129
|
+
Dict[str, Any]: The event payload data
|
130
|
+
"""
|
131
|
+
if not event_args.additional_event_data:
|
132
|
+
raise ValueError("additional_event_data is required")
|
133
|
+
|
134
|
+
# Parse additional event data to get event id
|
135
|
+
event_data = json.loads(event_args.additional_event_data)
|
136
|
+
|
137
|
+
event_id = None
|
138
|
+
if "processedEventId" in event_data:
|
139
|
+
event_id = event_data["processedEventId"]
|
140
|
+
elif "rawEventId" in event_data:
|
141
|
+
event_id = event_data["rawEventId"]
|
142
|
+
else:
|
143
|
+
raise ValueError("Event Id not found in additional event data")
|
144
|
+
|
145
|
+
# Build request URL using connection token's API base URI
|
146
|
+
spec = self._retrieve_event_payload_spec("v1", event_id)
|
147
|
+
|
148
|
+
response = self.request(spec.method, url=spec.endpoint)
|
149
|
+
|
150
|
+
return response.json()
|
151
|
+
|
152
|
+
@traced(
|
153
|
+
name="connections_retrieve_event_payload",
|
154
|
+
run_type="uipath",
|
155
|
+
)
|
156
|
+
@infer_bindings(resource_type="ignored", ignore=True)
|
157
|
+
async def retrieve_event_payload_async(
|
158
|
+
self, event_args: EventArguments
|
159
|
+
) -> Dict[str, Any]:
|
160
|
+
"""Retrieve event payload from UiPath Integration Service.
|
161
|
+
|
162
|
+
Args:
|
163
|
+
event_args (EventArguments): The event arguments. Should be passed along from the job's input.
|
164
|
+
|
165
|
+
Returns:
|
166
|
+
Dict[str, Any]: The event payload data
|
167
|
+
"""
|
168
|
+
if not event_args.additional_event_data:
|
169
|
+
raise ValueError("additional_event_data is required")
|
170
|
+
|
171
|
+
# Parse additional event data to get event id
|
172
|
+
event_data = json.loads(event_args.additional_event_data)
|
173
|
+
|
174
|
+
event_id = None
|
175
|
+
if "processedEventId" in event_data:
|
176
|
+
event_id = event_data["processedEventId"]
|
177
|
+
elif "rawEventId" in event_data:
|
178
|
+
event_id = event_data["rawEventId"]
|
179
|
+
else:
|
180
|
+
raise ValueError("Event Id not found in additional event data")
|
181
|
+
|
182
|
+
# Build request URL using connection token's API base URI
|
183
|
+
spec = self._retrieve_event_payload_spec("v1", event_id)
|
184
|
+
|
185
|
+
response = await self.request_async(spec.method, url=spec.endpoint)
|
186
|
+
|
187
|
+
return response.json()
|
188
|
+
|
189
|
+
def _retrieve_event_payload_spec(self, version: str, event_id: str) -> RequestSpec:
|
190
|
+
return RequestSpec(
|
191
|
+
method="GET",
|
192
|
+
endpoint=Endpoint(f"/elements_/{version}/events/{event_id}"),
|
193
|
+
)
|
194
|
+
|
115
195
|
def _retrieve_spec(self, key: str) -> RequestSpec:
|
116
196
|
return RequestSpec(
|
117
197
|
method="GET",
|
@@ -8,7 +8,10 @@ T = TypeVar("T")
|
|
8
8
|
|
9
9
|
|
10
10
|
def infer_bindings(
|
11
|
-
resource_type: str,
|
11
|
+
resource_type: str,
|
12
|
+
name: str = "name",
|
13
|
+
folder_path: str = "folder_path",
|
14
|
+
ignore: bool = False,
|
12
15
|
) -> Callable[..., Any]:
|
13
16
|
def decorator(func: Callable[..., Any]):
|
14
17
|
@functools.wraps(func)
|
@@ -30,7 +33,7 @@ def infer_bindings(
|
|
30
33
|
|
31
34
|
return func(**all_args)
|
32
35
|
|
33
|
-
wrapper._should_infer_bindings =
|
36
|
+
wrapper._should_infer_bindings = not ignore # type: ignore
|
34
37
|
wrapper._infer_bindings_mappings = {"name": name, "folder_path": folder_path} # type: ignore
|
35
38
|
return wrapper
|
36
39
|
|
@@ -3,7 +3,7 @@ from .actions import Action
|
|
3
3
|
from .assets import Asset, UserAsset
|
4
4
|
from .attachment import Attachment
|
5
5
|
from .buckets import Bucket
|
6
|
-
from .connections import Connection, ConnectionToken
|
6
|
+
from .connections import Connection, ConnectionToken, EventArguments
|
7
7
|
from .context_grounding import ContextGroundingQueryResponse
|
8
8
|
from .context_grounding_index import ContextGroundingIndex
|
9
9
|
from .errors import BaseUrlMissingError, SecretMissingError
|
@@ -39,6 +39,7 @@ __all__ = [
|
|
39
39
|
"TransactionItemResult",
|
40
40
|
"Connection",
|
41
41
|
"ConnectionToken",
|
42
|
+
"EventArguments",
|
42
43
|
"Job",
|
43
44
|
"InvokeProcess",
|
44
45
|
"ActionSchema",
|
@@ -49,3 +49,20 @@ class ConnectionToken(BaseModel):
|
|
49
49
|
expires_in: Optional[int] = Field(default=None, alias="expiresIn")
|
50
50
|
api_base_uri: Optional[str] = Field(default=None, alias="apiBaseUri")
|
51
51
|
element_instance_id: Optional[int] = Field(default=None, alias="elementInstanceId")
|
52
|
+
|
53
|
+
|
54
|
+
class EventArguments(BaseModel):
|
55
|
+
event_connector: Optional[str] = Field(default=None, alias="UiPathEventConnector")
|
56
|
+
event: Optional[str] = Field(default=None, alias="UiPathEvent")
|
57
|
+
event_object_type: Optional[str] = Field(
|
58
|
+
default=None, alias="UiPathEventObjectType"
|
59
|
+
)
|
60
|
+
event_object_id: Optional[str] = Field(default=None, alias="UiPathEventObjectId")
|
61
|
+
additional_event_data: Optional[str] = Field(
|
62
|
+
default=None, alias="UiPathAdditionalEventData"
|
63
|
+
)
|
64
|
+
|
65
|
+
model_config = ConfigDict(
|
66
|
+
populate_by_name=True,
|
67
|
+
extra="allow",
|
68
|
+
)
|