diff --git a/workflows_execution/.gitattributes b/workflows_execution/.gitattributes new file mode 100755 index 000000000..4d75d5900 --- /dev/null +++ b/workflows_execution/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.py linguist-generated=false \ No newline at end of file diff --git a/workflows_execution/.gitignore b/workflows_execution/.gitignore new file mode 100755 index 000000000..8ac3f51d4 --- /dev/null +++ b/workflows_execution/.gitignore @@ -0,0 +1,7 @@ +.python-version +.DS_Store +venv/ +src/*.egg-info/ +__pycache__/ +.pytest_cache/ +.python-version` diff --git a/workflows_execution/README.md b/workflows_execution/README.md index f221fef36..47381f690 100755 --- a/workflows_execution/README.md +++ b/workflows_execution/README.md @@ -12,66 +12,194 @@ pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=workfl ```python import epilot -from epilot.models import operations, shared +from epilot.models import shared s = epilot.Epilot( security=shared.Security( - bearer_auth="Bearer YOUR_BEARER_TOKEN_HERE", + bearer_auth="", ), ) - req = shared.WorkflowExecutionCreateReq( assigned_to=[ - "deserunt", - "porro", - "nulla", + 'string', ], contexts=[ shared.WorkflowContext( - id="vero", - schema="perspiciatis", - title="Internal Group Orchestrator", + id='', + schema='string', + title='string', ), + ], + workflow_id='string', +) + +res = s.workflows.create_execution(req) + +if res.workflow_execution is not None: + # handle response + pass +``` + + + +## Available Resources and Operations + + +### [workflows](docs/sdks/workflows/README.md) + +* [create_execution](docs/sdks/workflows/README.md#create_execution) - createExecution +* [create_step](docs/sdks/workflows/README.md#create_step) - createStep +* [delete_execution](docs/sdks/workflows/README.md#delete_execution) - deleteExecution +* [delete_step](docs/sdks/workflows/README.md#delete_step) - deleteStep +* [get_closing_reason_execution](docs/sdks/workflows/README.md#get_closing_reason_execution) - getClosingReasonExecution +* [get_execution](docs/sdks/workflows/README.md#get_execution) - getExecution +* [get_executions](docs/sdks/workflows/README.md#get_executions) - getExecutions +* [search_executions](docs/sdks/workflows/README.md#search_executions) - searchExecutions +* [~~search_steps~~](docs/sdks/workflows/README.md#search_steps) - searchSteps :warning: **Deprecated** +* [update_execution](docs/sdks/workflows/README.md#update_execution) - updateExecution +* [update_step](docs/sdks/workflows/README.md#update_step) - updateStep + + + + + + + + + + + +# Pagination + +Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the +returned response object will have a `Next` method that can be called to pull down the next group of results. If the +return value of `Next` is `None`, then there are no more pages to be fetched. + +Here's an example of one such pagination call: + + + + + +# Error Handling + +Handling errors in your SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. + + + + + + + +# Server Selection + +## Select Server by Index + +You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `https://workflows-execution.sls.epilot.io` | None | + +For example: + + +```python +import epilot +from epilot.models import shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), + server_idx=0 +) + +req = shared.WorkflowExecutionCreateReq( + assigned_to=[ + 'string', + ], + contexts=[ shared.WorkflowContext( - id="facilis", - schema="eum", - title="District Paradigm Agent", + id='', + schema='string', + title='string', ), + ], + workflow_id='string', +) + +res = s.workflows.create_execution(req) + +if res.workflow_execution is not None: + # handle response + pass +``` + + +## Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: + + +```python +import epilot +from epilot.models import shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), + server_url="https://workflows-execution.sls.epilot.io" +) + +req = shared.WorkflowExecutionCreateReq( + assigned_to=[ + 'string', + ], + contexts=[ shared.WorkflowContext( - id="inventore", - schema="sapiente", - title="Future Markets Architect", + id='', + schema='string', + title='string', ), ], - trigger="AUTOMATIC", - workflow_id="vel", + workflow_id='string', ) - + res = s.workflows.create_execution(req) if res.workflow_execution is not None: # handle response + pass ``` - + + + + + +# Custom HTTP Client + +The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object. + + +For example, you could specify a header for every request that your sdk makes as follows: + +```python +import epilot +import requests + +http_client = requests.Session() +http_client.headers.update({'x-custom-header': 'someValue'}) +s = epilot.Epilot(client: http_client) +``` + + + + + + - -## SDK Available Operations - - -### workflows - -* `create_execution` - createExecution -* `create_step` - createStep -* `delete_execution` - deleteExecution -* `delete_step` - deleteStep -* `get_closing_reason_execution` - getClosingReasonExecution -* `get_execution` - getExecution -* `get_executions` - getExecutions -* `search_executions` - searchExecutions -* `search_steps` - searchSteps -* `update_execution` - updateExecution -* `update_step` - updateStep - ### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/workflows_execution/RELEASES.md b/workflows_execution/RELEASES.md index 8aa3a6c72..e6bdaabea 100644 --- a/workflows_execution/RELEASES.md +++ b/workflows_execution/RELEASES.md @@ -34,4 +34,562 @@ Based on: ### Changes Based on: - OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml -- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy \ No newline at end of file +- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy + +## 2023-04-01 01:11:32 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy + +## 2023-04-06 01:06:25 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.19.6 (2.17.8) https://github.com/speakeasy-api/speakeasy + +## 2023-04-12 01:08:16 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy + +## 2023-04-14 01:09:15 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy + +## 2023-04-18 01:08:29 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.20.1 (2.18.1) https://github.com/speakeasy-api/speakeasy + +## 2023-04-19 01:10:51 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.20.2 (2.18.2) https://github.com/speakeasy-api/speakeasy + +## 2023-04-21 01:08:05 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.21.4 (2.19.1) https://github.com/speakeasy-api/speakeasy + +## 2023-04-22 01:09:46 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.22.1 (2.20.1) https://github.com/speakeasy-api/speakeasy + +## 2023-04-26 01:09:55 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.23.1 (2.21.1) https://github.com/speakeasy-api/speakeasy + +## 2023-04-27 01:11:02 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.25.1 (2.22.0) https://github.com/speakeasy-api/speakeasy + +## 2023-04-28 01:10:28 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.26.2 (2.23.2) https://github.com/speakeasy-api/speakeasy + +## 2023-04-29 01:09:14 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.26.4 (2.23.4) https://github.com/speakeasy-api/speakeasy + +## 2023-05-02 01:10:22 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.26.5 (2.23.6) https://github.com/speakeasy-api/speakeasy + +## 2023-05-03 01:10:28 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.27.0 (2.24.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-05 01:04:00 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.29.0 (2.26.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-06 01:04:26 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.29.1 (2.26.1) https://github.com/speakeasy-api/speakeasy + +## 2023-05-10 01:08:35 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.29.2 (2.26.2) https://github.com/speakeasy-api/speakeasy + +## 2023-05-11 01:10:05 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.30.0 (2.26.3) https://github.com/speakeasy-api/speakeasy + +## 2023-05-12 01:10:09 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.30.1 (2.26.4) https://github.com/speakeasy-api/speakeasy + +## 2023-05-13 01:07:28 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.31.1 (2.27.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-16 01:10:58 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.32.0 (2.28.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-17 01:12:30 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.33.2 (2.29.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-18 01:10:28 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.34.0 (2.30.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-19 01:11:10 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.35.0 (2.31.0) https://github.com/speakeasy-api/speakeasy + +## 2023-05-23 01:10:32 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.37.5 (2.32.2) https://github.com/speakeasy-api/speakeasy + +## 2023-05-27 01:11:30 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.39.0 (2.32.7) https://github.com/speakeasy-api/speakeasy + +## 2023-06-01 01:47:41 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.40.2 (2.34.2) https://github.com/speakeasy-api/speakeasy + +## 2023-06-02 01:23:19 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.40.3 (2.34.7) https://github.com/speakeasy-api/speakeasy + +## 2023-06-03 01:24:31 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.43.0 (2.35.3) https://github.com/speakeasy-api/speakeasy + +## 2023-06-07 01:25:09 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.44.2 (2.35.9) https://github.com/speakeasy-api/speakeasy + +## 2023-06-08 01:21:57 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.45.0 (2.37.0) https://github.com/speakeasy-api/speakeasy + +## 2023-06-09 01:23:53 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.45.2 (2.37.2) https://github.com/speakeasy-api/speakeasy + +## 2023-06-10 01:16:46 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.47.0 (2.39.0) https://github.com/speakeasy-api/speakeasy + +## 2023-06-11 01:38:00 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.47.1 (2.39.2) https://github.com/speakeasy-api/speakeasy + +## 2023-06-14 01:18:00 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.47.3 (2.40.1) https://github.com/speakeasy-api/speakeasy + +## 2023-06-16 01:18:20 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.48.0 (2.41.1) https://github.com/speakeasy-api/speakeasy + +## 2023-06-20 01:15:37 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.49.0 (2.41.4) https://github.com/speakeasy-api/speakeasy + +## 2023-06-21 01:18:07 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.49.1 (2.41.5) https://github.com/speakeasy-api/speakeasy + +## 2023-06-23 01:27:21 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.50.1 (2.43.2) https://github.com/speakeasy-api/speakeasy + +## 2023-06-27 01:28:19 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.51.1 (2.50.2) https://github.com/speakeasy-api/speakeasy + +## 2023-06-29 01:25:05 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.51.3 (2.52.2) https://github.com/speakeasy-api/speakeasy + +## 2023-07-01 01:42:14 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.52.0 (2.55.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-06 01:37:13 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.52.2 (2.57.2) https://github.com/speakeasy-api/speakeasy + +## 2023-07-07 01:37:07 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.53.0 (2.58.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-08 01:27:38 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.53.1 (2.58.2) https://github.com/speakeasy-api/speakeasy + +## 2023-07-11 01:20:20 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.56.0 (2.61.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-12 01:26:22 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.56.4 (2.61.5) https://github.com/speakeasy-api/speakeasy + +## 2023-07-13 01:38:01 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.57.0 (2.62.1) https://github.com/speakeasy-api/speakeasy + +## 2023-07-14 01:37:50 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.59.0 (2.65.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-17 01:40:35 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.60.0 (2.66.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-18 01:48:37 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.61.0 (2.70.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-19 02:37:29 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.62.1 (2.70.2) https://github.com/speakeasy-api/speakeasy + +## 2023-07-22 01:14:35 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.64.0 (2.71.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-26 01:15:33 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.65.0 (2.73.0) https://github.com/speakeasy-api/speakeasy + +## 2023-07-27 01:07:01 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.65.1 (2.73.1) https://github.com/speakeasy-api/speakeasy + +## 2023-07-28 01:08:12 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.65.2 (2.75.1) https://github.com/speakeasy-api/speakeasy + +## 2023-07-29 01:08:47 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.65.2 (2.75.1) https://github.com/speakeasy-api/speakeasy + +## 2023-08-01 01:15:34 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.66.1 (2.75.2) https://github.com/speakeasy-api/speakeasy + +## 2023-08-03 01:09:10 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.68.1 (2.77.1) https://github.com/speakeasy-api/speakeasy + +## 2023-08-04 01:11:06 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.68.3 (2.81.1) https://github.com/speakeasy-api/speakeasy + +## 2023-08-08 01:07:22 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.69.1 (2.82.0) https://github.com/speakeasy-api/speakeasy + +## 2023-08-15 00:57:40 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.72.0 (2.84.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.41.0] workflows_execution + +## 2023-08-19 00:55:47 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.74.3 (2.86.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.41.1] workflows_execution + +## 2023-08-25 00:58:49 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.74.11 (2.87.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.41.2] workflows_execution + +## 2023-08-26 00:56:28 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.74.16 (2.88.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.42.0] workflows_execution + +## 2023-08-29 00:59:09 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.74.17 (2.88.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.42.1] workflows_execution + +## 2023-08-31 00:59:05 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.76.1 (2.89.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.43.0] workflows_execution + +## 2023-09-01 01:02:52 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.77.0 (2.91.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.0] workflows_execution + +## 2023-09-02 00:56:52 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.77.2 (2.93.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.1] workflows_execution + +## 2023-09-05 00:58:06 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.78.3 (2.96.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.2] workflows_execution + +## 2023-09-12 00:57:33 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.3] workflows_execution + +## 2023-09-16 00:57:59 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.86.0 (2.115.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.4] workflows_execution + +## 2023-09-20 00:59:30 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.88.0 (2.118.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.44.5] workflows_execution + +## 2023-09-26 01:00:17 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.91.0 (2.129.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.45.0] workflows_execution + +## 2023-09-27 01:00:25 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.91.2 (2.131.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.45.1] workflows_execution + +## 2023-09-29 01:00:06 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.91.3 (2.139.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.46.0] workflows_execution + +## 2023-10-01 01:07:59 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.92.2 (2.142.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.47.0] workflows_execution + +## 2023-10-02 01:00:50 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.92.3 (2.143.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.47.1] workflows_execution + +## 2023-10-05 01:00:27 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.94.0 (2.147.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.47.2] workflows_execution + +## 2023-10-07 00:59:23 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.96.1 (2.150.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.48.0] workflows_execution + +## 2023-10-11 00:59:56 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.97.1 (2.152.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.48.1] workflows_execution + +## 2023-10-13 01:01:57 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.99.1 (2.154.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.48.2] workflows_execution + +## 2023-10-18 01:00:42 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.101.0 (2.161.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.0] workflows_execution + +## 2023-10-21 00:58:30 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.104.0 (2.169.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.0] workflows_execution + +## 2023-10-28 00:58:08 +### Changes +Based on: +- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-execution.yaml +- Speakeasy CLI 1.109.0 (2.173.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.1] workflows_execution \ No newline at end of file diff --git a/workflows_execution/USAGE.md b/workflows_execution/USAGE.md index 9334d18ac..f27882311 100755 --- a/workflows_execution/USAGE.md +++ b/workflows_execution/USAGE.md @@ -1,45 +1,34 @@ + + ```python import epilot -from epilot.models import operations, shared +from epilot.models import shared s = epilot.Epilot( security=shared.Security( - bearer_auth="Bearer YOUR_BEARER_TOKEN_HERE", + bearer_auth="", ), ) - req = shared.WorkflowExecutionCreateReq( assigned_to=[ - "deserunt", - "porro", - "nulla", + 'string', ], contexts=[ shared.WorkflowContext( - id="vero", - schema="perspiciatis", - title="Internal Group Orchestrator", - ), - shared.WorkflowContext( - id="facilis", - schema="eum", - title="District Paradigm Agent", - ), - shared.WorkflowContext( - id="inventore", - schema="sapiente", - title="Future Markets Architect", + id='', + schema='string', + title='string', ), ], - trigger="AUTOMATIC", - workflow_id="vel", + workflow_id='string', ) - + res = s.workflows.create_execution(req) if res.workflow_execution is not None: # handle response + pass ``` \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/createexecutionresponse.md b/workflows_execution/docs/models/operations/createexecutionresponse.md new file mode 100755 index 000000000..0f8214911 --- /dev/null +++ b/workflows_execution/docs/models/operations/createexecutionresponse.md @@ -0,0 +1,12 @@ +# CreateExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Validation Errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `workflow_execution` | [Optional[shared.WorkflowExecution]](../../models/shared/workflowexecution.md) | :heavy_minus_sign: | Success - if the execution is created successfully | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/createsteprequest.md b/workflows_execution/docs/models/operations/createsteprequest.md new file mode 100755 index 000000000..000e6db96 --- /dev/null +++ b/workflows_execution/docs/models/operations/createsteprequest.md @@ -0,0 +1,9 @@ +# CreateStepRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `create_step_req` | [shared.CreateStepReq](../../models/shared/createstepreq.md) | :heavy_check_mark: | Workflow Execution Step payload | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/createstepresponse.md b/workflows_execution/docs/models/operations/createstepresponse.md new file mode 100755 index 000000000..fadabf76a --- /dev/null +++ b/workflows_execution/docs/models/operations/createstepresponse.md @@ -0,0 +1,12 @@ +# CreateStepResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Validation Errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `step` | [Optional[shared.Step]](../../models/shared/step.md) | :heavy_minus_sign: | Success - if the step is created with success | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/deleteexecutionrequest.md b/workflows_execution/docs/models/operations/deleteexecutionrequest.md new file mode 100755 index 000000000..d634c0546 --- /dev/null +++ b/workflows_execution/docs/models/operations/deleteexecutionrequest.md @@ -0,0 +1,8 @@ +# DeleteExecutionRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution to de deleted. | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/deleteexecutionresponse.md b/workflows_execution/docs/models/operations/deleteexecutionresponse.md new file mode 100755 index 000000000..c23839e9b --- /dev/null +++ b/workflows_execution/docs/models/operations/deleteexecutionresponse.md @@ -0,0 +1,11 @@ +# DeleteExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Failed to authenticate | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/deletesteprequest.md b/workflows_execution/docs/models/operations/deletesteprequest.md new file mode 100755 index 000000000..27d21b658 --- /dev/null +++ b/workflows_execution/docs/models/operations/deletesteprequest.md @@ -0,0 +1,9 @@ +# DeleteStepRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | +| `step_id` | *str* | :heavy_check_mark: | Short uuid (length 6) to identify the Workflow Execution Step. | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/deletestepresponse.md b/workflows_execution/docs/models/operations/deletestepresponse.md new file mode 100755 index 000000000..0934c481d --- /dev/null +++ b/workflows_execution/docs/models/operations/deletestepresponse.md @@ -0,0 +1,11 @@ +# DeleteStepResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Other errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getclosingreasonexecutionrequest.md b/workflows_execution/docs/models/operations/getclosingreasonexecutionrequest.md new file mode 100755 index 000000000..b15a5a046 --- /dev/null +++ b/workflows_execution/docs/models/operations/getclosingreasonexecutionrequest.md @@ -0,0 +1,8 @@ +# GetClosingReasonExecutionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getclosingreasonexecutionresponse.md b/workflows_execution/docs/models/operations/getclosingreasonexecutionresponse.md new file mode 100755 index 000000000..d911d4349 --- /dev/null +++ b/workflows_execution/docs/models/operations/getclosingreasonexecutionresponse.md @@ -0,0 +1,12 @@ +# GetClosingReasonExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `closing_reason_resp` | [Optional[shared.ClosingReasonResp]](../../models/shared/closingreasonresp.md) | :heavy_minus_sign: | returns all Closing Reasons for this Execution | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Internal Issues | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getexecutionrequest.md b/workflows_execution/docs/models/operations/getexecutionrequest.md new file mode 100755 index 000000000..3250d15a4 --- /dev/null +++ b/workflows_execution/docs/models/operations/getexecutionrequest.md @@ -0,0 +1,8 @@ +# GetExecutionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getexecutionresponse.md b/workflows_execution/docs/models/operations/getexecutionresponse.md new file mode 100755 index 000000000..e6a1f321c --- /dev/null +++ b/workflows_execution/docs/models/operations/getexecutionresponse.md @@ -0,0 +1,12 @@ +# GetExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Other errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `workflow_execution` | [Optional[shared.WorkflowExecution]](../../models/shared/workflowexecution.md) | :heavy_minus_sign: | Success - execution loaded with success. Empty response execution was not found. | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getexecutionsrequest.md b/workflows_execution/docs/models/operations/getexecutionsrequest.md new file mode 100755 index 000000000..86945a200 --- /dev/null +++ b/workflows_execution/docs/models/operations/getexecutionsrequest.md @@ -0,0 +1,9 @@ +# GetExecutionsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `context` | *Optional[str]* | :heavy_minus_sign: | Id of an Entity | +| `schema` | *Optional[str]* | :heavy_minus_sign: | Schema of an Entity | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/getexecutionsresponse.md b/workflows_execution/docs/models/operations/getexecutionsresponse.md new file mode 100755 index 000000000..b41b2a9fe --- /dev/null +++ b/workflows_execution/docs/models/operations/getexecutionsresponse.md @@ -0,0 +1,12 @@ +# GetExecutionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Other errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `workflow_execution_slims` | List[[shared.WorkflowExecutionSlim](../../models/shared/workflowexecutionslim.md)] | :heavy_minus_sign: | Success - executions loaded with success. Empty array if org has no executions. | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/searchexecutionsresponse.md b/workflows_execution/docs/models/operations/searchexecutionsresponse.md new file mode 100755 index 000000000..290a76350 --- /dev/null +++ b/workflows_execution/docs/models/operations/searchexecutionsresponse.md @@ -0,0 +1,12 @@ +# SearchExecutionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Validation Errors | +| `search_executions_resp` | [Optional[shared.SearchExecutionsResp]](../../models/shared/searchexecutionsresp.md) | :heavy_minus_sign: | Success - filtered steps are returned | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/searchstepsresponse.md b/workflows_execution/docs/models/operations/searchstepsresponse.md new file mode 100755 index 000000000..7d1044ed4 --- /dev/null +++ b/workflows_execution/docs/models/operations/searchstepsresponse.md @@ -0,0 +1,12 @@ +# SearchStepsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Validation Errors | +| `search_steps_resp` | [Optional[shared.SearchStepsResp]](../../models/shared/searchstepsresp.md) | :heavy_minus_sign: | Success - filtered steps are returned | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/updateexecutionrequest.md b/workflows_execution/docs/models/operations/updateexecutionrequest.md new file mode 100755 index 000000000..708cc9d0c --- /dev/null +++ b/workflows_execution/docs/models/operations/updateexecutionrequest.md @@ -0,0 +1,9 @@ +# UpdateExecutionRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `workflow_execution_update_req` | [shared.WorkflowExecutionUpdateReq](../../models/shared/workflowexecutionupdatereq.md) | :heavy_check_mark: | Patch Updates for Workflow Execution payload. | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/updateexecutionresponse.md b/workflows_execution/docs/models/operations/updateexecutionresponse.md new file mode 100755 index 000000000..b592d1272 --- /dev/null +++ b/workflows_execution/docs/models/operations/updateexecutionresponse.md @@ -0,0 +1,11 @@ +# UpdateExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Other errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/updatesteprequest.md b/workflows_execution/docs/models/operations/updatesteprequest.md new file mode 100755 index 000000000..dce266d7d --- /dev/null +++ b/workflows_execution/docs/models/operations/updatesteprequest.md @@ -0,0 +1,10 @@ +# UpdateStepRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `update_step_req` | [shared.UpdateStepReq](../../models/shared/updatestepreq.md) | :heavy_check_mark: | Workflow Execution Step payload | +| `execution_id` | *str* | :heavy_check_mark: | Id of the execution | +| `step_id` | *str* | :heavy_check_mark: | Short uuid (length 6) to identify the Workflow Execution Step. | \ No newline at end of file diff --git a/workflows_execution/docs/models/operations/updatestepresponse.md b/workflows_execution/docs/models/operations/updatestepresponse.md new file mode 100755 index 000000000..87148acbb --- /dev/null +++ b/workflows_execution/docs/models/operations/updatestepresponse.md @@ -0,0 +1,12 @@ +# UpdateStepResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation | +| `error_resp` | [Optional[shared.ErrorResp]](../../models/shared/errorresp.md) | :heavy_minus_sign: | Validation Errors | +| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | +| `step` | [Optional[shared.Step]](../../models/shared/step.md) | :heavy_minus_sign: | Success - if the step is updated successfully | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/automationconfig.md b/workflows_execution/docs/models/shared/automationconfig.md new file mode 100755 index 000000000..54a5b2e0c --- /dev/null +++ b/workflows_execution/docs/models/shared/automationconfig.md @@ -0,0 +1,12 @@ +# AutomationConfig + +Configuration for automation execution to run + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `execution_id` | *Optional[str]* | :heavy_minus_sign: | Id of the automation execution which ran | +| `execution_status` | *Optional[str]* | :heavy_minus_sign: | Status of Automation Execution. Types can be found in Automation API | +| `flow_id` | *str* | :heavy_check_mark: | Id of the configured automation to run | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/closingreason.md b/workflows_execution/docs/models/shared/closingreason.md new file mode 100755 index 000000000..16265534e --- /dev/null +++ b/workflows_execution/docs/models/shared/closingreason.md @@ -0,0 +1,9 @@ +# ClosingReason + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/closingreasonresp.md b/workflows_execution/docs/models/shared/closingreasonresp.md new file mode 100755 index 000000000..6eaa7be13 --- /dev/null +++ b/workflows_execution/docs/models/shared/closingreasonresp.md @@ -0,0 +1,8 @@ +# ClosingReasonResp + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `reasons` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/createstepreq.md b/workflows_execution/docs/models/shared/createstepreq.md new file mode 100755 index 000000000..211014c86 --- /dev/null +++ b/workflows_execution/docs/models/shared/createstepreq.md @@ -0,0 +1,13 @@ +# CreateStepReq + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `automation_config` | [Optional[AutomationConfig]](../../models/shared/automationconfig.md) | :heavy_minus_sign: | Configuration for automation execution to run | +| `execution_type` | [Optional[StepType]](../../models/shared/steptype.md) | :heavy_minus_sign: | N/A | +| `insertion_index` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[StepStatus]](../../models/shared/stepstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/dynamicduedate.md b/workflows_execution/docs/models/shared/dynamicduedate.md new file mode 100755 index 000000000..6c21dbf98 --- /dev/null +++ b/workflows_execution/docs/models/shared/dynamicduedate.md @@ -0,0 +1,13 @@ +# DynamicDueDate + +set a Duedate for a step then a specific + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `action_type_condition` | [Optional[DynamicDueDateActionTypeCondition]](../../models/shared/dynamicduedateactiontypecondition.md) | :heavy_minus_sign: | N/A | +| `number_of_units` | *float* | :heavy_check_mark: | N/A | +| `step_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `time_period` | [DynamicDueDateTimePeriod](../../models/shared/dynamicduedatetimeperiod.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/dynamicduedateactiontypecondition.md b/workflows_execution/docs/models/shared/dynamicduedateactiontypecondition.md new file mode 100755 index 000000000..301816b03 --- /dev/null +++ b/workflows_execution/docs/models/shared/dynamicduedateactiontypecondition.md @@ -0,0 +1,9 @@ +# DynamicDueDateActionTypeCondition + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `WORKFLOW_STARTED` | WORKFLOW_STARTED | +| `STEP_CLOSED` | STEP_CLOSED | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/dynamicduedatetimeperiod.md b/workflows_execution/docs/models/shared/dynamicduedatetimeperiod.md new file mode 100755 index 000000000..b49a5cb9a --- /dev/null +++ b/workflows_execution/docs/models/shared/dynamicduedatetimeperiod.md @@ -0,0 +1,10 @@ +# DynamicDueDateTimePeriod + + +## Values + +| Name | Value | +| -------- | -------- | +| `DAYS` | days | +| `WEEKS` | weeks | +| `MONTHS` | months | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/ecpdetails.md b/workflows_execution/docs/models/shared/ecpdetails.md new file mode 100755 index 000000000..ca1cbf782 --- /dev/null +++ b/workflows_execution/docs/models/shared/ecpdetails.md @@ -0,0 +1,12 @@ +# ECPDetails + +Details regarding ECP for the workflow step + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `journey` | [Optional[StepJourney]](../../models/shared/stepjourney.md) | :heavy_minus_sign: | N/A | +| `label` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/errorresp.md b/workflows_execution/docs/models/shared/errorresp.md new file mode 100755 index 000000000..6c8383917 --- /dev/null +++ b/workflows_execution/docs/models/shared/errorresp.md @@ -0,0 +1,8 @@ +# ErrorResp + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/executionpaginationdynamo.md b/workflows_execution/docs/models/shared/executionpaginationdynamo.md new file mode 100755 index 000000000..8983f9721 --- /dev/null +++ b/workflows_execution/docs/models/shared/executionpaginationdynamo.md @@ -0,0 +1,9 @@ +# ExecutionPaginationDynamo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `creation_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `org_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/itemtype.md b/workflows_execution/docs/models/shared/itemtype.md new file mode 100755 index 000000000..9d5135e83 --- /dev/null +++ b/workflows_execution/docs/models/shared/itemtype.md @@ -0,0 +1,9 @@ +# ItemType + + +## Values + +| Name | Value | +| --------- | --------- | +| `STEP` | STEP | +| `SECTION` | SECTION | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/lastevaluatedkey.md b/workflows_execution/docs/models/shared/lastevaluatedkey.md new file mode 100755 index 000000000..2e0ed3381 --- /dev/null +++ b/workflows_execution/docs/models/shared/lastevaluatedkey.md @@ -0,0 +1,9 @@ +# LastEvaluatedKey + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `creation_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `org_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchexecutionsreq.md b/workflows_execution/docs/models/shared/searchexecutionsreq.md new file mode 100755 index 000000000..d6196fa75 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchexecutionsreq.md @@ -0,0 +1,13 @@ +# SearchExecutionsReq + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `assigned_to` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `include_done_workflows` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `pagination` | [Optional[ExecutionPaginationDynamo]](../../models/shared/executionpaginationdynamo.md) | :heavy_minus_sign: | N/A | +| `sorting` | [Optional[SearchSorting]](../../models/shared/searchsorting.md) | :heavy_minus_sign: | N/A | +| `status` | [Optional[WorkflowStatus]](../../models/shared/workflowstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchexecutionsresp.md b/workflows_execution/docs/models/shared/searchexecutionsresp.md new file mode 100755 index 000000000..483b4bac9 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchexecutionsresp.md @@ -0,0 +1,9 @@ +# SearchExecutionsResp + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `executions` | List[[WorkflowExecutionSlim](../../models/shared/workflowexecutionslim.md)] | :heavy_check_mark: | N/A | +| `last_evaluated_key` | [Optional[LastEvaluatedKey]](../../models/shared/lastevaluatedkey.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchpagination.md b/workflows_execution/docs/models/shared/searchpagination.md new file mode 100755 index 000000000..5d73e3f51 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchpagination.md @@ -0,0 +1,9 @@ +# SearchPagination + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `from_` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `size` | *Optional[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchsorting.md b/workflows_execution/docs/models/shared/searchsorting.md new file mode 100755 index 000000000..b5eb3304b --- /dev/null +++ b/workflows_execution/docs/models/shared/searchsorting.md @@ -0,0 +1,13 @@ +# SearchSorting + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `A_Z` | A_Z | +| `Z_A` | Z_A | +| `DUE_DATE_ASC` | DUE_DATE_ASC | +| `DUE_DATE_DESC` | DUE_DATE_DESC | +| `TRIGGER_DATE_ASC` | TRIGGER_DATE_ASC | +| `TRIGGER_DATE_DESC` | TRIGGER_DATE_DESC | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchstepsreq.md b/workflows_execution/docs/models/shared/searchstepsreq.md new file mode 100755 index 000000000..795934b29 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchstepsreq.md @@ -0,0 +1,15 @@ +# SearchStepsReq + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `assigned_to` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `execution_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `include_done_workflows` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `manually_created` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `pagination` | [Optional[SearchPagination]](../../models/shared/searchpagination.md) | :heavy_minus_sign: | N/A | +| `sorting` | [Optional[SearchSorting]](../../models/shared/searchsorting.md) | :heavy_minus_sign: | N/A | +| `status` | [Optional[SearchStepsReqStatus]](../../models/shared/searchstepsreqstatus.md) | :heavy_minus_sign: | N/A | +| `step_name` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchstepsreqstatus.md b/workflows_execution/docs/models/shared/searchstepsreqstatus.md new file mode 100755 index 000000000..2d3c98fc3 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchstepsreqstatus.md @@ -0,0 +1,10 @@ +# SearchStepsReqStatus + + +## Values + +| Name | Value | +| ---------------------------- | ---------------------------- | +| `OPEN` | OPEN | +| `COMPLETE` | COMPLETE | +| `NEXT_OPEN_ITEM_IN_WORKFLOW` | NEXT_OPEN_ITEM_IN_WORKFLOW | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/searchstepsresp.md b/workflows_execution/docs/models/shared/searchstepsresp.md new file mode 100755 index 000000000..9c2a65557 --- /dev/null +++ b/workflows_execution/docs/models/shared/searchstepsresp.md @@ -0,0 +1,9 @@ +# SearchStepsResp + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `hits` | *Optional[float]* | :heavy_minus_sign: | N/A | 50 | +| `results` | List[[StepExtended](../../models/shared/stepextended.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/section.md b/workflows_execution/docs/models/shared/section.md new file mode 100755 index 000000000..b10d5179e --- /dev/null +++ b/workflows_execution/docs/models/shared/section.md @@ -0,0 +1,19 @@ +# Section + +A group of Steps that define the progress of the Workflow + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `id` | *str* | :heavy_check_mark: | N/A | | +| `name` | *str* | :heavy_check_mark: | Name for this Section | Lead Qualification | +| `started_time` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `status` | [Optional[SectionStatus]](../../models/shared/sectionstatus.md) | :heavy_minus_sign: | N/A | | +| `steps` | List[[Step](../../models/shared/step.md)] | :heavy_check_mark: | N/A | | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | | +| ~~`user_ids`~~ | List[*float*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. Please use assignedTo | | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/sectionsimplified.md b/workflows_execution/docs/models/shared/sectionsimplified.md new file mode 100755 index 000000000..b811bf334 --- /dev/null +++ b/workflows_execution/docs/models/shared/sectionsimplified.md @@ -0,0 +1,14 @@ +# SectionSimplified + +A group of Steps that define the progress of the Workflow + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `id` | *str* | :heavy_check_mark: | N/A | | +| `name` | *str* | :heavy_check_mark: | Name for this Section | Lead Qualification | +| `steps` | List[[StepSimplified](../../models/shared/stepsimplified.md)] | :heavy_check_mark: | N/A | | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/sectionstatus.md b/workflows_execution/docs/models/shared/sectionstatus.md new file mode 100755 index 000000000..0b0b2fb0f --- /dev/null +++ b/workflows_execution/docs/models/shared/sectionstatus.md @@ -0,0 +1,10 @@ +# SectionStatus + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `OPEN` | OPEN | +| `IN_PROGRESS` | IN_PROGRESS | +| `COMPLETED` | COMPLETED | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/security.md b/workflows_execution/docs/models/shared/security.md new file mode 100755 index 000000000..83ee1f8f9 --- /dev/null +++ b/workflows_execution/docs/models/shared/security.md @@ -0,0 +1,8 @@ +# Security + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `bearer_auth` | *str* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/step.md b/workflows_execution/docs/models/shared/step.md new file mode 100755 index 000000000..769b4b790 --- /dev/null +++ b/workflows_execution/docs/models/shared/step.md @@ -0,0 +1,32 @@ +# Step + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `assigned_to_in_progress` | *Optional[str]* | :heavy_minus_sign: | The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task | +| `automation_config` | [Optional[AutomationConfig]](../../models/shared/automationconfig.md) | :heavy_minus_sign: | Configuration for automation execution to run | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `created` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| `ecp` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `enabled` | *Optional[bool]* | :heavy_minus_sign: | enabled flag results from calculating the requirements | +| ~~`entity_ref_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. It will be soon removed. Please use only id. | +| `execution_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `execution_type` | [Optional[StepType]](../../models/shared/steptype.md) | :heavy_minus_sign: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `installer` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `journey` | [Optional[StepJourney]](../../models/shared/stepjourney.md) | :heavy_minus_sign: | N/A | +| `last_updated` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `manually_created` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `requirements` | List[[StepRequirement](../../models/shared/steprequirement.md)] | :heavy_minus_sign: | N/A | +| `section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `started_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[StepStatus]](../../models/shared/stepstatus.md) | :heavy_minus_sign: | N/A | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | +| ~~`user_ids`~~ | List[*float*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. Please use assignedTo | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/stepextended.md b/workflows_execution/docs/models/shared/stepextended.md new file mode 100755 index 000000000..57dac6b1c --- /dev/null +++ b/workflows_execution/docs/models/shared/stepextended.md @@ -0,0 +1,35 @@ +# StepExtended + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `assigned_to_in_progress` | *Optional[str]* | :heavy_minus_sign: | The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task | +| `automation_config` | [Optional[AutomationConfig]](../../models/shared/automationconfig.md) | :heavy_minus_sign: | Configuration for automation execution to run | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `contexts` | List[[WorkflowContext](../../models/shared/workflowcontext.md)] | :heavy_minus_sign: | N/A | +| `created` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| `ecp` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `enabled` | *Optional[bool]* | :heavy_minus_sign: | enabled flag results from calculating the requirements | +| ~~`entity_ref_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. It will be soon removed. Please use only id. | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `execution_name` | *str* | :heavy_check_mark: | N/A | +| `execution_status` | [WorkflowStatus](../../models/shared/workflowstatus.md) | :heavy_check_mark: | N/A | +| `execution_type` | [Optional[StepType]](../../models/shared/steptype.md) | :heavy_minus_sign: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `installer` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `journey` | [Optional[StepJourney]](../../models/shared/stepjourney.md) | :heavy_minus_sign: | N/A | +| `last_updated` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `manually_created` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `requirements` | List[[StepRequirement](../../models/shared/steprequirement.md)] | :heavy_minus_sign: | N/A | +| `section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `started_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[StepStatus]](../../models/shared/stepstatus.md) | :heavy_minus_sign: | N/A | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | +| ~~`user_ids`~~ | List[*float*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. Please use assignedTo | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/stepid.md b/workflows_execution/docs/models/shared/stepid.md new file mode 100755 index 000000000..27e78872a --- /dev/null +++ b/workflows_execution/docs/models/shared/stepid.md @@ -0,0 +1,9 @@ +# StepID + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ~~`entity_ref_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. It will be soon removed. Please use only id. | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/stepjourney.md b/workflows_execution/docs/models/shared/stepjourney.md new file mode 100755 index 000000000..03111fed3 --- /dev/null +++ b/workflows_execution/docs/models/shared/stepjourney.md @@ -0,0 +1,10 @@ +# StepJourney + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `journey_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/steppositionat.md b/workflows_execution/docs/models/shared/steppositionat.md new file mode 100755 index 000000000..fba911e9e --- /dev/null +++ b/workflows_execution/docs/models/shared/steppositionat.md @@ -0,0 +1,9 @@ +# StepPositionAt + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `index` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `section_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/steprequirement.md b/workflows_execution/docs/models/shared/steprequirement.md new file mode 100755 index 000000000..446f8cf98 --- /dev/null +++ b/workflows_execution/docs/models/shared/steprequirement.md @@ -0,0 +1,12 @@ +# StepRequirement + +describe the requirement for step enablement + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `condition` | [StepRequirementCondition](../../models/shared/steprequirementcondition.md) | :heavy_check_mark: | N/A | +| `definition_id` | *str* | :heavy_check_mark: | N/A | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/steprequirementcondition.md b/workflows_execution/docs/models/shared/steprequirementcondition.md new file mode 100755 index 000000000..c34adc7d8 --- /dev/null +++ b/workflows_execution/docs/models/shared/steprequirementcondition.md @@ -0,0 +1,8 @@ +# StepRequirementCondition + + +## Values + +| Name | Value | +| -------- | -------- | +| `CLOSED` | CLOSED | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/stepsimplified.md b/workflows_execution/docs/models/shared/stepsimplified.md new file mode 100755 index 000000000..08ed23047 --- /dev/null +++ b/workflows_execution/docs/models/shared/stepsimplified.md @@ -0,0 +1,17 @@ +# StepSimplified + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `ecp` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| ~~`entity_ref_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. It will be soon removed. Please use only id. | +| `execution_type` | [Optional[StepType]](../../models/shared/steptype.md) | :heavy_minus_sign: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `installer` | [Optional[ECPDetails]](../../models/shared/ecpdetails.md) | :heavy_minus_sign: | Details regarding ECP for the workflow step | +| `name` | *str* | :heavy_check_mark: | N/A | +| `requirements` | List[[StepRequirement](../../models/shared/steprequirement.md)] | :heavy_minus_sign: | N/A | +| `type` | [ItemType](../../models/shared/itemtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/stepstatus.md b/workflows_execution/docs/models/shared/stepstatus.md new file mode 100755 index 000000000..70afef34b --- /dev/null +++ b/workflows_execution/docs/models/shared/stepstatus.md @@ -0,0 +1,12 @@ +# StepStatus + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `UNASSIGNED` | UNASSIGNED | +| `ASSIGNED` | ASSIGNED | +| `COMPLETED` | COMPLETED | +| `SKIPPED` | SKIPPED | +| `IN_PROGRESS` | IN_PROGRESS | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/steptype.md b/workflows_execution/docs/models/shared/steptype.md new file mode 100755 index 000000000..c52f47ba5 --- /dev/null +++ b/workflows_execution/docs/models/shared/steptype.md @@ -0,0 +1,9 @@ +# StepType + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `MANUAL` | MANUAL | +| `AUTOMATION` | AUTOMATION | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/triggertype.md b/workflows_execution/docs/models/shared/triggertype.md new file mode 100755 index 000000000..88f101c4a --- /dev/null +++ b/workflows_execution/docs/models/shared/triggertype.md @@ -0,0 +1,9 @@ +# TriggerType + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `MANUAL` | MANUAL | +| `AUTOMATIC` | AUTOMATIC | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/updateentityattributes.md b/workflows_execution/docs/models/shared/updateentityattributes.md new file mode 100755 index 000000000..96c330966 --- /dev/null +++ b/workflows_execution/docs/models/shared/updateentityattributes.md @@ -0,0 +1,9 @@ +# UpdateEntityAttributes + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `source` | [UpdateEntityAttributesSource](../../models/shared/updateentityattributessource.md) | :heavy_check_mark: | N/A | +| `target` | [UpdateEntityAttributesTarget](../../models/shared/updateentityattributestarget.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/updateentityattributessource.md b/workflows_execution/docs/models/shared/updateentityattributessource.md new file mode 100755 index 000000000..9ffef4274 --- /dev/null +++ b/workflows_execution/docs/models/shared/updateentityattributessource.md @@ -0,0 +1,10 @@ +# UpdateEntityAttributesSource + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `WORKFLOW_STATUS` | workflow_status | +| `CURRENT_SECTION` | current_section | +| `CURRENT_STEP` | current_step | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/updateentityattributestarget.md b/workflows_execution/docs/models/shared/updateentityattributestarget.md new file mode 100755 index 000000000..fa35f003c --- /dev/null +++ b/workflows_execution/docs/models/shared/updateentityattributestarget.md @@ -0,0 +1,9 @@ +# UpdateEntityAttributesTarget + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `entity_attribute` | *str* | :heavy_check_mark: | N/A | my_status | +| `entity_schema` | *str* | :heavy_check_mark: | N/A | opportunity | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/updatestepreq.md b/workflows_execution/docs/models/shared/updatestepreq.md new file mode 100755 index 000000000..dcd81d069 --- /dev/null +++ b/workflows_execution/docs/models/shared/updatestepreq.md @@ -0,0 +1,20 @@ +# UpdateStepReq + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `assigned_to_in_progress` | *Optional[str]* | :heavy_minus_sign: | The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task | +| `automation_config` | [Optional[AutomationConfig]](../../models/shared/automationconfig.md) | :heavy_minus_sign: | Configuration for automation execution to run | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| ~~`entity_ref_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. Please use stepId | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `position` | [Optional[StepPositionAt]](../../models/shared/steppositionat.md) | :heavy_minus_sign: | N/A | +| `started_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[StepStatus]](../../models/shared/stepstatus.md) | :heavy_minus_sign: | N/A | +| `step_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| ~~`user_ids`~~ | List[*float*] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This field is deprecated. Please use assignedTo | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowcontext.md b/workflows_execution/docs/models/shared/workflowcontext.md new file mode 100755 index 000000000..ec9e38e44 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowcontext.md @@ -0,0 +1,10 @@ +# WorkflowContext + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `schema` | *str* | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowexecution.md b/workflows_execution/docs/models/shared/workflowexecution.md new file mode 100755 index 000000000..1fcb1acc4 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecution.md @@ -0,0 +1,29 @@ +# WorkflowExecution + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `closing_reason_description` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | Completed time of the workflow execution | +| `configured_closing_reason_snapshot` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | +| `contexts` | List[[WorkflowContext](../../models/shared/workflowcontext.md)] | :heavy_minus_sign: | N/A | +| `creation_time` | *Optional[str]* | :heavy_minus_sign: | Creation timestamp which will double as started time as well | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | Due date for finishing the workflow | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| `enable_ecp_workflow` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether this workflow is available for End Customer Portal or not. By default it's not. | +| `flow` | List[[Union[Section, Step]](../../models/shared/workflowexecutionflow.md)] | :heavy_check_mark: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_modified_by` | *Optional[str]* | :heavy_minus_sign: | Id of the user who closed workflow | +| `last_update_time` | *Optional[str]* | :heavy_minus_sign: | Last Update timestamp | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `next_open_step` | [Optional[StepID]](../../models/shared/stepid.md) | :heavy_minus_sign: | N/A | +| `org_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `selected_closing_reasons` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | +| `status` | [Optional[WorkflowStatus]](../../models/shared/workflowstatus.md) | :heavy_minus_sign: | N/A | +| `trigger` | [Optional[TriggerType]](../../models/shared/triggertype.md) | :heavy_minus_sign: | N/A | +| `update_entity_attributes` | List[[UpdateEntityAttributes](../../models/shared/updateentityattributes.md)] | :heavy_minus_sign: | N/A | +| `version` | *Optional[int]* | :heavy_minus_sign: | Version of the workflow execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowexecutioncreatereq.md b/workflows_execution/docs/models/shared/workflowexecutioncreatereq.md new file mode 100755 index 000000000..0676325fb --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecutioncreatereq.md @@ -0,0 +1,11 @@ +# WorkflowExecutionCreateReq + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `contexts` | List[[WorkflowContext](../../models/shared/workflowcontext.md)] | :heavy_minus_sign: | N/A | +| `trigger` | [Optional[TriggerType]](../../models/shared/triggertype.md) | :heavy_minus_sign: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowexecutionflow.md b/workflows_execution/docs/models/shared/workflowexecutionflow.md new file mode 100755 index 000000000..98333b192 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecutionflow.md @@ -0,0 +1,17 @@ +# WorkflowExecutionFlow + + +## Supported Types + +### Section + +```python +workflowExecutionFlow: shared.Section = /* values here */ +``` + +### Step + +```python +workflowExecutionFlow: shared.Step = /* values here */ +``` + diff --git a/workflows_execution/docs/models/shared/workflowexecutionslim.md b/workflows_execution/docs/models/shared/workflowexecutionslim.md new file mode 100755 index 000000000..8bf9d2854 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecutionslim.md @@ -0,0 +1,29 @@ +# WorkflowExecutionSlim + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `closing_reason_description` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | Completed time of the workflow execution | +| `configured_closing_reason_snapshot` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | +| `contexts` | List[[WorkflowContext](../../models/shared/workflowcontext.md)] | :heavy_minus_sign: | N/A | +| `creation_time` | *Optional[str]* | :heavy_minus_sign: | Creation timestamp which will double as started time as well | +| `definition_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | Due date for finishing the workflow | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| `enable_ecp_workflow` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether this workflow is available for End Customer Portal or not. By default it's not. | +| `flow` | List[[Union[SectionSimplified, StepSimplified]](../../models/shared/workflowexecutionslimflow.md)] | :heavy_check_mark: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_modified_by` | *Optional[str]* | :heavy_minus_sign: | Id of the user who closed workflow | +| `last_update_time` | *Optional[str]* | :heavy_minus_sign: | Last Update timestamp | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `next_open_step` | [Optional[StepID]](../../models/shared/stepid.md) | :heavy_minus_sign: | N/A | +| `org_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `selected_closing_reasons` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | +| `status` | [Optional[WorkflowStatus]](../../models/shared/workflowstatus.md) | :heavy_minus_sign: | N/A | +| `trigger` | [Optional[TriggerType]](../../models/shared/triggertype.md) | :heavy_minus_sign: | N/A | +| `update_entity_attributes` | List[[UpdateEntityAttributes](../../models/shared/updateentityattributes.md)] | :heavy_minus_sign: | N/A | +| `version` | *Optional[int]* | :heavy_minus_sign: | Version of the workflow execution | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowexecutionslimflow.md b/workflows_execution/docs/models/shared/workflowexecutionslimflow.md new file mode 100755 index 000000000..72a110645 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecutionslimflow.md @@ -0,0 +1,17 @@ +# WorkflowExecutionSlimFlow + + +## Supported Types + +### SectionSimplified + +```python +workflowExecutionSlimFlow: shared.SectionSimplified = /* values here */ +``` + +### StepSimplified + +```python +workflowExecutionSlimFlow: shared.StepSimplified = /* values here */ +``` + diff --git a/workflows_execution/docs/models/shared/workflowexecutionupdatereq.md b/workflows_execution/docs/models/shared/workflowexecutionupdatereq.md new file mode 100755 index 000000000..494cbe4e6 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowexecutionupdatereq.md @@ -0,0 +1,16 @@ +# WorkflowExecutionUpdateReq + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | +| `closed_by` | *Optional[str]* | :heavy_minus_sign: | id of the user / partner user who is closing the workflow. For partner pass orgId_userId. | +| `closing_reason_description` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `completed_time` | *Optional[str]* | :heavy_minus_sign: | Completed time of the workflow execution | +| `contexts` | List[[WorkflowContext](../../models/shared/workflowcontext.md)] | :heavy_minus_sign: | N/A | +| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `dynamic_due_date` | [Optional[DynamicDueDate]](../../models/shared/dynamicduedate.md) | :heavy_minus_sign: | set a Duedate for a step then a specific | +| `selected_closing_reasons` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_minus_sign: | N/A | +| `status` | [Optional[WorkflowStatus]](../../models/shared/workflowstatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/workflows_execution/docs/models/shared/workflowstatus.md b/workflows_execution/docs/models/shared/workflowstatus.md new file mode 100755 index 000000000..4497b92f2 --- /dev/null +++ b/workflows_execution/docs/models/shared/workflowstatus.md @@ -0,0 +1,10 @@ +# WorkflowStatus + + +## Values + +| Name | Value | +| --------- | --------- | +| `STARTED` | STARTED | +| `DONE` | DONE | +| `CLOSED` | CLOSED | \ No newline at end of file diff --git a/workflows_execution/docs/sdks/epilot/README.md b/workflows_execution/docs/sdks/epilot/README.md new file mode 100755 index 000000000..652e748a1 --- /dev/null +++ b/workflows_execution/docs/sdks/epilot/README.md @@ -0,0 +1,10 @@ +# Epilot SDK + + +## Overview + +Workflows Executions: Service for Workflow Executions which covers executions of processes defined in an Organization + + +### Available Operations + diff --git a/workflows_execution/docs/sdks/workflows/README.md b/workflows_execution/docs/sdks/workflows/README.md new file mode 100755 index 000000000..81bb2e622 --- /dev/null +++ b/workflows_execution/docs/sdks/workflows/README.md @@ -0,0 +1,508 @@ +# Workflows +(*workflows*) + +## Overview + +Interact with workflow executions - start / close / retrieve one or all / search / delete + +### Available Operations + +* [create_execution](#create_execution) - createExecution +* [create_step](#create_step) - createStep +* [delete_execution](#delete_execution) - deleteExecution +* [delete_step](#delete_step) - deleteStep +* [get_closing_reason_execution](#get_closing_reason_execution) - getClosingReasonExecution +* [get_execution](#get_execution) - getExecution +* [get_executions](#get_executions) - getExecutions +* [search_executions](#search_executions) - searchExecutions +* [~~search_steps~~](#search_steps) - searchSteps :warning: **Deprecated** +* [update_execution](#update_execution) - updateExecution +* [update_step](#update_step) - updateStep + +## create_execution + +Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template). + +### Example Usage + +```python +import epilot +from epilot.models import shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = shared.WorkflowExecutionCreateReq( + assigned_to=[ + 'string', + ], + contexts=[ + shared.WorkflowContext( + id='', + schema='string', + title='string', + ), + ], + workflow_id='string', +) + +res = s.workflows.create_execution(req) + +if res.workflow_execution is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [shared.WorkflowExecutionCreateReq](../../models/shared/workflowexecutioncreatereq.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.CreateExecutionResponse](../../models/operations/createexecutionresponse.md)** + + +## create_step + +Create a new step in current workflow execution. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.CreateStepRequest( + create_step_req=shared.CreateStepReq( + automation_config=shared.AutomationConfig( + flow_id='string', + ), + name='string', + ), + execution_id='string', +) + +res = s.workflows.create_step(req) + +if res.step is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `request` | [operations.CreateStepRequest](../../models/operations/createsteprequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.CreateStepResponse](../../models/operations/createstepresponse.md)** + + +## delete_execution + +Delete workflow execution by id. Workflow contexts will NOT be deleted. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.DeleteExecutionRequest( + execution_id='string', +) + +res = s.workflows.delete_execution(req) + +if res.status_code == 200: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteExecutionRequest](../../models/operations/deleteexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.DeleteExecutionResponse](../../models/operations/deleteexecutionresponse.md)** + + +## delete_step + +Deletes a step from a workflow execution. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.DeleteStepRequest( + execution_id='string', + step_id='string', +) + +res = s.workflows.delete_step(req) + +if res.status_code == 200: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `request` | [operations.DeleteStepRequest](../../models/operations/deletesteprequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.DeleteStepResponse](../../models/operations/deletestepresponse.md)** + + +## get_closing_reason_execution + +Shows all Closing Reasons defined at the moment of starting the Workflow Execution. +The Closing Reasons shown in the execution are just snapshots +from the state of the Definition when the instance was created. + + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.GetClosingReasonExecutionRequest( + execution_id='string', +) + +res = s.workflows.get_closing_reason_execution(req) + +if res.closing_reason_resp is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `request` | [operations.GetClosingReasonExecutionRequest](../../models/operations/getclosingreasonexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.GetClosingReasonExecutionResponse](../../models/operations/getclosingreasonexecutionresponse.md)** + + +## get_execution + +Get a full workflow execution, included steps information, by execution id. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.GetExecutionRequest( + execution_id='string', +) + +res = s.workflows.get_execution(req) + +if res.workflow_execution is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `request` | [operations.GetExecutionRequest](../../models/operations/getexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.GetExecutionResponse](../../models/operations/getexecutionresponse.md)** + + +## get_executions + +Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.GetExecutionsRequest() + +res = s.workflows.get_executions(req) + +if res.workflow_execution_slims is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `request` | [operations.GetExecutionsRequest](../../models/operations/getexecutionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.GetExecutionsResponse](../../models/operations/getexecutionsresponse.md)** + + +## search_executions + +Search Workflow Executions by different filters. + +### Example Usage + +```python +import epilot +from epilot.models import shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = shared.SearchExecutionsReq( + pagination=shared.ExecutionPaginationDynamo(), +) + +res = s.workflows.search_executions(req) + +if res.search_executions_resp is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `request` | [shared.SearchExecutionsReq](../../models/shared/searchexecutionsreq.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.SearchExecutionsResponse](../../models/operations/searchexecutionsresponse.md)** + + +## ~~search_steps~~ + +Search workflow execution steps by different filters. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```python +import epilot +from epilot.models import shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = shared.SearchStepsReq( + pagination=shared.SearchPagination(), +) + +res = s.workflows.search_steps(req) + +if res.search_steps_resp is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `request` | [shared.SearchStepsReq](../../models/shared/searchstepsreq.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.SearchStepsResponse](../../models/operations/searchstepsresponse.md)** + + +## update_execution + +Patches updates like assignees, status, closingReason for a single Workflow Execution. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.UpdateExecutionRequest( + workflow_execution_update_req=shared.WorkflowExecutionUpdateReq( + assigned_to=[ + 'string', + ], + contexts=[ + shared.WorkflowContext( + id='', + schema='string', + title='string', + ), + ], + dynamic_due_date=shared.DynamicDueDate( + number_of_units=1932.48, + time_period=shared.DynamicDueDateTimePeriod.WEEKS, + ), + selected_closing_reasons=[ + shared.ClosingReason( + id='', + title='string', + ), + ], + ), + execution_id='string', +) + +res = s.workflows.update_execution(req) + +if res.status_code == 200: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.UpdateExecutionRequest](../../models/operations/updateexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.UpdateExecutionResponse](../../models/operations/updateexecutionresponse.md)** + + +## update_step + +Patches various changes to a workflow execution step. + +### Example Usage + +```python +import epilot +from epilot.models import operations, shared + +s = epilot.Epilot( + security=shared.Security( + bearer_auth="", + ), +) + +req = operations.UpdateStepRequest( + update_step_req=shared.UpdateStepReq( + assigned_to=[ + 'string', + ], + automation_config=shared.AutomationConfig( + flow_id='string', + ), + dynamic_due_date=shared.DynamicDueDate( + number_of_units=444.49, + time_period=shared.DynamicDueDateTimePeriod.WEEKS, + ), + position=shared.StepPositionAt(), + user_ids=[ + 9439.44, + ], + ), + execution_id='string', + step_id='string', +) + +res = s.workflows.update_step(req) + +if res.step is not None: + # handle response + pass +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `request` | [operations.UpdateStepRequest](../../models/operations/updatesteprequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[operations.UpdateStepResponse](../../models/operations/updatestepresponse.md)** + diff --git a/workflows_execution/files.gen b/workflows_execution/files.gen index 2416ebd66..7deb89b71 100755 --- a/workflows_execution/files.gen +++ b/workflows_execution/files.gen @@ -1,9 +1,11 @@ +src/epilot/sdkconfiguration.py src/epilot/workflows.py src/epilot/sdk.py pylintrc setup.py src/epilot/__init__.py src/epilot/models/__init__.py +src/epilot/models/errors/sdkerror.py src/epilot/utils/__init__.py src/epilot/utils/retries.py src/epilot/utils/utils.py @@ -21,19 +23,21 @@ src/epilot/models/operations/updatestep.py src/epilot/models/operations/__init__.py src/epilot/models/shared/workflowexecution.py src/epilot/models/shared/updateentityattributes.py -src/epilot/models/shared/triggertype_enum.py -src/epilot/models/shared/workflowstatus_enum.py +src/epilot/models/shared/triggertype.py +src/epilot/models/shared/workflowstatus.py src/epilot/models/shared/closingreason.py src/epilot/models/shared/stepid.py src/epilot/models/shared/section.py -src/epilot/models/shared/itemtype_enum.py +src/epilot/models/shared/itemtype.py src/epilot/models/shared/step.py -src/epilot/models/shared/stepstatus_enum.py +src/epilot/models/shared/stepstatus.py src/epilot/models/shared/steprequirement.py -src/epilot/models/shared/steptype_enum.py +src/epilot/models/shared/stepjourney.py src/epilot/models/shared/ecpdetails.py +src/epilot/models/shared/steptype.py src/epilot/models/shared/dynamicduedate.py src/epilot/models/shared/automationconfig.py +src/epilot/models/shared/sectionstatus.py src/epilot/models/shared/workflowcontext.py src/epilot/models/shared/errorresp.py src/epilot/models/shared/workflowexecutioncreatereq.py @@ -45,7 +49,7 @@ src/epilot/models/shared/stepsimplified.py src/epilot/models/shared/searchexecutionsresp.py src/epilot/models/shared/lastevaluatedkey.py src/epilot/models/shared/searchexecutionsreq.py -src/epilot/models/shared/searchsorting_enum.py +src/epilot/models/shared/searchsorting.py src/epilot/models/shared/executionpaginationdynamo.py src/epilot/models/shared/searchstepsresp.py src/epilot/models/shared/stepextended.py @@ -56,4 +60,73 @@ src/epilot/models/shared/updatestepreq.py src/epilot/models/shared/steppositionat.py src/epilot/models/shared/security.py src/epilot/models/shared/__init__.py -USAGE.md \ No newline at end of file +src/epilot/models/errors/__init__.py +USAGE.md +docs/models/operations/createexecutionresponse.md +docs/models/operations/createsteprequest.md +docs/models/operations/createstepresponse.md +docs/models/operations/deleteexecutionrequest.md +docs/models/operations/deleteexecutionresponse.md +docs/models/operations/deletesteprequest.md +docs/models/operations/deletestepresponse.md +docs/models/operations/getclosingreasonexecutionrequest.md +docs/models/operations/getclosingreasonexecutionresponse.md +docs/models/operations/getexecutionrequest.md +docs/models/operations/getexecutionresponse.md +docs/models/operations/getexecutionsrequest.md +docs/models/operations/getexecutionsresponse.md +docs/models/operations/searchexecutionsresponse.md +docs/models/operations/searchstepsresponse.md +docs/models/operations/updateexecutionrequest.md +docs/models/operations/updateexecutionresponse.md +docs/models/operations/updatesteprequest.md +docs/models/operations/updatestepresponse.md +docs/models/shared/workflowexecutionflow.md +docs/models/shared/workflowexecution.md +docs/models/shared/updateentityattributessource.md +docs/models/shared/updateentityattributestarget.md +docs/models/shared/updateentityattributes.md +docs/models/shared/triggertype.md +docs/models/shared/workflowstatus.md +docs/models/shared/closingreason.md +docs/models/shared/stepid.md +docs/models/shared/section.md +docs/models/shared/itemtype.md +docs/models/shared/step.md +docs/models/shared/stepstatus.md +docs/models/shared/steprequirementcondition.md +docs/models/shared/steprequirement.md +docs/models/shared/stepjourney.md +docs/models/shared/ecpdetails.md +docs/models/shared/steptype.md +docs/models/shared/dynamicduedateactiontypecondition.md +docs/models/shared/dynamicduedatetimeperiod.md +docs/models/shared/dynamicduedate.md +docs/models/shared/automationconfig.md +docs/models/shared/sectionstatus.md +docs/models/shared/workflowcontext.md +docs/models/shared/errorresp.md +docs/models/shared/workflowexecutioncreatereq.md +docs/models/shared/createstepreq.md +docs/models/shared/closingreasonresp.md +docs/models/shared/workflowexecutionslimflow.md +docs/models/shared/workflowexecutionslim.md +docs/models/shared/sectionsimplified.md +docs/models/shared/stepsimplified.md +docs/models/shared/searchexecutionsresp.md +docs/models/shared/lastevaluatedkey.md +docs/models/shared/searchexecutionsreq.md +docs/models/shared/searchsorting.md +docs/models/shared/executionpaginationdynamo.md +docs/models/shared/searchstepsresp.md +docs/models/shared/stepextended.md +docs/models/shared/searchstepsreqstatus.md +docs/models/shared/searchstepsreq.md +docs/models/shared/searchpagination.md +docs/models/shared/workflowexecutionupdatereq.md +docs/models/shared/updatestepreq.md +docs/models/shared/steppositionat.md +docs/models/shared/security.md +docs/sdks/epilot/README.md +docs/sdks/workflows/README.md +.gitattributes \ No newline at end of file diff --git a/workflows_execution/gen.yaml b/workflows_execution/gen.yaml index 9a0c61350..a2fe86bae 100644 --- a/workflows_execution/gen.yaml +++ b/workflows_execution/gen.yaml @@ -1,16 +1,26 @@ configVersion: 1.0.0 management: - docChecksum: 1aa929c361245dd2b795156709743b6a + docChecksum: 4111adf1684fd3890f128a4a6df2a55c docVersion: 1.0.0 - speakeasyVersion: 1.19.2 - generationVersion: 2.16.5 + speakeasyVersion: 1.109.0 + generationVersion: 2.173.0 generation: - telemetryEnabled: false + repoURL: https://github.com/epilot-dev/sdk-python.git sdkClassName: epilot - sdkFlattening: true singleTagPerOp: false + telemetryEnabled: false +features: + python: + core: 3.3.1 + deprecations: 2.81.1 + globalSecurity: 2.82.0 + globalServerURLs: 2.82.0 python: - version: 1.2.2 + version: 2.1.1 author: epilot description: Python Client SDK for Epilot + flattenGlobalSecurity: false + installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=workflows_execution + maxMethodParams: 0 packageName: epilot-workflows-execution + repoSubDirectory: workflows_execution diff --git a/workflows_execution/pylintrc b/workflows_execution/pylintrc index 79b8008d0..1ed32214e 100755 --- a/workflows_execution/pylintrc +++ b/workflows_execution/pylintrc @@ -88,7 +88,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.8 # Discover python modules and packages in the file system subtree. recursive=no @@ -116,20 +116,15 @@ argument-naming-style=snake_case #argument-rgx= # Naming style matching correct attribute names. -attr-naming-style=snake_case +#attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. If left empty, attribute names will be checked with the set naming # style. -#attr-rgx= +attr-rgx=[^\W\d][^\W]*|__.*__$ # Bad variable names which should always be refused, separated by a comma. -bad-names=foo, - bar, - baz, - toto, - tutu, - tata +bad-names= # Bad variable names regexes, separated by a comma. If names match any regex, # they will always be refused @@ -439,7 +434,13 @@ disable=raw-checker-failed, trailing-newlines, too-many-public-methods, too-many-locals, - too-many-lines + too-many-lines, + using-constant-test, + too-many-statements, + cyclic-import, + too-many-nested-blocks, + too-many-boolean-expressions, + no-else-raise # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -620,7 +621,7 @@ additional-builtins= allow-global-unused-variables=yes # List of names allowed to shadow builtins -allowed-redefined-builtins= +allowed-redefined-builtins=id,object # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. diff --git a/workflows_execution/setup.py b/workflows_execution/setup.py index 363f28101..913ff0fd7 100755 --- a/workflows_execution/setup.py +++ b/workflows_execution/setup.py @@ -10,30 +10,31 @@ setuptools.setup( name="epilot-workflows-execution", - version="1.2.2", + version="2.1.1", author="epilot", description="Python Client SDK for Epilot", long_description=long_description, long_description_content_type="text/markdown", packages=setuptools.find_packages(where="src"), install_requires=[ - "certifi==2022.12.07", - "charset-normalizer==2.1.1", - "dataclasses-json-speakeasy==0.5.8", - "idna==3.3", - "marshmallow==3.17.1", - "marshmallow-enum==1.5.1", - "mypy-extensions==0.4.3", - "packaging==21.3", - "pyparsing==3.0.9", - "python-dateutil==2.8.2", - "requests==2.28.1", - "six==1.16.0", - "typing-inspect==0.8.0", - "typing_extensions==4.3.0", - "urllib3==1.26.12", - "pylint==2.16.2", + "certifi>=2023.7.22", + "charset-normalizer>=3.2.0", + "dataclasses-json>=0.6.1", + "idna>=3.4", + "jsonpath-python>=1.0.6 ", + "marshmallow>=3.19.0", + "mypy-extensions>=1.0.0", + "packaging>=23.1", + "python-dateutil>=2.8.2", + "requests>=2.31.0", + "six>=1.16.0", + "typing-inspect>=0.9.0", + "typing_extensions>=4.7.1", + "urllib3>=2.0.4", ], + extras_require={ + "dev":["pylint==2.16.2"] + }, package_dir={'': 'src'}, - python_requires='>=3.9' + python_requires='>=3.8' ) diff --git a/workflows_execution/src/epilot/__init__.py b/workflows_execution/src/epilot/__init__.py index b9e232018..e6c0deeb6 100755 --- a/workflows_execution/src/epilot/__init__.py +++ b/workflows_execution/src/epilot/__init__.py @@ -1,3 +1,4 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" from .sdk import * +from .sdkconfiguration import * diff --git a/workflows_execution/src/epilot/models/__init__.py b/workflows_execution/src/epilot/models/__init__.py index 889f8adcf..36628d6cc 100755 --- a/workflows_execution/src/epilot/models/__init__.py +++ b/workflows_execution/src/epilot/models/__init__.py @@ -1,2 +1,3 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" +# __init__.py diff --git a/workflows_execution/src/epilot/models/errors/__init__.py b/workflows_execution/src/epilot/models/errors/__init__.py new file mode 100755 index 000000000..cfd848441 --- /dev/null +++ b/workflows_execution/src/epilot/models/errors/__init__.py @@ -0,0 +1,4 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from .sdkerror import SDKError +__all__ = ["SDKError"] diff --git a/workflows_execution/src/epilot/models/errors/sdkerror.py b/workflows_execution/src/epilot/models/errors/sdkerror.py new file mode 100755 index 000000000..6bb02bbd6 --- /dev/null +++ b/workflows_execution/src/epilot/models/errors/sdkerror.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +import requests as requests_http + + +class SDKError(Exception): + """Represents an error returned by the API.""" + message: str + status_code: int + body: str + raw_response: requests_http.Response + + def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response): + self.message = message + self.status_code = status_code + self.body = body + self.raw_response = raw_response + + def __str__(self): + body = '' + if len(self.body) > 0: + body = f'\n{self.body}' + + return f'{self.message}: Status {self.status_code}{body}' diff --git a/workflows_execution/src/epilot/models/operations/createexecution.py b/workflows_execution/src/epilot/models/operations/createexecution.py index f6768584b..af1becec4 100755 --- a/workflows_execution/src/epilot/models/operations/createexecution.py +++ b/workflows_execution/src/epilot/models/operations/createexecution.py @@ -10,12 +10,15 @@ @dataclasses.dataclass class CreateExecutionResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Validation Errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Validation Errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" workflow_execution: Optional[shared_workflowexecution.WorkflowExecution] = dataclasses.field(default=None) - r"""Success - if the execution is created successfully""" - \ No newline at end of file + r"""Success - if the execution is created successfully""" + + diff --git a/workflows_execution/src/epilot/models/operations/createstep.py b/workflows_execution/src/epilot/models/operations/createstep.py index aa75f6faf..8a83f4fb1 100755 --- a/workflows_execution/src/epilot/models/operations/createstep.py +++ b/workflows_execution/src/epilot/models/operations/createstep.py @@ -11,21 +11,25 @@ @dataclasses.dataclass class CreateStepRequest: - create_step_req: shared_createstepreq.CreateStepReq = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }}) - r"""Workflow Execution Step payload""" + r"""Workflow Execution Step payload""" execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" + + @dataclasses.dataclass class CreateStepResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Validation Errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Validation Errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" step: Optional[shared_step.Step] = dataclasses.field(default=None) - r"""Success - if the step is created with success""" - \ No newline at end of file + r"""Success - if the step is created with success""" + + diff --git a/workflows_execution/src/epilot/models/operations/deleteexecution.py b/workflows_execution/src/epilot/models/operations/deleteexecution.py index cccd37ac2..592cc611f 100755 --- a/workflows_execution/src/epilot/models/operations/deleteexecution.py +++ b/workflows_execution/src/epilot/models/operations/deleteexecution.py @@ -9,17 +9,21 @@ @dataclasses.dataclass class DeleteExecutionRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution to de deleted.""" + r"""Id of the execution to de deleted.""" + + @dataclasses.dataclass class DeleteExecutionResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Failed to authenticate""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - \ No newline at end of file + r"""Failed to authenticate""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" + + diff --git a/workflows_execution/src/epilot/models/operations/deletestep.py b/workflows_execution/src/epilot/models/operations/deletestep.py index b13cd8cdb..8cced6d28 100755 --- a/workflows_execution/src/epilot/models/operations/deletestep.py +++ b/workflows_execution/src/epilot/models/operations/deletestep.py @@ -9,19 +9,23 @@ @dataclasses.dataclass class DeleteStepRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" step_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'stepId', 'style': 'simple', 'explode': False }}) - r"""Short uuid (length 6) to identify the Workflow Execution Step.""" + r"""Short uuid (length 6) to identify the Workflow Execution Step.""" + + @dataclasses.dataclass class DeleteStepResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Other errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - \ No newline at end of file + r"""Other errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" + + diff --git a/workflows_execution/src/epilot/models/operations/getclosingreasonexecution.py b/workflows_execution/src/epilot/models/operations/getclosingreasonexecution.py index dce2655f0..d1b45a9ae 100755 --- a/workflows_execution/src/epilot/models/operations/getclosingreasonexecution.py +++ b/workflows_execution/src/epilot/models/operations/getclosingreasonexecution.py @@ -10,19 +10,23 @@ @dataclasses.dataclass class GetClosingReasonExecutionRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" + + @dataclasses.dataclass class GetClosingReasonExecutionResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" closing_reason_resp: Optional[shared_closingreasonresp.ClosingReasonResp] = dataclasses.field(default=None) - r"""returns all Closing Reasons for this Execution""" + r"""returns all Closing Reasons for this Execution""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Internal Issues""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - \ No newline at end of file + r"""Internal Issues""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" + + diff --git a/workflows_execution/src/epilot/models/operations/getexecution.py b/workflows_execution/src/epilot/models/operations/getexecution.py index d0b7d40c1..ac545de17 100755 --- a/workflows_execution/src/epilot/models/operations/getexecution.py +++ b/workflows_execution/src/epilot/models/operations/getexecution.py @@ -10,19 +10,23 @@ @dataclasses.dataclass class GetExecutionRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" + + @dataclasses.dataclass class GetExecutionResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Other errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Other errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" workflow_execution: Optional[shared_workflowexecution.WorkflowExecution] = dataclasses.field(default=None) - r"""Success - execution loaded with success. Empty response execution was not found.""" - \ No newline at end of file + r"""Success - execution loaded with success. Empty response execution was not found.""" + + diff --git a/workflows_execution/src/epilot/models/operations/getexecutions.py b/workflows_execution/src/epilot/models/operations/getexecutions.py index 051a1d89c..f07b2c350 100755 --- a/workflows_execution/src/epilot/models/operations/getexecutions.py +++ b/workflows_execution/src/epilot/models/operations/getexecutions.py @@ -5,26 +5,30 @@ import requests as requests_http from ..shared import errorresp as shared_errorresp from ..shared import workflowexecutionslim as shared_workflowexecutionslim -from typing import Optional +from typing import List, Optional @dataclasses.dataclass class GetExecutionsRequest: - context: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'context', 'style': 'form', 'explode': True }}) - r"""Id of an Entity""" + r"""Id of an Entity""" schema: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'schema', 'style': 'form', 'explode': True }}) - r"""Schema of an Entity""" + r"""Schema of an Entity""" + + @dataclasses.dataclass class GetExecutionsResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Other errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - workflow_execution_slims: Optional[list[shared_workflowexecutionslim.WorkflowExecutionSlim]] = dataclasses.field(default=None) - r"""Success - executions loaded with success. Empty array if org has no executions.""" - \ No newline at end of file + r"""Other errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" + workflow_execution_slims: Optional[List[shared_workflowexecutionslim.WorkflowExecutionSlim]] = dataclasses.field(default=None) + r"""Success - executions loaded with success. Empty array if org has no executions.""" + + diff --git a/workflows_execution/src/epilot/models/operations/searchexecutions.py b/workflows_execution/src/epilot/models/operations/searchexecutions.py index 8bd5e8879..ab72d1a50 100755 --- a/workflows_execution/src/epilot/models/operations/searchexecutions.py +++ b/workflows_execution/src/epilot/models/operations/searchexecutions.py @@ -10,12 +10,15 @@ @dataclasses.dataclass class SearchExecutionsResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Validation Errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Validation Errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" search_executions_resp: Optional[shared_searchexecutionsresp.SearchExecutionsResp] = dataclasses.field(default=None) - r"""Success - filtered steps are returned""" - \ No newline at end of file + r"""Success - filtered steps are returned""" + + diff --git a/workflows_execution/src/epilot/models/operations/searchsteps.py b/workflows_execution/src/epilot/models/operations/searchsteps.py index 4794f0ddb..42b28da0b 100755 --- a/workflows_execution/src/epilot/models/operations/searchsteps.py +++ b/workflows_execution/src/epilot/models/operations/searchsteps.py @@ -10,12 +10,15 @@ @dataclasses.dataclass class SearchStepsResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Validation Errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Validation Errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" search_steps_resp: Optional[shared_searchstepsresp.SearchStepsResp] = dataclasses.field(default=None) - r"""Success - filtered steps are returned""" - \ No newline at end of file + r"""Success - filtered steps are returned""" + + diff --git a/workflows_execution/src/epilot/models/operations/updateexecution.py b/workflows_execution/src/epilot/models/operations/updateexecution.py index 3a9d55192..d209a7c4d 100755 --- a/workflows_execution/src/epilot/models/operations/updateexecution.py +++ b/workflows_execution/src/epilot/models/operations/updateexecution.py @@ -10,19 +10,23 @@ @dataclasses.dataclass class UpdateExecutionRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" workflow_execution_update_req: shared_workflowexecutionupdatereq.WorkflowExecutionUpdateReq = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }}) - r"""Patch Updates for Workflow Execution payload.""" + r"""Patch Updates for Workflow Execution payload.""" + + @dataclasses.dataclass class UpdateExecutionResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Other errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) - \ No newline at end of file + r"""Other errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" + + diff --git a/workflows_execution/src/epilot/models/operations/updatestep.py b/workflows_execution/src/epilot/models/operations/updatestep.py index c8daf8ad6..177fc0798 100755 --- a/workflows_execution/src/epilot/models/operations/updatestep.py +++ b/workflows_execution/src/epilot/models/operations/updatestep.py @@ -11,23 +11,27 @@ @dataclasses.dataclass class UpdateStepRequest: - execution_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'executionId', 'style': 'simple', 'explode': False }}) - r"""Id of the execution""" + r"""Id of the execution""" step_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'stepId', 'style': 'simple', 'explode': False }}) - r"""Short uuid (length 6) to identify the Workflow Execution Step.""" + r"""Short uuid (length 6) to identify the Workflow Execution Step.""" update_step_req: shared_updatestepreq.UpdateStepReq = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }}) - r"""Workflow Execution Step payload""" + r"""Workflow Execution Step payload""" + + @dataclasses.dataclass class UpdateStepResponse: - - content_type: str = dataclasses.field() - status_code: int = dataclasses.field() + content_type: str = dataclasses.field() + r"""HTTP response content type for this operation""" + status_code: int = dataclasses.field() + r"""HTTP response status code for this operation""" error_resp: Optional[shared_errorresp.ErrorResp] = dataclasses.field(default=None) - r"""Validation Errors""" - raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Validation Errors""" + raw_response: Optional[requests_http.Response] = dataclasses.field(default=None) + r"""Raw HTTP response; suitable for custom response parsing""" step: Optional[shared_step.Step] = dataclasses.field(default=None) - r"""Success - if the step is updated successfully""" - \ No newline at end of file + r"""Success - if the step is updated successfully""" + + diff --git a/workflows_execution/src/epilot/models/shared/__init__.py b/workflows_execution/src/epilot/models/shared/__init__.py index edbda8e6a..d3941762d 100755 --- a/workflows_execution/src/epilot/models/shared/__init__.py +++ b/workflows_execution/src/epilot/models/shared/__init__.py @@ -8,26 +8,28 @@ from .ecpdetails import * from .errorresp import * from .executionpaginationdynamo import * -from .itemtype_enum import * +from .itemtype import * from .lastevaluatedkey import * from .searchexecutionsreq import * from .searchexecutionsresp import * from .searchpagination import * -from .searchsorting_enum import * +from .searchsorting import * from .searchstepsreq import * from .searchstepsresp import * from .section import * from .sectionsimplified import * +from .sectionstatus import * from .security import * from .step import * from .stepextended import * from .stepid import * +from .stepjourney import * from .steppositionat import * from .steprequirement import * from .stepsimplified import * -from .stepstatus_enum import * -from .steptype_enum import * -from .triggertype_enum import * +from .stepstatus import * +from .steptype import * +from .triggertype import * from .updateentityattributes import * from .updatestepreq import * from .workflowcontext import * @@ -35,6 +37,6 @@ from .workflowexecutioncreatereq import * from .workflowexecutionslim import * from .workflowexecutionupdatereq import * -from .workflowstatus_enum import * +from .workflowstatus import * -__all__ = ["AutomationConfig","ClosingReason","ClosingReasonResp","CreateStepReq","DynamicDueDate","DynamicDueDateActionTypeConditionEnum","DynamicDueDateTimePeriodEnum","ECPDetails","ErrorResp","ExecutionPaginationDynamo","ItemTypeEnum","LastEvaluatedKey","SearchExecutionsReq","SearchExecutionsResp","SearchPagination","SearchSortingEnum","SearchStepsReq","SearchStepsReqStatusEnum","SearchStepsResp","Section","SectionSimplified","Security","Step","StepExtended","StepID","StepPositionAt","StepRequirement","StepRequirementConditionEnum","StepSimplified","StepStatusEnum","StepTypeEnum","TriggerTypeEnum","UpdateEntityAttributes","UpdateEntityAttributesSourceEnum","UpdateEntityAttributesTarget","UpdateStepReq","WorkflowContext","WorkflowExecution","WorkflowExecutionCreateReq","WorkflowExecutionSlim","WorkflowExecutionUpdateReq","WorkflowStatusEnum"] +__all__ = ["AutomationConfig","ClosingReason","ClosingReasonResp","CreateStepReq","DynamicDueDate","DynamicDueDateActionTypeCondition","DynamicDueDateTimePeriod","ECPDetails","ErrorResp","ExecutionPaginationDynamo","ItemType","LastEvaluatedKey","SearchExecutionsReq","SearchExecutionsResp","SearchPagination","SearchSorting","SearchStepsReq","SearchStepsReqStatus","SearchStepsResp","Section","SectionSimplified","SectionStatus","Security","Step","StepExtended","StepID","StepJourney","StepPositionAt","StepRequirement","StepRequirementCondition","StepSimplified","StepStatus","StepType","TriggerType","UpdateEntityAttributes","UpdateEntityAttributesSource","UpdateEntityAttributesTarget","UpdateStepReq","WorkflowContext","WorkflowExecution","WorkflowExecutionCreateReq","WorkflowExecutionFlow","WorkflowExecutionSlim","WorkflowExecutionSlimFlow","WorkflowExecutionUpdateReq","WorkflowStatus"] diff --git a/workflows_execution/src/epilot/models/shared/automationconfig.py b/workflows_execution/src/epilot/models/shared/automationconfig.py index 949c2be35..cf22f1986 100755 --- a/workflows_execution/src/epilot/models/shared/automationconfig.py +++ b/workflows_execution/src/epilot/models/shared/automationconfig.py @@ -11,11 +11,11 @@ @dataclasses.dataclass class AutomationConfig: r"""Configuration for automation execution to run""" - flow_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flowId') }}) - r"""Id of the configured automation to run""" + r"""Id of the configured automation to run""" execution_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionId'), 'exclude': lambda f: f is None }}) - r"""Id of the automation execution which ran""" + r"""Id of the automation execution which ran""" execution_status: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionStatus'), 'exclude': lambda f: f is None }}) - r"""Status of Automation Execution. Types can be found in Automation API""" - \ No newline at end of file + r"""Status of Automation Execution. Types can be found in Automation API""" + + diff --git a/workflows_execution/src/epilot/models/shared/closingreason.py b/workflows_execution/src/epilot/models/shared/closingreason.py index 83a9ffb16..18daa2488 100755 --- a/workflows_execution/src/epilot/models/shared/closingreason.py +++ b/workflows_execution/src/epilot/models/shared/closingreason.py @@ -9,7 +9,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ClosingReason: + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }}) - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) - title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/closingreasonresp.py b/workflows_execution/src/epilot/models/shared/closingreasonresp.py index eb72dbf2f..ad672e4ce 100755 --- a/workflows_execution/src/epilot/models/shared/closingreasonresp.py +++ b/workflows_execution/src/epilot/models/shared/closingreasonresp.py @@ -5,13 +5,12 @@ from ..shared import closingreason as shared_closingreason from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ClosingReasonResp: - r"""returns all Closing Reasons for this Execution""" + reasons: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons'), 'exclude': lambda f: f is None }}) - reasons: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/createstepreq.py b/workflows_execution/src/epilot/models/shared/createstepreq.py index cefb68ec9..76fbf96b3 100755 --- a/workflows_execution/src/epilot/models/shared/createstepreq.py +++ b/workflows_execution/src/epilot/models/shared/createstepreq.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses from ..shared import automationconfig as shared_automationconfig -from ..shared import stepstatus_enum as shared_stepstatus_enum -from ..shared import steptype_enum as shared_steptype_enum +from ..shared import stepstatus as shared_stepstatus +from ..shared import steptype as shared_steptype from dataclasses_json import Undefined, dataclass_json from epilot import utils from typing import Optional @@ -13,13 +13,12 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CreateStepReq: - r"""Workflow Execution Step payload""" - - insertion_index: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('insertionIndex') }}) - name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) + name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) automation_config: Optional[shared_automationconfig.AutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), 'exclude': lambda f: f is None }}) - r"""Configuration for automation execution to run""" - execution_type: Optional[shared_steptype_enum.StepTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) - section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) - status: Optional[shared_stepstatus_enum.StepStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + r"""Configuration for automation execution to run""" + execution_type: Optional[shared_steptype.StepType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) + insertion_index: Optional[float] = dataclasses.field(default=0, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('insertionIndex'), 'exclude': lambda f: f is None }}) + section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) + status: Optional[shared_stepstatus.StepStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + + diff --git a/workflows_execution/src/epilot/models/shared/dynamicduedate.py b/workflows_execution/src/epilot/models/shared/dynamicduedate.py index 6ad90d1e2..18b82aee4 100755 --- a/workflows_execution/src/epilot/models/shared/dynamicduedate.py +++ b/workflows_execution/src/epilot/models/shared/dynamicduedate.py @@ -7,23 +7,23 @@ from epilot import utils from typing import Optional -class DynamicDueDateActionTypeConditionEnum(str, Enum): - WORKFLOW_STARTED = "WORKFLOW_STARTED" - STEP_CLOSED = "STEP_CLOSED" +class DynamicDueDateActionTypeCondition(str, Enum): + WORKFLOW_STARTED = 'WORKFLOW_STARTED' + STEP_CLOSED = 'STEP_CLOSED' -class DynamicDueDateTimePeriodEnum(str, Enum): - DAYS = "days" - WEEKS = "weeks" - MONTHS = "months" +class DynamicDueDateTimePeriod(str, Enum): + DAYS = 'days' + WEEKS = 'weeks' + MONTHS = 'months' @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class DynamicDueDate: r"""set a Duedate for a step then a specific""" + number_of_units: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('numberOfUnits') }}) + time_period: DynamicDueDateTimePeriod = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timePeriod') }}) + action_type_condition: Optional[DynamicDueDateActionTypeCondition] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('actionTypeCondition'), 'exclude': lambda f: f is None }}) + step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepId'), 'exclude': lambda f: f is None }}) - number_of_units: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('numberOfUnits') }}) - time_period: DynamicDueDateTimePeriodEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timePeriod') }}) - action_type_condition: Optional[DynamicDueDateActionTypeConditionEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('actionTypeCondition'), 'exclude': lambda f: f is None }}) - step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepId'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/ecpdetails.py b/workflows_execution/src/epilot/models/shared/ecpdetails.py index 229b4e6f6..c9d7e69de 100755 --- a/workflows_execution/src/epilot/models/shared/ecpdetails.py +++ b/workflows_execution/src/epilot/models/shared/ecpdetails.py @@ -2,6 +2,7 @@ from __future__ import annotations import dataclasses +from ..shared import stepjourney as shared_stepjourney from dataclasses_json import Undefined, dataclass_json from epilot import utils from typing import Optional @@ -11,6 +12,8 @@ @dataclasses.dataclass class ECPDetails: r"""Details regarding ECP for the workflow step""" + journey: Optional[shared_stepjourney.StepJourney] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('journey'), 'exclude': lambda f: f is None }}) + label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('label'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('label'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/errorresp.py b/workflows_execution/src/epilot/models/shared/errorresp.py index 1adc87498..e728f6796 100755 --- a/workflows_execution/src/epilot/models/shared/errorresp.py +++ b/workflows_execution/src/epilot/models/shared/errorresp.py @@ -10,7 +10,6 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ErrorResp: - r"""Other errors""" + message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/executionpaginationdynamo.py b/workflows_execution/src/epilot/models/shared/executionpaginationdynamo.py index 1cd69ab3e..c37524765 100755 --- a/workflows_execution/src/epilot/models/shared/executionpaginationdynamo.py +++ b/workflows_execution/src/epilot/models/shared/executionpaginationdynamo.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ExecutionPaginationDynamo: + creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) + org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) - org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/itemtype_enum.py b/workflows_execution/src/epilot/models/shared/itemtype.py similarity index 64% rename from workflows_execution/src/epilot/models/shared/itemtype_enum.py rename to workflows_execution/src/epilot/models/shared/itemtype.py index 0449374b7..9c9bb00b2 100755 --- a/workflows_execution/src/epilot/models/shared/itemtype_enum.py +++ b/workflows_execution/src/epilot/models/shared/itemtype.py @@ -3,6 +3,6 @@ from __future__ import annotations from enum import Enum -class ItemTypeEnum(str, Enum): - STEP = "STEP" - SECTION = "SECTION" +class ItemType(str, Enum): + STEP = 'STEP' + SECTION = 'SECTION' diff --git a/workflows_execution/src/epilot/models/shared/lastevaluatedkey.py b/workflows_execution/src/epilot/models/shared/lastevaluatedkey.py index 9b3fb2ad3..4c1fc16b7 100755 --- a/workflows_execution/src/epilot/models/shared/lastevaluatedkey.py +++ b/workflows_execution/src/epilot/models/shared/lastevaluatedkey.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class LastEvaluatedKey: + creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) + org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) - org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/searchexecutionsreq.py b/workflows_execution/src/epilot/models/shared/searchexecutionsreq.py index 084992efd..4dd064006 100755 --- a/workflows_execution/src/epilot/models/shared/searchexecutionsreq.py +++ b/workflows_execution/src/epilot/models/shared/searchexecutionsreq.py @@ -3,8 +3,8 @@ from __future__ import annotations import dataclasses from ..shared import executionpaginationdynamo as shared_executionpaginationdynamo -from ..shared import searchsorting_enum as shared_searchsorting_enum -from ..shared import workflowstatus_enum as shared_workflowstatus_enum +from ..shared import searchsorting as shared_searchsorting +from ..shared import workflowstatus as shared_workflowstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils from typing import Optional @@ -13,12 +13,11 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchExecutionsReq: - r"""Search steps request""" + assigned_to: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + include_done_workflows: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('includeDoneWorkflows'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) + pagination: Optional[shared_executionpaginationdynamo.ExecutionPaginationDynamo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pagination'), 'exclude': lambda f: f is None }}) + sorting: Optional[shared_searchsorting.SearchSorting] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sorting'), 'exclude': lambda f: f is None }}) + status: Optional[shared_workflowstatus.WorkflowStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - assigned_to: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - include_done_workflows: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('includeDoneWorkflows'), 'exclude': lambda f: f is None }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - pagination: Optional[shared_executionpaginationdynamo.ExecutionPaginationDynamo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pagination'), 'exclude': lambda f: f is None }}) - sorting: Optional[shared_searchsorting_enum.SearchSortingEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sorting'), 'exclude': lambda f: f is None }}) - status: Optional[shared_workflowstatus_enum.WorkflowStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/searchexecutionsresp.py b/workflows_execution/src/epilot/models/shared/searchexecutionsresp.py index c0ac6b328..a2fdaaf1a 100755 --- a/workflows_execution/src/epilot/models/shared/searchexecutionsresp.py +++ b/workflows_execution/src/epilot/models/shared/searchexecutionsresp.py @@ -6,14 +6,13 @@ from ..shared import workflowexecutionslim as shared_workflowexecutionslim from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchExecutionsResp: - r"""Success - filtered steps are returned""" + executions: List[shared_workflowexecutionslim.WorkflowExecutionSlim] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executions') }}) + last_evaluated_key: Optional[shared_lastevaluatedkey.LastEvaluatedKey] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastEvaluatedKey'), 'exclude': lambda f: f is None }}) - executions: list[shared_workflowexecutionslim.WorkflowExecutionSlim] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executions') }}) - last_evaluated_key: Optional[shared_lastevaluatedkey.LastEvaluatedKey] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastEvaluatedKey'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/searchpagination.py b/workflows_execution/src/epilot/models/shared/searchpagination.py index 2c8e5fb46..28740aca6 100755 --- a/workflows_execution/src/epilot/models/shared/searchpagination.py +++ b/workflows_execution/src/epilot/models/shared/searchpagination.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchPagination: + from_: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('from'), 'exclude': lambda f: f is None }}) + size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - from_: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('from'), 'exclude': lambda f: f is None }}) - size: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('size'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/searchsorting.py b/workflows_execution/src/epilot/models/shared/searchsorting.py new file mode 100755 index 000000000..fd323cf6b --- /dev/null +++ b/workflows_execution/src/epilot/models/shared/searchsorting.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + +class SearchSorting(str, Enum): + A_Z = 'A_Z' + Z_A = 'Z_A' + DUE_DATE_ASC = 'DUE_DATE_ASC' + DUE_DATE_DESC = 'DUE_DATE_DESC' + TRIGGER_DATE_ASC = 'TRIGGER_DATE_ASC' + TRIGGER_DATE_DESC = 'TRIGGER_DATE_DESC' diff --git a/workflows_execution/src/epilot/models/shared/searchsorting_enum.py b/workflows_execution/src/epilot/models/shared/searchsorting_enum.py deleted file mode 100755 index 449751c5e..000000000 --- a/workflows_execution/src/epilot/models/shared/searchsorting_enum.py +++ /dev/null @@ -1,12 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -from enum import Enum - -class SearchSortingEnum(str, Enum): - A_Z = "A_Z" - Z_A = "Z_A" - DUE_DATE_ASC = "DUE_DATE_ASC" - DUE_DATE_DESC = "DUE_DATE_DESC" - TRIGGER_DATE_ASC = "TRIGGER_DATE_ASC" - TRIGGER_DATE_DESC = "TRIGGER_DATE_DESC" diff --git a/workflows_execution/src/epilot/models/shared/searchstepsreq.py b/workflows_execution/src/epilot/models/shared/searchstepsreq.py index cc9ba11cf..32bf6bd12 100755 --- a/workflows_execution/src/epilot/models/shared/searchstepsreq.py +++ b/workflows_execution/src/epilot/models/shared/searchstepsreq.py @@ -3,29 +3,28 @@ from __future__ import annotations import dataclasses from ..shared import searchpagination as shared_searchpagination -from ..shared import searchsorting_enum as shared_searchsorting_enum +from ..shared import searchsorting as shared_searchsorting from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilot import utils from typing import Optional -class SearchStepsReqStatusEnum(str, Enum): - OPEN = "OPEN" - COMPLETE = "COMPLETE" - NEXT_OPEN_ITEM_IN_WORKFLOW = "NEXT_OPEN_ITEM_IN_WORKFLOW" +class SearchStepsReqStatus(str, Enum): + OPEN = 'OPEN' + COMPLETE = 'COMPLETE' + NEXT_OPEN_ITEM_IN_WORKFLOW = 'NEXT_OPEN_ITEM_IN_WORKFLOW' @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchStepsReq: - r"""Search steps request""" + assigned_to: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + execution_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionName'), 'exclude': lambda f: f is None }}) + include_done_workflows: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('includeDoneWorkflows'), 'exclude': lambda f: f is None }}) + manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) + pagination: Optional[shared_searchpagination.SearchPagination] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pagination'), 'exclude': lambda f: f is None }}) + sorting: Optional[shared_searchsorting.SearchSorting] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sorting'), 'exclude': lambda f: f is None }}) + status: Optional[SearchStepsReqStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + step_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepName'), 'exclude': lambda f: f is None }}) - assigned_to: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - execution_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionName'), 'exclude': lambda f: f is None }}) - include_done_workflows: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('includeDoneWorkflows'), 'exclude': lambda f: f is None }}) - manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) - pagination: Optional[shared_searchpagination.SearchPagination] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pagination'), 'exclude': lambda f: f is None }}) - sorting: Optional[shared_searchsorting_enum.SearchSortingEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sorting'), 'exclude': lambda f: f is None }}) - status: Optional[SearchStepsReqStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - step_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepName'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/searchstepsresp.py b/workflows_execution/src/epilot/models/shared/searchstepsresp.py index b2e2673d9..5d65f6348 100755 --- a/workflows_execution/src/epilot/models/shared/searchstepsresp.py +++ b/workflows_execution/src/epilot/models/shared/searchstepsresp.py @@ -5,14 +5,13 @@ from ..shared import stepextended as shared_stepextended from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchStepsResp: - r"""Success - filtered steps are returned""" + hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hits'), 'exclude': lambda f: f is None }}) + results: Optional[List[shared_stepextended.StepExtended]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) - hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hits'), 'exclude': lambda f: f is None }}) - results: Optional[list[shared_stepextended.StepExtended]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('results'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/section.py b/workflows_execution/src/epilot/models/shared/section.py index 6be4add95..e87c00d6a 100755 --- a/workflows_execution/src/epilot/models/shared/section.py +++ b/workflows_execution/src/epilot/models/shared/section.py @@ -2,25 +2,32 @@ from __future__ import annotations import dataclasses -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype +from ..shared import sectionstatus as shared_sectionstatus from ..shared import step as shared_step from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Section: r"""A group of Steps that define the progress of the Workflow""" - - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) - r"""Name for this Section""" - steps: list[shared_step.Step] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('steps') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) - user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) - r"""This field is deprecated. Please use assignedTo""" - \ No newline at end of file + r"""Name for this Section""" + steps: List[shared_step.Step] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('steps') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + started_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startedTime'), 'exclude': lambda f: f is None }}) + status: Optional[shared_sectionstatus.SectionStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + user_ids: Optional[List[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. Please use assignedTo + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + + diff --git a/workflows_execution/src/epilot/models/shared/sectionsimplified.py b/workflows_execution/src/epilot/models/shared/sectionsimplified.py index 86e25edef..34fdf5853 100755 --- a/workflows_execution/src/epilot/models/shared/sectionsimplified.py +++ b/workflows_execution/src/epilot/models/shared/sectionsimplified.py @@ -2,22 +2,22 @@ from __future__ import annotations import dataclasses -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype from ..shared import stepsimplified as shared_stepsimplified from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SectionSimplified: r"""A group of Steps that define the progress of the Workflow""" - - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) - r"""Name for this Section""" - steps: list[shared_stepsimplified.StepSimplified] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('steps') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + r"""Name for this Section""" + steps: List[shared_stepsimplified.StepSimplified] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('steps') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + + diff --git a/workflows_execution/src/epilot/models/shared/sectionstatus.py b/workflows_execution/src/epilot/models/shared/sectionstatus.py new file mode 100755 index 000000000..84341fe93 --- /dev/null +++ b/workflows_execution/src/epilot/models/shared/sectionstatus.py @@ -0,0 +1,9 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + +class SectionStatus(str, Enum): + OPEN = 'OPEN' + IN_PROGRESS = 'IN_PROGRESS' + COMPLETED = 'COMPLETED' diff --git a/workflows_execution/src/epilot/models/shared/security.py b/workflows_execution/src/epilot/models/shared/security.py index e41721b57..6cd735f54 100755 --- a/workflows_execution/src/epilot/models/shared/security.py +++ b/workflows_execution/src/epilot/models/shared/security.py @@ -6,6 +6,6 @@ @dataclasses.dataclass class Security: + bearer_auth: str = dataclasses.field(metadata={'security': { 'scheme': True, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' }}) - bearer_auth: str = dataclasses.field(metadata={'security': { 'scheme': True, 'type': 'http', 'sub_type': 'bearer', 'field_name': 'Authorization' }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/step.py b/workflows_execution/src/epilot/models/shared/step.py index 11e894440..80686adc9 100755 --- a/workflows_execution/src/epilot/models/shared/step.py +++ b/workflows_execution/src/epilot/models/shared/step.py @@ -5,45 +5,57 @@ from ..shared import automationconfig as shared_automationconfig from ..shared import dynamicduedate as shared_dynamicduedate from ..shared import ecpdetails as shared_ecpdetails -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype +from ..shared import stepjourney as shared_stepjourney from ..shared import steprequirement as shared_steprequirement -from ..shared import stepstatus_enum as shared_stepstatus_enum -from ..shared import steptype_enum as shared_steptype_enum +from ..shared import stepstatus as shared_stepstatus +from ..shared import steptype as shared_steptype from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Step: - r"""Success - if the step is created with success""" - - entity_ref_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId') }}) - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) - name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) assigned_to_in_progress: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedToInProgress'), 'exclude': lambda f: f is None }}) - r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" + r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" automation_config: Optional[shared_automationconfig.AutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), 'exclude': lambda f: f is None }}) - r"""Configuration for automation execution to run""" - created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }}) - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) - due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) + r"""Configuration for automation execution to run""" + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }}) + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" + r"""set a Duedate for a step then a specific""" ecp: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ecp'), 'exclude': lambda f: f is None }}) - r"""Details regarding ECP for the workflow step""" + r"""Details regarding ECP for the workflow step""" enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }}) - r"""enabled flag results from calculating the requirements""" - execution_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionId'), 'exclude': lambda f: f is None }}) - execution_type: Optional[shared_steptype_enum.StepTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) - last_updated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdated'), 'exclude': lambda f: f is None }}) - manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) - requirements: Optional[list[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) - section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) - status: Optional[shared_stepstatus_enum.StepStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) - r"""This field is deprecated. Please use assignedTo""" - \ No newline at end of file + r"""enabled flag results from calculating the requirements""" + entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. It will be soon removed. Please use only id. + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + execution_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionId'), 'exclude': lambda f: f is None }}) + execution_type: Optional[shared_steptype.StepType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) + installer: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('installer'), 'exclude': lambda f: f is None }}) + r"""Details regarding ECP for the workflow step""" + journey: Optional[shared_stepjourney.StepJourney] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('journey'), 'exclude': lambda f: f is None }}) + last_updated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdated'), 'exclude': lambda f: f is None }}) + manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) + requirements: Optional[List[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) + section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) + started_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startedTime'), 'exclude': lambda f: f is None }}) + status: Optional[shared_stepstatus.StepStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + user_ids: Optional[List[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. Please use assignedTo + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + + diff --git a/workflows_execution/src/epilot/models/shared/stepextended.py b/workflows_execution/src/epilot/models/shared/stepextended.py index 8688ea47b..d8745df3e 100755 --- a/workflows_execution/src/epilot/models/shared/stepextended.py +++ b/workflows_execution/src/epilot/models/shared/stepextended.py @@ -5,49 +5,62 @@ from ..shared import automationconfig as shared_automationconfig from ..shared import dynamicduedate as shared_dynamicduedate from ..shared import ecpdetails as shared_ecpdetails -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype +from ..shared import stepjourney as shared_stepjourney from ..shared import steprequirement as shared_steprequirement -from ..shared import stepstatus_enum as shared_stepstatus_enum -from ..shared import steptype_enum as shared_steptype_enum +from ..shared import stepstatus as shared_stepstatus +from ..shared import steptype as shared_steptype from ..shared import workflowcontext as shared_workflowcontext -from ..shared import workflowstatus_enum as shared_workflowstatus_enum +from ..shared import workflowstatus as shared_workflowstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StepExtended: - - entity_ref_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId') }}) - execution_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionId') }}) - execution_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionName') }}) - execution_status: shared_workflowstatus_enum.WorkflowStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionStatus') }}) - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) - name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + execution_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionId') }}) + execution_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionName') }}) + execution_status: shared_workflowstatus.WorkflowStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionStatus') }}) + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) assigned_to_in_progress: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedToInProgress'), 'exclude': lambda f: f is None }}) - r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" + r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" automation_config: Optional[shared_automationconfig.AutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), 'exclude': lambda f: f is None }}) - r"""Configuration for automation execution to run""" - contexts: Optional[list[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) - created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }}) - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) - due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) + r"""Configuration for automation execution to run""" + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + contexts: Optional[List[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) + created: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created'), 'exclude': lambda f: f is None }}) + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" + r"""set a Duedate for a step then a specific""" ecp: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ecp'), 'exclude': lambda f: f is None }}) - r"""Details regarding ECP for the workflow step""" + r"""Details regarding ECP for the workflow step""" enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }}) - r"""enabled flag results from calculating the requirements""" - execution_type: Optional[shared_steptype_enum.StepTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) - last_updated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdated'), 'exclude': lambda f: f is None }}) - manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) - requirements: Optional[list[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) - section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) - status: Optional[shared_stepstatus_enum.StepStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) - r"""This field is deprecated. Please use assignedTo""" - \ No newline at end of file + r"""enabled flag results from calculating the requirements""" + entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. It will be soon removed. Please use only id. + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + execution_type: Optional[shared_steptype.StepType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) + installer: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('installer'), 'exclude': lambda f: f is None }}) + r"""Details regarding ECP for the workflow step""" + journey: Optional[shared_stepjourney.StepJourney] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('journey'), 'exclude': lambda f: f is None }}) + last_updated: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdated'), 'exclude': lambda f: f is None }}) + manually_created: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('manuallyCreated'), 'exclude': lambda f: f is None }}) + requirements: Optional[List[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) + section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) + started_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startedTime'), 'exclude': lambda f: f is None }}) + status: Optional[shared_stepstatus.StepStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + user_ids: Optional[List[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. Please use assignedTo + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + + diff --git a/workflows_execution/src/epilot/models/shared/stepid.py b/workflows_execution/src/epilot/models/shared/stepid.py index b934348d5..20e7f2df4 100755 --- a/workflows_execution/src/epilot/models/shared/stepid.py +++ b/workflows_execution/src/epilot/models/shared/stepid.py @@ -10,7 +10,11 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StepID: + entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. It will be soon removed. Please use only id. + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/stepjourney.py b/workflows_execution/src/epilot/models/shared/stepjourney.py new file mode 100755 index 000000000..59ce059f9 --- /dev/null +++ b/workflows_execution/src/epilot/models/shared/stepjourney.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from dataclasses_json import Undefined, dataclass_json +from epilot import utils +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class StepJourney: + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) + journey_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('journeyId'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) + + diff --git a/workflows_execution/src/epilot/models/shared/steppositionat.py b/workflows_execution/src/epilot/models/shared/steppositionat.py index 27732e7fa..8085f165b 100755 --- a/workflows_execution/src/epilot/models/shared/steppositionat.py +++ b/workflows_execution/src/epilot/models/shared/steppositionat.py @@ -10,7 +10,7 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StepPositionAt: + index: Optional[float] = dataclasses.field(default=0, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index'), 'exclude': lambda f: f is None }}) + section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) - index: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('index') }}) - section_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sectionId'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/steprequirement.py b/workflows_execution/src/epilot/models/shared/steprequirement.py index 38b4a6cf4..927cb11f0 100755 --- a/workflows_execution/src/epilot/models/shared/steprequirement.py +++ b/workflows_execution/src/epilot/models/shared/steprequirement.py @@ -2,21 +2,21 @@ from __future__ import annotations import dataclasses -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilot import utils -class StepRequirementConditionEnum(str, Enum): - CLOSED = "CLOSED" +class StepRequirementCondition(str, Enum): + CLOSED = 'CLOSED' @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StepRequirement: r"""describe the requirement for step enablement""" + condition: StepRequirementCondition = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('condition') }}) + definition_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - condition: StepRequirementConditionEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('condition') }}) - definition_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/stepsimplified.py b/workflows_execution/src/epilot/models/shared/stepsimplified.py index 8dde16ddb..67a1b01cb 100755 --- a/workflows_execution/src/epilot/models/shared/stepsimplified.py +++ b/workflows_execution/src/epilot/models/shared/stepsimplified.py @@ -3,26 +3,32 @@ from __future__ import annotations import dataclasses from ..shared import ecpdetails as shared_ecpdetails -from ..shared import itemtype_enum as shared_itemtype_enum +from ..shared import itemtype as shared_itemtype from ..shared import steprequirement as shared_steprequirement -from ..shared import steptype_enum as shared_steptype_enum +from ..shared import steptype as shared_steptype from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StepSimplified: - - entity_ref_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId') }}) - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) - name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) - type: shared_itemtype_enum.ItemTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) + type: shared_itemtype.ItemType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) ecp: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ecp'), 'exclude': lambda f: f is None }}) - r"""Details regarding ECP for the workflow step""" - enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }}) - execution_type: Optional[shared_steptype_enum.StepTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) - requirements: Optional[list[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + r"""Details regarding ECP for the workflow step""" + enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enabled'), 'exclude': lambda f: f is None }}) + entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. It will be soon removed. Please use only id. + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + execution_type: Optional[shared_steptype.StepType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('executionType'), 'exclude': lambda f: f is None }}) + installer: Optional[shared_ecpdetails.ECPDetails] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('installer'), 'exclude': lambda f: f is None }}) + r"""Details regarding ECP for the workflow step""" + requirements: Optional[List[shared_steprequirement.StepRequirement]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('requirements'), 'exclude': lambda f: f is None }}) + + diff --git a/workflows_execution/src/epilot/models/shared/stepstatus.py b/workflows_execution/src/epilot/models/shared/stepstatus.py new file mode 100755 index 000000000..ca7d2d176 --- /dev/null +++ b/workflows_execution/src/epilot/models/shared/stepstatus.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + +class StepStatus(str, Enum): + UNASSIGNED = 'UNASSIGNED' + ASSIGNED = 'ASSIGNED' + COMPLETED = 'COMPLETED' + SKIPPED = 'SKIPPED' + IN_PROGRESS = 'IN_PROGRESS' diff --git a/workflows_execution/src/epilot/models/shared/stepstatus_enum.py b/workflows_execution/src/epilot/models/shared/stepstatus_enum.py deleted file mode 100755 index cfeb770b7..000000000 --- a/workflows_execution/src/epilot/models/shared/stepstatus_enum.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" - -from __future__ import annotations -from enum import Enum - -class StepStatusEnum(str, Enum): - UNASSIGNED = "UNASSIGNED" - ASSIGNED = "ASSIGNED" - COMPLETED = "COMPLETED" - SKIPPED = "SKIPPED" - IN_PROGRESS = "IN_PROGRESS" diff --git a/workflows_execution/src/epilot/models/shared/steptype_enum.py b/workflows_execution/src/epilot/models/shared/steptype.py similarity index 61% rename from workflows_execution/src/epilot/models/shared/steptype_enum.py rename to workflows_execution/src/epilot/models/shared/steptype.py index bd26773ba..178c7ab17 100755 --- a/workflows_execution/src/epilot/models/shared/steptype_enum.py +++ b/workflows_execution/src/epilot/models/shared/steptype.py @@ -3,6 +3,6 @@ from __future__ import annotations from enum import Enum -class StepTypeEnum(str, Enum): - MANUAL = "MANUAL" - AUTOMATION = "AUTOMATION" +class StepType(str, Enum): + MANUAL = 'MANUAL' + AUTOMATION = 'AUTOMATION' diff --git a/workflows_execution/src/epilot/models/shared/triggertype_enum.py b/workflows_execution/src/epilot/models/shared/triggertype.py similarity index 61% rename from workflows_execution/src/epilot/models/shared/triggertype_enum.py rename to workflows_execution/src/epilot/models/shared/triggertype.py index 63012ad59..772de02b3 100755 --- a/workflows_execution/src/epilot/models/shared/triggertype_enum.py +++ b/workflows_execution/src/epilot/models/shared/triggertype.py @@ -3,6 +3,6 @@ from __future__ import annotations from enum import Enum -class TriggerTypeEnum(str, Enum): - MANUAL = "MANUAL" - AUTOMATIC = "AUTOMATIC" +class TriggerType(str, Enum): + MANUAL = 'MANUAL' + AUTOMATIC = 'AUTOMATIC' diff --git a/workflows_execution/src/epilot/models/shared/updateentityattributes.py b/workflows_execution/src/epilot/models/shared/updateentityattributes.py index 663f84202..a59d8edd8 100755 --- a/workflows_execution/src/epilot/models/shared/updateentityattributes.py +++ b/workflows_execution/src/epilot/models/shared/updateentityattributes.py @@ -6,24 +6,25 @@ from enum import Enum from epilot import utils -class UpdateEntityAttributesSourceEnum(str, Enum): - WORKFLOW_STATUS = "workflow_status" - CURRENT_SECTION = "current_section" - CURRENT_STEP = "current_step" +class UpdateEntityAttributesSource(str, Enum): + WORKFLOW_STATUS = 'workflow_status' + CURRENT_SECTION = 'current_section' + CURRENT_STEP = 'current_step' @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateEntityAttributesTarget: + entity_attribute: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityAttribute') }}) + entity_schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entitySchema') }}) - entity_attribute: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityAttribute') }}) - entity_schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entitySchema') }}) - + + @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateEntityAttributes: + source: UpdateEntityAttributesSource = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('source') }}) + target: UpdateEntityAttributesTarget = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('target') }}) - source: UpdateEntityAttributesSourceEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('source') }}) - target: UpdateEntityAttributesTarget = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('target') }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/updatestepreq.py b/workflows_execution/src/epilot/models/shared/updatestepreq.py index aeaaf9296..07c43ddc8 100755 --- a/workflows_execution/src/epilot/models/shared/updatestepreq.py +++ b/workflows_execution/src/epilot/models/shared/updatestepreq.py @@ -5,29 +5,38 @@ from ..shared import automationconfig as shared_automationconfig from ..shared import dynamicduedate as shared_dynamicduedate from ..shared import steppositionat as shared_steppositionat -from ..shared import stepstatus_enum as shared_stepstatus_enum +from ..shared import stepstatus as shared_stepstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateStepReq: - r"""Workflow Execution Step payload""" - - entity_ref_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) assigned_to_in_progress: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedToInProgress'), 'exclude': lambda f: f is None }}) - r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" + r"""The user which moved the step/task to the IN_PROGRESS state. The user should also be present in the assignedTo property of the step/task""" automation_config: Optional[shared_automationconfig.AutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), 'exclude': lambda f: f is None }}) - r"""Configuration for automation execution to run""" - due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) + r"""Configuration for automation execution to run""" + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - position: Optional[shared_steppositionat.StepPositionAt] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('position'), 'exclude': lambda f: f is None }}) - status: Optional[shared_stepstatus_enum.StepStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) - r"""This field is deprecated. Please use assignedTo""" - \ No newline at end of file + r"""set a Duedate for a step then a specific""" + entity_ref_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('entityRefId'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. Please use stepId + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) + position: Optional[shared_steppositionat.StepPositionAt] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('position'), 'exclude': lambda f: f is None }}) + started_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('startedTime'), 'exclude': lambda f: f is None }}) + status: Optional[shared_stepstatus.StepStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepId'), 'exclude': lambda f: f is None }}) + user_ids: Optional[List[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('userIds'), 'exclude': lambda f: f is None }}) + r"""This field is deprecated. Please use assignedTo + + Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + """ + + diff --git a/workflows_execution/src/epilot/models/shared/workflowcontext.py b/workflows_execution/src/epilot/models/shared/workflowcontext.py index 9bec3b674..cbbaf904a 100755 --- a/workflows_execution/src/epilot/models/shared/workflowcontext.py +++ b/workflows_execution/src/epilot/models/shared/workflowcontext.py @@ -9,8 +9,8 @@ @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WorkflowContext: + id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) + schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('schema') }}) + title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }}) - id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }}) - schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('schema') }}) - title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/workflowexecution.py b/workflows_execution/src/epilot/models/shared/workflowexecution.py index 4fc9530e3..6ee860a4f 100755 --- a/workflows_execution/src/epilot/models/shared/workflowexecution.py +++ b/workflows_execution/src/epilot/models/shared/workflowexecution.py @@ -4,47 +4,55 @@ import dataclasses from ..shared import closingreason as shared_closingreason from ..shared import dynamicduedate as shared_dynamicduedate +from ..shared import section as shared_section +from ..shared import step as shared_step from ..shared import stepid as shared_stepid -from ..shared import triggertype_enum as shared_triggertype_enum +from ..shared import triggertype as shared_triggertype from ..shared import updateentityattributes as shared_updateentityattributes from ..shared import workflowcontext as shared_workflowcontext -from ..shared import workflowstatus_enum as shared_workflowstatus_enum +from ..shared import workflowstatus as shared_workflowstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Any, Optional +from typing import List, Optional, Union + + +@dataclasses.dataclass +class WorkflowExecutionFlow: + pass @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WorkflowExecution: - r"""Success - if the execution is created successfully""" - - flow: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flow') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) - configured_closing_reason_snapshot: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configuredClosingReasonSnapshot'), 'exclude': lambda f: f is None }}) - contexts: Optional[list[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) + flow: List[Union[shared_section.Section, shared_step.Step]] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flow') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + r"""Completed time of the workflow execution""" + configured_closing_reason_snapshot: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configuredClosingReasonSnapshot'), 'exclude': lambda f: f is None }}) + contexts: Optional[List[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) - r"""Creation timestamp""" - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + r"""Creation timestamp which will double as started time as well""" + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) - r"""Due date for finishing the workflow""" + r"""Due date for finishing the workflow""" dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" + r"""set a Duedate for a step then a specific""" enable_ecp_workflow: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enableECPWorkflow'), 'exclude': lambda f: f is None }}) - r"""Indicates whether this workflow is available for End Customer Portal or not. By default it's not.""" - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) + r"""Indicates whether this workflow is available for End Customer Portal or not. By default it's not.""" + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) last_modified_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastModifiedBy'), 'exclude': lambda f: f is None }}) - r"""Id of the user who closed workflow""" + r"""Id of the user who closed workflow""" last_update_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdateTime'), 'exclude': lambda f: f is None }}) - r"""Last Update timestamp""" - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - next_open_step: Optional[shared_stepid.StepID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nextOpenStep'), 'exclude': lambda f: f is None }}) - org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - selected_closing_reasons: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) - status: Optional[shared_workflowstatus_enum.WorkflowStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - trigger: Optional[shared_triggertype_enum.TriggerTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) - update_entity_attributes: Optional[list[shared_updateentityattributes.UpdateEntityAttributes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updateEntityAttributes'), 'exclude': lambda f: f is None }}) + r"""Last Update timestamp""" + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) + next_open_step: Optional[shared_stepid.StepID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nextOpenStep'), 'exclude': lambda f: f is None }}) + org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) + selected_closing_reasons: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) + status: Optional[shared_workflowstatus.WorkflowStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + trigger: Optional[shared_triggertype.TriggerType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) + update_entity_attributes: Optional[List[shared_updateentityattributes.UpdateEntityAttributes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updateEntityAttributes'), 'exclude': lambda f: f is None }}) version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - r"""Version of the workflow execution""" - \ No newline at end of file + r"""Version of the workflow execution""" + + diff --git a/workflows_execution/src/epilot/models/shared/workflowexecutioncreatereq.py b/workflows_execution/src/epilot/models/shared/workflowexecutioncreatereq.py index 3624999ca..5eb801300 100755 --- a/workflows_execution/src/epilot/models/shared/workflowexecutioncreatereq.py +++ b/workflows_execution/src/epilot/models/shared/workflowexecutioncreatereq.py @@ -2,20 +2,19 @@ from __future__ import annotations import dataclasses -from ..shared import triggertype_enum as shared_triggertype_enum +from ..shared import triggertype as shared_triggertype from ..shared import workflowcontext as shared_workflowcontext from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WorkflowExecutionCreateReq: - r"""Workflow Execution payload""" + workflow_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workflowId') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + contexts: Optional[List[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) + trigger: Optional[shared_triggertype.TriggerType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) - workflow_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('workflowId') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - contexts: Optional[list[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) - trigger: Optional[shared_triggertype_enum.TriggerTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + diff --git a/workflows_execution/src/epilot/models/shared/workflowexecutionslim.py b/workflows_execution/src/epilot/models/shared/workflowexecutionslim.py index 70553962c..cc5fd95b7 100755 --- a/workflows_execution/src/epilot/models/shared/workflowexecutionslim.py +++ b/workflows_execution/src/epilot/models/shared/workflowexecutionslim.py @@ -4,46 +4,55 @@ import dataclasses from ..shared import closingreason as shared_closingreason from ..shared import dynamicduedate as shared_dynamicduedate +from ..shared import sectionsimplified as shared_sectionsimplified from ..shared import stepid as shared_stepid -from ..shared import triggertype_enum as shared_triggertype_enum +from ..shared import stepsimplified as shared_stepsimplified +from ..shared import triggertype as shared_triggertype from ..shared import updateentityattributes as shared_updateentityattributes from ..shared import workflowcontext as shared_workflowcontext -from ..shared import workflowstatus_enum as shared_workflowstatus_enum +from ..shared import workflowstatus as shared_workflowstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Any, Optional +from typing import List, Optional, Union + + +@dataclasses.dataclass +class WorkflowExecutionSlimFlow: + pass @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WorkflowExecutionSlim: - - flow: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flow') }}) - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) - closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) - configured_closing_reason_snapshot: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configuredClosingReasonSnapshot'), 'exclude': lambda f: f is None }}) - contexts: Optional[list[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) + flow: List[Union[shared_sectionsimplified.SectionSimplified, shared_stepsimplified.StepSimplified]] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flow') }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + r"""Completed time of the workflow execution""" + configured_closing_reason_snapshot: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('configuredClosingReasonSnapshot'), 'exclude': lambda f: f is None }}) + contexts: Optional[List[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), 'exclude': lambda f: f is None }}) - r"""Creation timestamp""" - definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) + r"""Creation timestamp which will double as started time as well""" + definition_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('definitionId'), 'exclude': lambda f: f is None }}) due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) - r"""Due date for finishing the workflow""" + r"""Due date for finishing the workflow""" dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" + r"""set a Duedate for a step then a specific""" enable_ecp_workflow: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('enableECPWorkflow'), 'exclude': lambda f: f is None }}) - r"""Indicates whether this workflow is available for End Customer Portal or not. By default it's not.""" - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) + r"""Indicates whether this workflow is available for End Customer Portal or not. By default it's not.""" + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }}) last_modified_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastModifiedBy'), 'exclude': lambda f: f is None }}) - r"""Id of the user who closed workflow""" + r"""Id of the user who closed workflow""" last_update_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('lastUpdateTime'), 'exclude': lambda f: f is None }}) - r"""Last Update timestamp""" - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) - next_open_step: Optional[shared_stepid.StepID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nextOpenStep'), 'exclude': lambda f: f is None }}) - org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) - selected_closing_reasons: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) - status: Optional[shared_workflowstatus_enum.WorkflowStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - trigger: Optional[shared_triggertype_enum.TriggerTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) - update_entity_attributes: Optional[list[shared_updateentityattributes.UpdateEntityAttributes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updateEntityAttributes'), 'exclude': lambda f: f is None }}) + r"""Last Update timestamp""" + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }}) + next_open_step: Optional[shared_stepid.StepID] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('nextOpenStep'), 'exclude': lambda f: f is None }}) + org_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('orgId'), 'exclude': lambda f: f is None }}) + selected_closing_reasons: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) + status: Optional[shared_workflowstatus.WorkflowStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + trigger: Optional[shared_triggertype.TriggerType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('trigger'), 'exclude': lambda f: f is None }}) + update_entity_attributes: Optional[List[shared_updateentityattributes.UpdateEntityAttributes]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updateEntityAttributes'), 'exclude': lambda f: f is None }}) version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('version'), 'exclude': lambda f: f is None }}) - r"""Version of the workflow execution""" - \ No newline at end of file + r"""Version of the workflow execution""" + + diff --git a/workflows_execution/src/epilot/models/shared/workflowexecutionupdatereq.py b/workflows_execution/src/epilot/models/shared/workflowexecutionupdatereq.py index 42b7a5925..4ee3e44fe 100755 --- a/workflows_execution/src/epilot/models/shared/workflowexecutionupdatereq.py +++ b/workflows_execution/src/epilot/models/shared/workflowexecutionupdatereq.py @@ -5,25 +5,26 @@ from ..shared import closingreason as shared_closingreason from ..shared import dynamicduedate as shared_dynamicduedate from ..shared import workflowcontext as shared_workflowcontext -from ..shared import workflowstatus_enum as shared_workflowstatus_enum +from ..shared import workflowstatus as shared_workflowstatus from dataclasses_json import Undefined, dataclass_json from epilot import utils -from typing import Optional +from typing import List, Optional @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class WorkflowExecutionUpdateReq: - r"""Patch Updates for Workflow Execution payload.""" - - assigned_to: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) + assigned_to: Optional[List[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('assignedTo'), 'exclude': lambda f: f is None }}) closed_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closedBy'), 'exclude': lambda f: f is None }}) - r"""id of the user / partner user who is closing the workflow. For partner pass orgId_userId.""" - closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) - contexts: Optional[list[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) - due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) + r"""id of the user / partner user who is closing the workflow. For partner pass orgId_userId.""" + closing_reason_description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasonDescription'), 'exclude': lambda f: f is None }}) + completed_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completedTime'), 'exclude': lambda f: f is None }}) + r"""Completed time of the workflow execution""" + contexts: Optional[List[shared_workflowcontext.WorkflowContext]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('contexts'), 'exclude': lambda f: f is None }}) + due_date: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dueDate'), 'exclude': lambda f: f is None }}) dynamic_due_date: Optional[shared_dynamicduedate.DynamicDueDate] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('dynamicDueDate'), 'exclude': lambda f: f is None }}) - r"""set a Duedate for a step then a specific""" - selected_closing_reasons: Optional[list[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) - status: Optional[shared_workflowstatus_enum.WorkflowStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) - \ No newline at end of file + r"""set a Duedate for a step then a specific""" + selected_closing_reasons: Optional[List[shared_closingreason.ClosingReason]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('selectedClosingReasons'), 'exclude': lambda f: f is None }}) + status: Optional[shared_workflowstatus.WorkflowStatus] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status'), 'exclude': lambda f: f is None }}) + + diff --git a/workflows_execution/src/epilot/models/shared/workflowstatus_enum.py b/workflows_execution/src/epilot/models/shared/workflowstatus.py similarity index 57% rename from workflows_execution/src/epilot/models/shared/workflowstatus_enum.py rename to workflows_execution/src/epilot/models/shared/workflowstatus.py index a25bec637..86b25f122 100755 --- a/workflows_execution/src/epilot/models/shared/workflowstatus_enum.py +++ b/workflows_execution/src/epilot/models/shared/workflowstatus.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum -class WorkflowStatusEnum(str, Enum): - STARTED = "STARTED" - DONE = "DONE" - CLOSED = "CLOSED" +class WorkflowStatus(str, Enum): + STARTED = 'STARTED' + DONE = 'DONE' + CLOSED = 'CLOSED' diff --git a/workflows_execution/src/epilot/sdk.py b/workflows_execution/src/epilot/sdk.py index c50ace839..d7503c182 100755 --- a/workflows_execution/src/epilot/sdk.py +++ b/workflows_execution/src/epilot/sdk.py @@ -1,71 +1,57 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" import requests as requests_http -from . import utils +from .sdkconfiguration import SDKConfiguration from .workflows import Workflows +from epilot import utils from epilot.models import shared - -SERVERS = [ - "https://workflows-execution.sls.epilot.io", -] -"""Contains the list of servers available to the SDK""" +from typing import Dict class Epilot: - r"""Service for Workflow Executions which covers executions of processes defined in an Organization - - """ + r"""Workflows Executions: Service for Workflow Executions which covers executions of processes defined in an Organization""" workflows: Workflows r"""Interact with workflow executions - start / close / retrieve one or all / search / delete""" - _client: requests_http.Session - _security_client: requests_http.Session - _server_url: str = SERVERS[0] - _language: str = "python" - _sdk_version: str = "1.2.2" - _gen_version: str = "2.16.5" + sdk_configuration: SDKConfiguration def __init__(self, security: shared.Security = None, + server_idx: int = None, server_url: str = None, - url_params: dict[str, str] = None, - client: requests_http.Session = None + url_params: Dict[str, str] = None, + client: requests_http.Session = None, + retry_config: utils.RetryConfig = None ) -> None: """Instantiates the SDK configuring it with the provided parameters. :param security: The security details required for authentication :type security: shared.Security + :param server_idx: The index of the server to use for all operations + :type server_idx: int :param server_url: The server URL to use for all operations :type server_url: str :param url_params: Parameters to optionally template the server URL with - :type url_params: dict[str, str] + :type url_params: Dict[str, str] :param client: The requests.Session HTTP client to use for all operations - :type client: requests_http.Session + :type client: requests_http.Session + :param retry_config: The utils.RetryConfig to use globally + :type retry_config: utils.RetryConfig """ - self._client = requests_http.Session() + if client is None: + client = requests_http.Session() - if server_url is not None: - if url_params is not None: - self._server_url = utils.template_url(server_url, url_params) - else: - self._server_url = server_url - - if client is not None: - self._client = client + security_client = utils.configure_security_client(client, security) - self._security_client = utils.configure_security_client(self._client, security) + if server_url is not None: + if url_params is not None: + server_url = utils.template_url(server_url, url_params) + self.sdk_configuration = SDKConfiguration(client, security_client, server_url, server_idx, retry_config=retry_config) + self._init_sdks() def _init_sdks(self): - self.workflows = Workflows( - self._client, - self._security_client, - self._server_url, - self._language, - self._sdk_version, - self._gen_version - ) - + self.workflows = Workflows(self.sdk_configuration) \ No newline at end of file diff --git a/workflows_execution/src/epilot/sdkconfiguration.py b/workflows_execution/src/epilot/sdkconfiguration.py new file mode 100755 index 000000000..a3e696586 --- /dev/null +++ b/workflows_execution/src/epilot/sdkconfiguration.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +import requests +from dataclasses import dataclass +from typing import Dict, Tuple +from .utils.retries import RetryConfig +from .utils import utils + + +SERVERS = [ + 'https://workflows-execution.sls.epilot.io', +] +"""Contains the list of servers available to the SDK""" + +@dataclass +class SDKConfiguration: + client: requests.Session + security_client: requests.Session + server_url: str = '' + server_idx: int = 0 + language: str = 'python' + openapi_doc_version: str = '1.0.0' + sdk_version: str = '2.1.1' + gen_version: str = '2.173.0' + user_agent: str = 'speakeasy-sdk/python 2.1.1 2.173.0 1.0.0 epilot-workflows-execution' + retry_config: RetryConfig = None + + def get_server_details(self) -> Tuple[str, Dict[str, str]]: + if self.server_url: + return utils.remove_suffix(self.server_url, '/'), {} + if self.server_idx is None: + self.server_idx = 0 + + return SERVERS[self.server_idx], {} diff --git a/workflows_execution/src/epilot/utils/retries.py b/workflows_execution/src/epilot/utils/retries.py index c6251d948..25f49a1f2 100755 --- a/workflows_execution/src/epilot/utils/retries.py +++ b/workflows_execution/src/epilot/utils/retries.py @@ -2,6 +2,7 @@ import random import time +from typing import List import requests @@ -24,16 +25,17 @@ class RetryConfig: backoff: BackoffStrategy retry_connection_errors: bool - def __init__(self, strategy: str, retry_connection_errors: bool): + def __init__(self, strategy: str, backoff: BackoffStrategy, retry_connection_errors: bool): self.strategy = strategy + self.backoff = backoff self.retry_connection_errors = retry_connection_errors class Retries: config: RetryConfig - status_codes: list[str] + status_codes: List[str] - def __init__(self, config: RetryConfig, status_codes: list[str]): + def __init__(self, config: RetryConfig, status_codes: List[str]): self.config = config self.status_codes = status_codes diff --git a/workflows_execution/src/epilot/utils/utils.py b/workflows_execution/src/epilot/utils/utils.py index 9d4fba324..3ab126104 100755 --- a/workflows_execution/src/epilot/utils/utils.py +++ b/workflows_execution/src/epilot/utils/utils.py @@ -3,11 +3,14 @@ import base64 import json import re +import sys from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass from datetime import date, datetime +from decimal import Decimal from email.message import Message from enum import Enum -from typing import Any, Callable, Optional, Tuple, Union, get_args, get_origin +from typing import (Any, Callable, Dict, List, Optional, Tuple, Union, + get_args, get_origin) from xmlrpc.client import boolean import dateutil.parser @@ -17,14 +20,14 @@ class SecurityClient: client: requests.Session - query_params: dict[str, str] = {} + query_params: Dict[str, str] = {} def __init__(self, client: requests.Session): self.client = client def request(self, method, url, **kwargs): params = kwargs.get('params', {}) - kwargs["params"] = self.query_params | params + kwargs["params"] = {**self.query_params, **params} return self.client.request(method, url, **kwargs) @@ -67,7 +70,7 @@ def _parse_security_option(client: SecurityClient, option: dataclass): client, metadata, getattr(option, opt_field.name)) -def _parse_security_scheme(client: SecurityClient, scheme_metadata: dict, scheme: any): +def _parse_security_scheme(client: SecurityClient, scheme_metadata: Dict, scheme: any): scheme_type = scheme_metadata.get('type') sub_type = scheme_metadata.get('sub_type') @@ -91,7 +94,7 @@ def _parse_security_scheme(client: SecurityClient, scheme_metadata: dict, scheme client, scheme_metadata, scheme_metadata, scheme) -def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: dict, security_metadata: dict, value: any): +def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: Dict, security_metadata: Dict, value: any): scheme_type = scheme_metadata.get('type') sub_type = scheme_metadata.get('sub_type') @@ -112,7 +115,8 @@ def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: dict, client.client.headers[header_name] = value elif scheme_type == 'http': if sub_type == 'bearer': - client.client.headers[header_name] = value + client.client.headers[header_name] = value.lower().startswith( + 'bearer ') and value or f'Bearer {value}' else: raise Exception('not supported') else: @@ -141,7 +145,8 @@ def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass): client.client.headers['Authorization'] = f'Basic {base64.b64encode(data).decode()}' -def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> str: +def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass, + gbls: Dict[str, Dict[str, Dict[str, Any]]] = None) -> str: path_param_fields: Tuple[Field, ...] = fields(clazz) for field in path_param_fields: request_metadata = field.metadata.get('request') @@ -152,71 +157,80 @@ def generate_url(clazz: type, server_url: str, path: str, path_params: dataclass if param_metadata is None: continue - if param_metadata.get('style', 'simple') == 'simple': - param = getattr( - path_params, field.name) if path_params is not None else None - param = _populate_from_globals( - field.name, param, 'pathParam', gbls) - - if param is None: - continue - - if isinstance(param, list): - pp_vals: list[str] = [] - for pp_val in param: - if pp_val is None: - continue - pp_vals.append(_val_to_string(pp_val)) - path = path.replace( - '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) - elif isinstance(param, dict): - pp_vals: list[str] = [] - for pp_key in param: - if param[pp_key] is None: - continue - if param_metadata.get('explode'): - pp_vals.append( - f"{pp_key}={_val_to_string(param[pp_key])}") - else: - pp_vals.append( - f"{pp_key},{_val_to_string(param[pp_key])}") - path = path.replace( - '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) - elif not isinstance(param, (str, int, float, complex, bool)): - pp_vals: list[str] = [] - param_fields: Tuple[Field, ...] = fields(param) - for param_field in param_fields: - param_value_metadata = param_field.metadata.get( - 'path_param') - if not param_value_metadata: - continue + param = getattr( + path_params, field.name) if path_params is not None else None + param = _populate_from_globals( + field.name, param, 'pathParam', gbls) - parm_name = param_value_metadata.get( - 'field_name', field.name) + if param is None: + continue - param_field_val = getattr(param, param_field.name) - if param_field_val is None: - continue - if param_metadata.get('explode'): - pp_vals.append( - f"{parm_name}={_val_to_string(param_field_val)}") - else: - pp_vals.append( - f"{parm_name},{_val_to_string(param_field_val)}") - path = path.replace( - '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) - else: + f_name = param_metadata.get("field_name", field.name) + serialization = param_metadata.get('serialization', '') + if serialization != '': + serialized_params = _get_serialized_params( + param_metadata, f_name, param) + for key, value in serialized_params.items(): path = path.replace( - '{' + param_metadata.get('field_name', field.name) + '}', _val_to_string(param), 1) + '{' + key + '}', value, 1) + else: + if param_metadata.get('style', 'simple') == 'simple': + if isinstance(param, List): + pp_vals: List[str] = [] + for pp_val in param: + if pp_val is None: + continue + pp_vals.append(_val_to_string(pp_val)) + path = path.replace( + '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) + elif isinstance(param, Dict): + pp_vals: List[str] = [] + for pp_key in param: + if param[pp_key] is None: + continue + if param_metadata.get('explode'): + pp_vals.append( + f"{pp_key}={_val_to_string(param[pp_key])}") + else: + pp_vals.append( + f"{pp_key},{_val_to_string(param[pp_key])}") + path = path.replace( + '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) + elif not isinstance(param, (str, int, float, complex, bool, Decimal)): + pp_vals: List[str] = [] + param_fields: Tuple[Field, ...] = fields(param) + for param_field in param_fields: + param_value_metadata = param_field.metadata.get( + 'path_param') + if not param_value_metadata: + continue + + parm_name = param_value_metadata.get( + 'field_name', field.name) + + param_field_val = getattr(param, param_field.name) + if param_field_val is None: + continue + if param_metadata.get('explode'): + pp_vals.append( + f"{parm_name}={_val_to_string(param_field_val)}") + else: + pp_vals.append( + f"{parm_name},{_val_to_string(param_field_val)}") + path = path.replace( + '{' + param_metadata.get('field_name', field.name) + '}', ",".join(pp_vals), 1) + else: + path = path.replace( + '{' + param_metadata.get('field_name', field.name) + '}', _val_to_string(param), 1) - return server_url.removesuffix("/") + path + return remove_suffix(server_url, '/') + path def is_optional(field): return get_origin(field) is Union and type(None) in get_args(field) -def template_url(url_with_params: str, params: dict[str, str]) -> str: +def template_url(url_with_params: str, params: Dict[str, str]) -> str: for key, value in params.items(): url_with_params = url_with_params.replace( '{' + key + '}', value) @@ -224,8 +238,9 @@ def template_url(url_with_params: str, params: dict[str, str]) -> str: return url_with_params -def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[str, dict[str, Any]]] = None) -> dict[str, list[str]]: - params: dict[str, list[str]] = {} +def get_query_params(clazz: type, query_params: dataclass, gbls: Dict[str, Dict[str, Dict[str, Any]]] = None) -> Dict[ + str, List[str]]: + params: Dict[str, List[str]] = {} param_fields: Tuple[Field, ...] = fields(clazz) for field in param_fields: @@ -246,26 +261,33 @@ def get_query_params(clazz: type, query_params: dataclass, gbls: dict[str, dict[ f_name = metadata.get("field_name") serialization = metadata.get('serialization', '') if serialization != '': - params = params | _get_serialized_query_params( - metadata, f_name, value) + serialized_parms = _get_serialized_params(metadata, f_name, value) + for key, value in serialized_parms.items(): + if key in params: + params[key].extend(value) + else: + params[key] = [value] else: style = metadata.get('style', 'form') if style == 'deepObject': - params = params | _get_deep_object_query_params( - metadata, f_name, value) + params = {**params, **_get_deep_object_query_params( + metadata, f_name, value)} elif style == 'form': - params = params | _get_form_query_params( - metadata, f_name, value) + params = {**params, **_get_delimited_query_params( + metadata, f_name, value, ",")} + elif style == 'pipeDelimited': + params = {**params, **_get_delimited_query_params( + metadata, f_name, value, "|")} else: raise Exception('not yet implemented') return params -def get_headers(headers_params: dataclass) -> dict[str, str]: +def get_headers(headers_params: dataclass) -> Dict[str, str]: if headers_params is None: return {} - headers: dict[str, str] = {} + headers: Dict[str, str] = {} param_fields: Tuple[Field, ...] = fields(headers_params) for field in param_fields: @@ -282,8 +304,8 @@ def get_headers(headers_params: dataclass) -> dict[str, str]: return headers -def _get_serialized_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]: - params: dict[str, list[str]] = {} +def _get_serialized_params(metadata: Dict, field_name: str, obj: any) -> Dict[str, str]: + params: Dict[str, str] = {} serialization = metadata.get('serialization', '') if serialization == 'json': @@ -292,8 +314,8 @@ def _get_serialized_query_params(metadata: dict, field_name: str, obj: any) -> d return params -def _get_deep_object_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]: - params: dict[str, list[str]] = {} +def _get_deep_object_query_params(metadata: Dict, field_name: str, obj: any) -> Dict[str, List[str]]: + params: Dict[str, List[str]] = {} if obj is None: return params @@ -309,27 +331,30 @@ def _get_deep_object_query_params(metadata: dict, field_name: str, obj: any) -> if obj_val is None: continue - if isinstance(obj_val, list): + if isinstance(obj_val, List): for val in obj_val: if val is None: continue - if params.get(f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None: - params[f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ + if params.get( + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None: + params[ + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ ] params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append(_val_to_string(val)) + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append( + _val_to_string(val)) else: params[ f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ _val_to_string(obj_val)] - elif isinstance(obj, dict): + elif isinstance(obj, Dict): for key, value in obj.items(): if value is None: continue - if isinstance(value, list): + if isinstance(value, List): for val in value: if val is None: continue @@ -355,28 +380,36 @@ def _get_query_param_field_name(obj_field: Field) -> str: return obj_param_metadata.get("field_name", obj_field.name) -def _get_form_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]: - return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name) +def _get_delimited_query_params(metadata: Dict, field_name: str, obj: any, delimiter: str) -> Dict[ + str, List[str]]: + return _populate_form(field_name, metadata.get("explode", True), obj, _get_query_param_field_name, delimiter) SERIALIZATION_METHOD_TO_CONTENT_TYPE = { - 'json': 'application/json', - 'form': 'application/x-www-form-urlencoded', + 'json': 'application/json', + 'form': 'application/x-www-form-urlencoded', 'multipart': 'multipart/form-data', - 'raw': 'application/octet-stream', - 'string': 'text/plain', + 'raw': 'application/octet-stream', + 'string': 'text/plain', } -def serialize_request_body(request: dataclass, request_field_name: str, serialization_method: str) -> Tuple[str, any, any]: +def serialize_request_body(request: dataclass, request_field_name: str, nullable: bool, optional: bool, serialization_method: str, encoder=None) -> Tuple[ + str, any, any]: if request is None: - return None, None, None, None + if not nullable and optional: + return None, None, None if not is_dataclass(request) or not hasattr(request, request_field_name): - return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request) + return serialize_content_type(request_field_name, SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], + request, encoder) request_val = getattr(request, request_field_name) + if request_val is None: + if not nullable and optional: + return None, None, None + request_fields: Tuple[Field, ...] = fields(request) request_metadata = None @@ -388,12 +421,13 @@ def serialize_request_body(request: dataclass, request_field_name: str, serializ if request_metadata is None: raise Exception('invalid request type') - return serialize_content_type(request_field_name, request_metadata.get('media_type', 'application/octet-stream'), request_val) + return serialize_content_type(request_field_name, request_metadata.get('media_type', 'application/octet-stream'), + request_val) -def serialize_content_type(field_name: str, media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: +def serialize_content_type(field_name: str, media_type: str, request: dataclass, encoder=None) -> Tuple[str, any, List[List[any]]]: if re.match(r'(application|text)\/.*?\+*json.*', media_type) is not None: - return media_type, marshal_json(request), None + return media_type, marshal_json(request, encoder), None if re.match(r'multipart\/.*', media_type) is not None: return serialize_multipart_form(media_type, request) if re.match(r'application\/x-www-form-urlencoded.*', media_type) is not None: @@ -407,8 +441,8 @@ def serialize_content_type(field_name: str, media_type: str, request: dataclass) f"invalid request body type {type(request)} for mediaType {media_type}") -def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: - form: list[list[any]] = [] +def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, any, List[List[any]]]: + form: List[List[any]] = [] request_fields = fields(request) for field in request_fields: @@ -449,7 +483,7 @@ def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, else: field_name = field_metadata.get( "field_name", field.name) - if isinstance(val, list): + if isinstance(val, List): for value in val: if value is None: continue @@ -460,8 +494,8 @@ def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, return media_type, None, form -def serialize_dict(original: dict, explode: bool, field_name, existing: Optional[dict[str, list[str]]]) -> dict[ - str, list[str]]: +def serialize_dict(original: Dict, explode: bool, field_name, existing: Optional[Dict[str, List[str]]]) -> Dict[ + str, List[str]]: if existing is None: existing = [] @@ -481,8 +515,8 @@ def serialize_dict(original: dict, explode: bool, field_name, existing: Optional return existing -def serialize_form_data(field_name: str, data: dataclass) -> dict[str, any]: - form: dict[str, list[str]] = {} +def serialize_form_data(field_name: str, data: dataclass) -> Dict[str, any]: + form: Dict[str, List[str]] = {} if is_dataclass(data): for field in fields(data): @@ -500,12 +534,12 @@ def serialize_form_data(field_name: str, data: dataclass) -> dict[str, any]: form[field_name] = [marshal_json(val)] else: if metadata.get('style', 'form') == 'form': - form = form | _populate_form( - field_name, metadata.get('explode', True), val, _get_form_field_name) + form = {**form, **_populate_form( + field_name, metadata.get('explode', True), val, _get_form_field_name, ",")} else: raise Exception( f'Invalid form style for field {field.name}') - elif isinstance(data, dict): + elif isinstance(data, Dict): for key, value in data.items(): form[key] = [_val_to_string(value)] else: @@ -523,8 +557,9 @@ def _get_form_field_name(obj_field: Field) -> str: return obj_param_metadata.get("field_name", obj_field.name) -def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable) -> dict[str, list[str]]: - params: dict[str, list[str]] = {} +def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable, delimiter: str) -> \ + Dict[str, List[str]]: + params: Dict[str, List[str]] = {} if obj is None: return params @@ -546,11 +581,11 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f params[obj_field_name] = [_val_to_string(val)] else: items.append( - f'{obj_field_name},{_val_to_string(val)}') + f'{obj_field_name}{delimiter}{_val_to_string(val)}') if len(items) > 0: - params[field_name] = [','.join(items)] - elif isinstance(obj, dict): + params[field_name] = [delimiter.join(items)] + elif isinstance(obj, Dict): items = [] for key, value in obj.items(): if value is None: @@ -559,11 +594,11 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f if explode: params[key] = _val_to_string(value) else: - items.append(f'{key},{_val_to_string(value)}') + items.append(f'{key}{delimiter}{_val_to_string(value)}') if len(items) > 0: - params[field_name] = [','.join(items)] - elif isinstance(obj, list): + params[field_name] = [delimiter.join(items)] + elif isinstance(obj, List): items = [] for value in obj: @@ -578,7 +613,8 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f items.append(_val_to_string(value)) if len(items) > 0: - params[field_name] = [','.join([str(item) for item in items])] + params[field_name] = [delimiter.join( + [str(item) for item in items])] else: params[field_name] = [_val_to_string(obj)] @@ -616,7 +652,7 @@ def _serialize_header(explode: bool, obj: any) -> str: if len(items) > 0: return ','.join(items) - elif isinstance(obj, dict): + elif isinstance(obj, Dict): items = [] for key, value in obj.items(): @@ -631,7 +667,7 @@ def _serialize_header(explode: bool, obj: any) -> str: if len(items) > 0: return ','.join([str(item) for item in items]) - elif isinstance(obj, list): + elif isinstance(obj, List): items = [] for value in obj: @@ -648,20 +684,28 @@ def _serialize_header(explode: bool, obj: any) -> str: return '' -def unmarshal_json(data, typ): - unmarhsal = make_dataclass('Unmarhsal', [('res', typ)], +def unmarshal_json(data, typ, decoder=None): + unmarshal = make_dataclass('Unmarshal', [('res', typ)], bases=(DataClassJsonMixin,)) json_dict = json.loads(data) - out = unmarhsal.from_dict({"res": json_dict}) - return out.res + try: + out = unmarshal.from_dict({"res": json_dict}) + except AttributeError as attr_err: + raise AttributeError( + f'unable to unmarshal {data} as {typ}') from attr_err + + return out.res if decoder is None else decoder(out.res) -def marshal_json(val): +def marshal_json(val, encoder=None): marshal = make_dataclass('Marshal', [('res', type(val))], bases=(DataClassJsonMixin,)) marshaller = marshal(res=val) json_dict = marshaller.to_dict() - return json.dumps(json_dict["res"]) + + val = json_dict["res"] if encoder is None else encoder(json_dict["res"]) + + return json.dumps(val) def match_content_type(content_type: str, pattern: str) -> boolean: @@ -705,6 +749,106 @@ def datefromisoformat(date_str: str): return dateutil.parser.parse(date_str).date() +def bigintencoder(optional: bool): + def bigintencode(val: int): + if optional and val is None: + return None + return str(val) + + return bigintencode + + +def bigintdecoder(val): + if isinstance(val, float): + raise ValueError(f"{val} is a float") + return int(val) + + +def decimalencoder(optional: bool, as_str: bool): + def decimalencode(val: Decimal): + if optional and val is None: + return None + + if as_str: + return str(val) + + return float(val) + + return decimalencode + + +def decimaldecoder(val): + return Decimal(str(val)) + + +def map_encoder(optional: bool, value_encoder: Callable): + def map_encode(val: Dict): + if optional and val is None: + return None + + encoded = {} + for key, value in val.items(): + encoded[key] = value_encoder(value) + + return encoded + + return map_encode + + +def map_decoder(value_decoder: Callable): + def map_decode(val: Dict): + decoded = {} + for key, value in val.items(): + decoded[key] = value_decoder(value) + + return decoded + + return map_decode + + +def list_encoder(optional: bool, value_encoder: Callable): + def list_encode(val: List): + if optional and val is None: + return None + + encoded = [] + for value in val: + encoded.append(value_encoder(value)) + + return encoded + + return list_encode + + +def list_decoder(value_decoder: Callable): + def list_decode(val: List): + decoded = [] + for value in val: + decoded.append(value_decoder(value)) + + return decoded + + return list_decode + +def union_encoder(all_encoders: Dict[str, Callable]): + def selective_encoder(val: any): + if type(val) in all_encoders: + return all_encoders[type(val)](val) + return val + return selective_encoder + +def union_decoder(all_decoders: List[Callable]): + def selective_decoder(val: any): + decoded = val + for decoder in all_decoders: + try: + decoded = decoder(val) + break + except (TypeError, ValueError): + continue + return decoded + return selective_decoder + def get_field_name(name): def override(_, _field_name=name): return _field_name @@ -718,12 +862,12 @@ def _val_to_string(val): if isinstance(val, datetime): return val.isoformat().replace('+00:00', 'Z') if isinstance(val, Enum): - return val.value + return str(val.value) return str(val) -def _populate_from_globals(param_name: str, value: any, param_type: str, gbls: dict[str, dict[str, dict[str, Any]]]): +def _populate_from_globals(param_name: str, value: any, param_type: str, gbls: Dict[str, Dict[str, Dict[str, Any]]]): if value is None and gbls is not None: if 'parameters' in gbls: if param_type in gbls['parameters']: @@ -733,3 +877,16 @@ def _populate_from_globals(param_name: str, value: any, param_type: str, gbls: d value = global_value return value + + +def decoder_with_discriminator(field_name): + def decode_fx(obj): + kls = getattr(sys.modules['sdk.models.shared'], obj[field_name]) + return unmarshal_json(json.dumps(obj), kls) + return decode_fx + + +def remove_suffix(input_string, suffix): + if suffix and input_string.endswith(suffix): + return input_string[:-len(suffix)] + return input_string diff --git a/workflows_execution/src/epilot/workflows.py b/workflows_execution/src/epilot/workflows.py index a8b011b60..a53f0456c 100755 --- a/workflows_execution/src/epilot/workflows.py +++ b/workflows_execution/src/epilot/workflows.py @@ -1,43 +1,35 @@ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" -import requests as requests_http -from . import utils -from epilot.models import operations, shared -from typing import Optional +from .sdkconfiguration import SDKConfiguration +from epilot import utils +from epilot.models import errors, operations, shared +from typing import List, Optional class Workflows: r"""Interact with workflow executions - start / close / retrieve one or all / search / delete""" - _client: requests_http.Session - _security_client: requests_http.Session - _server_url: str - _language: str - _sdk_version: str - _gen_version: str - - def __init__(self, client: requests_http.Session, security_client: requests_http.Session, server_url: str, language: str, sdk_version: str, gen_version: str) -> None: - self._client = client - self._security_client = security_client - self._server_url = server_url - self._language = language - self._sdk_version = sdk_version - self._gen_version = gen_version + sdk_configuration: SDKConfiguration + + def __init__(self, sdk_config: SDKConfiguration) -> None: + self.sdk_configuration = sdk_config + def create_execution(self, request: shared.WorkflowExecutionCreateReq) -> operations.CreateExecutionResponse: r"""createExecution Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template). """ - base_url = self._server_url - - url = base_url.removesuffix('/') + '/v1/workflows/executions' + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + url = base_url + '/v1/workflows/executions' headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "request", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('POST', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -48,29 +40,35 @@ def create_execution(self, request: shared.WorkflowExecutionCreateReq) -> operat if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.WorkflowExecution]) res.workflow_execution = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 500]: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def create_step(self, request: operations.CreateStepRequest) -> operations.CreateStepResponse: r"""createStep Create a new step in current workflow execution. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.CreateStepRequest, base_url, '/v1/workflows/executions/{executionId}/steps', request) - headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "create_step_req", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "create_step_req", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('POST', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -81,25 +79,32 @@ def create_step(self, request: operations.CreateStepRequest) -> operations.Creat if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Step]) res.step = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 500]: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def delete_execution(self, request: operations.DeleteExecutionRequest) -> operations.DeleteExecutionResponse: r"""deleteExecution Delete workflow execution by id. Workflow contexts will NOT be deleted. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DeleteExecutionRequest, base_url, '/v1/workflows/executions/{executionId}', request) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent + client = self.sdk_configuration.security_client - client = self._security_client - - http_res = client.request('DELETE', url) + http_res = client.request('DELETE', url, headers=headers) content_type = http_res.headers.get('Content-Type') res = operations.DeleteExecutionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) @@ -110,21 +115,26 @@ def delete_execution(self, request: operations.DeleteExecutionRequest) -> operat if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def delete_step(self, request: operations.DeleteStepRequest) -> operations.DeleteStepResponse: r"""deleteStep Deletes a step from a workflow execution. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.DeleteStepRequest, base_url, '/v1/workflows/executions/{executionId}/steps/{stepId}', request) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent + client = self.sdk_configuration.security_client - client = self._security_client - - http_res = client.request('DELETE', url) + http_res = client.request('DELETE', url, headers=headers) content_type = http_res.headers.get('Content-Type') res = operations.DeleteStepResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) @@ -135,24 +145,28 @@ def delete_step(self, request: operations.DeleteStepRequest) -> operations.Delet if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def get_closing_reason_execution(self, request: operations.GetClosingReasonExecutionRequest) -> operations.GetClosingReasonExecutionResponse: r"""getClosingReasonExecution Shows all Closing Reasons defined at the moment of starting the Workflow Execution. The Closing Reasons shown in the execution are just snapshots from the state of the Definition when the instance was created. - """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetClosingReasonExecutionRequest, base_url, '/v1/workflows/executions/{executionId}/closing-reasons', request) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent + client = self.sdk_configuration.security_client - client = self._security_client - - http_res = client.request('GET', url) + http_res = client.request('GET', url, headers=headers) content_type = http_res.headers.get('Content-Type') res = operations.GetClosingReasonExecutionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) @@ -161,25 +175,32 @@ def get_closing_reason_execution(self, request: operations.GetClosingReasonExecu if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ClosingReasonResp]) res.closing_reason_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code == 500: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def get_execution(self, request: operations.GetExecutionRequest) -> operations.GetExecutionResponse: r"""getExecution Get a full workflow execution, included steps information, by execution id. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.GetExecutionRequest, base_url, '/v1/workflows/executions/{executionId}', request) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent + client = self.sdk_configuration.security_client - client = self._security_client - - http_res = client.request('GET', url) + http_res = client.request('GET', url, headers=headers) content_type = http_res.headers.get('Content-Type') res = operations.GetExecutionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) @@ -188,57 +209,70 @@ def get_execution(self, request: operations.GetExecutionRequest) -> operations.G if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.WorkflowExecution]) res.workflow_execution = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code == 500: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def get_executions(self, request: operations.GetExecutionsRequest) -> operations.GetExecutionsResponse: r"""getExecutions Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information. """ - base_url = self._server_url - - url = base_url.removesuffix('/') + '/v1/workflows/executions' + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + url = base_url + '/v1/workflows/executions' + headers = {} query_params = utils.get_query_params(operations.GetExecutionsRequest, request) + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client - http_res = client.request('GET', url, params=query_params) + http_res = client.request('GET', url, params=query_params, headers=headers) content_type = http_res.headers.get('Content-Type') res = operations.GetExecutionsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res) if http_res.status_code == 200: if utils.match_content_type(content_type, 'application/json'): - out = utils.unmarshal_json(http_res.text, Optional[list[shared.WorkflowExecutionSlim]]) + out = utils.unmarshal_json(http_res.text, Optional[List[shared.WorkflowExecutionSlim]]) res.workflow_execution_slims = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code == 500: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def search_executions(self, request: shared.SearchExecutionsReq) -> operations.SearchExecutionsResponse: r"""searchExecutions Search Workflow Executions by different filters. """ - base_url = self._server_url - - url = base_url.removesuffix('/') + '/v1/workflows/executions/search' + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + url = base_url + '/v1/workflows/executions/search' headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "request", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('POST', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -249,29 +283,37 @@ def search_executions(self, request: shared.SearchExecutionsReq) -> operations.S if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.SearchExecutionsResp]) res.search_executions_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 500]: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def search_steps(self, request: shared.SearchStepsReq) -> operations.SearchStepsResponse: r"""searchSteps Search workflow execution steps by different filters. + + Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. """ - base_url = self._server_url - - url = base_url.removesuffix('/') + '/v1/workflows/executions/steps/search' + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) + url = base_url + '/v1/workflows/executions/steps/search' headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "request", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "request", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('POST', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -282,29 +324,35 @@ def search_steps(self, request: shared.SearchStepsReq) -> operations.SearchSteps if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.SearchStepsResp]) res.search_steps_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 500]: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def update_execution(self, request: operations.UpdateExecutionRequest) -> operations.UpdateExecutionResponse: r"""updateExecution Patches updates like assignees, status, closingReason for a single Workflow Execution. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.UpdateExecutionRequest, base_url, '/v1/workflows/executions/{executionId}', request) - headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "workflow_execution_update_req", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "workflow_execution_update_req", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('PATCH', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -317,25 +365,29 @@ def update_execution(self, request: operations.UpdateExecutionRequest) -> operat if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res + def update_step(self, request: operations.UpdateStepRequest) -> operations.UpdateStepResponse: r"""updateStep Patches various changes to a workflow execution step. """ - base_url = self._server_url + base_url = utils.template_url(*self.sdk_configuration.get_server_details()) url = utils.generate_url(operations.UpdateStepRequest, base_url, '/v1/workflows/executions/{executionId}/steps/{stepId}', request) - headers = {} - req_content_type, data, form = utils.serialize_request_body(request, "update_step_req", 'json') + req_content_type, data, form = utils.serialize_request_body(request, "update_step_req", False, False, 'json') if req_content_type not in ('multipart/form-data', 'multipart/mixed'): headers['content-type'] = req_content_type if data is None and form is None: raise Exception('request body is required') + headers['Accept'] = 'application/json' + headers['user-agent'] = self.sdk_configuration.user_agent - client = self._security_client + client = self.sdk_configuration.security_client http_res = client.request('PATCH', url, data=data, files=form, headers=headers) content_type = http_res.headers.get('Content-Type') @@ -346,10 +398,14 @@ def update_step(self, request: operations.UpdateStepRequest) -> operations.Updat if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.Step]) res.step = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) elif http_res.status_code in [400, 401, 500]: if utils.match_content_type(content_type, 'application/json'): out = utils.unmarshal_json(http_res.text, Optional[shared.ErrorResp]) res.error_resp = out + else: + raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res) return res