diff --git a/workflows_definition/.gitattributes b/workflows_definition/.gitattributes
new file mode 100755
index 000000000..4d75d5900
--- /dev/null
+++ b/workflows_definition/.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_definition/.gitignore b/workflows_definition/.gitignore
new file mode 100755
index 000000000..8ac3f51d4
--- /dev/null
+++ b/workflows_definition/.gitignore
@@ -0,0 +1,7 @@
+.python-version
+.DS_Store
+venv/
+src/*.egg-info/
+__pycache__/
+.pytest_cache/
+.python-version`
diff --git a/workflows_definition/README.md b/workflows_definition/README.md
index a1825dc80..dae3126d7 100755
--- a/workflows_definition/README.md
+++ b/workflows_definition/README.md
@@ -16,45 +16,172 @@ from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
- bearer_auth="Bearer YOUR_BEARER_TOKEN_HERE",
+ bearer_auth="",
),
)
-
req = operations.ChangeReasonStatusRequest(
change_reason_status_req=shared.ChangeReasonStatusReq(
- status="INACTIVE",
+ status=shared.ClosingReasonsStatus.ACTIVE,
),
- reason_id="deserunt",
+ reason_id='string',
)
-
+
res = s.closing_reason.change_reason_status(req)
if res.status_code == 200:
# handle response
+ pass
```
-## SDK Available Operations
+## Available Resources and Operations
-### closing_reason
+### [closing_reason](docs/sdks/closingreason/README.md)
-* `change_reason_status` - changeReasonStatus
-* `create_closing_reason` - createClosingReason
-* `get_all_closing_reasons` - getAllClosingReasons
+* [change_reason_status](docs/sdks/closingreason/README.md#change_reason_status) - changeReasonStatus
+* [create_closing_reason](docs/sdks/closingreason/README.md#create_closing_reason) - createClosingReason
+* [get_all_closing_reasons](docs/sdks/closingreason/README.md#get_all_closing_reasons) - getAllClosingReasons
-### workflows
+### [workflows](docs/sdks/workflows/README.md)
-* `create_definition` - createDefinition
-* `delete_definition` - deleteDefinition
-* `get_definition` - getDefinition
-* `get_definitions` - getDefinitions
-* `get_max_allowed_limit` - getMaxAllowedLimit
-* `get_workflow_closing_reasons` - getWorkflowClosingReasons
-* `set_workflow_closing_reasons` - setWorkflowClosingReasons
-* `update_definition` - updateDefinition
+* [create_definition](docs/sdks/workflows/README.md#create_definition) - createDefinition
+* [delete_definition](docs/sdks/workflows/README.md#delete_definition) - deleteDefinition
+* [get_definition](docs/sdks/workflows/README.md#get_definition) - getDefinition
+* [get_definitions](docs/sdks/workflows/README.md#get_definitions) - getDefinitions
+* [get_max_allowed_limit](docs/sdks/workflows/README.md#get_max_allowed_limit) - getMaxAllowedLimit
+* [get_workflow_closing_reasons](docs/sdks/workflows/README.md#get_workflow_closing_reasons) - getWorkflowClosingReasons
+* [set_workflow_closing_reasons](docs/sdks/workflows/README.md#set_workflow_closing_reasons) - setWorkflowClosingReasons
+* [update_definition](docs/sdks/workflows/README.md#update_definition) - updateDefinition
+
+
+
+
+
+
+
+
+
+# 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-definition.sls.epilot.io` | None |
+
+For example:
+
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+ server_idx=0
+)
+
+req = operations.ChangeReasonStatusRequest(
+ change_reason_status_req=shared.ChangeReasonStatusReq(
+ status=shared.ClosingReasonsStatus.ACTIVE,
+ ),
+ reason_id='string',
+)
+
+res = s.closing_reason.change_reason_status(req)
+
+if res.status_code == 200:
+ # 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 sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+ server_url="https://workflows-definition.sls.epilot.io"
+)
+
+req = operations.ChangeReasonStatusRequest(
+ change_reason_status_req=shared.ChangeReasonStatusReq(
+ status=shared.ClosingReasonsStatus.ACTIVE,
+ ),
+ reason_id='string',
+)
+
+res = s.closing_reason.change_reason_status(req)
+
+if res.status_code == 200:
+ # 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 sdk
+import requests
+
+http_client = requests.Session()
+http_client.headers.update({'x-custom-header': 'someValue'})
+s = sdk.SDK(client: http_client)
+```
+
+
+
+
+
+
+
+
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
diff --git a/workflows_definition/RELEASES.md b/workflows_definition/RELEASES.md
index 123baccfc..2c2030952 100644
--- a/workflows_definition/RELEASES.md
+++ b/workflows_definition/RELEASES.md
@@ -34,4 +34,548 @@ Based on:
### Changes
Based on:
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.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:34:59
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.19.3 (2.16.7) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-06 01:25:06
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.19.6 (2.17.8) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-12 01:27:01
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.19.7 (2.17.9) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-14 01:25:55
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.20.0 (2.18.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-18 01:25:56
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.20.1 (2.18.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-19 01:35:08
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.20.2 (2.18.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-21 01:25:55
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.21.4 (2.19.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-22 01:29:24
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.22.1 (2.20.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-26 01:33:29
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.23.1 (2.21.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-27 01:34:59
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.25.1 (2.22.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-28 01:35:46
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.26.2 (2.23.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-04-29 01:27:36
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.26.4 (2.23.4) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-02 01:34:07
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.26.5 (2.23.6) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-03 01:33:54
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.27.0 (2.24.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-05 01:22:41
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.29.0 (2.26.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-06 01:22:51
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.29.1 (2.26.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-10 01:25:17
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.29.2 (2.26.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-11 01:33:46
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.30.0 (2.26.3) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-12 01:26:21
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.30.1 (2.26.4) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-13 01:25:35
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.31.1 (2.27.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-16 01:36:51
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.32.0 (2.28.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-17 01:37:07
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.33.2 (2.29.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-18 01:34:30
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.34.0 (2.30.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-19 01:35:13
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.35.0 (2.31.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-23 01:36:05
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.37.5 (2.32.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-05-27 01:35:11
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.39.0 (2.32.7) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-01 02:10:25
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.40.2 (2.34.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-02 01:52:42
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.41.0 (2.34.7) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-03 01:49:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.43.0 (2.35.3) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-07 01:55:31
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.44.2 (2.35.9) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-08 01:53:22
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.45.0 (2.37.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-09 01:53:25
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.45.2 (2.37.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-10 01:44:03
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.47.0 (2.39.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-11 02:00:45
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.47.1 (2.39.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-14 01:45:01
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.47.3 (2.40.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-16 01:45:00
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.48.0 (2.41.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-20 01:40:06
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.49.0 (2.41.4) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-21 01:41:31
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.49.1 (2.41.5) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-23 01:56:28
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.50.1 (2.43.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-27 01:58:27
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.51.1 (2.50.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-06-29 01:53:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.51.3 (2.52.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-01 02:02:58
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.52.0 (2.55.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-06 01:59:15
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.52.2 (2.57.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-07 01:56:33
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.53.0 (2.58.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-08 01:55:40
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.53.1 (2.58.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-11 01:49:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.56.0 (2.61.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-12 01:56:56
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.56.4 (2.61.5) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-13 01:59:43
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.57.0 (2.62.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-14 01:59:12
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.59.0 (2.65.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-17 02:02:44
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.60.0 (2.66.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-18 02:06:57
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.61.0 (2.70.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-19 02:54:56
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.62.1 (2.70.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-22 01:37:07
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.64.0 (2.71.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-26 01:40:36
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.65.0 (2.73.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-27 01:22:32
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.65.1 (2.73.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-07-28 01:23:55
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.65.2 (2.75.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-08-01 01:42:20
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.66.1 (2.75.2) https://github.com/speakeasy-api/speakeasy
+
+## 2023-08-03 01:25:26
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.68.1 (2.77.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-08-04 01:26:16
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.68.3 (2.81.1) https://github.com/speakeasy-api/speakeasy
+
+## 2023-08-08 01:23:38
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.69.1 (2.82.0) https://github.com/speakeasy-api/speakeasy
+
+## 2023-08-15 01:13:01
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.72.0 (2.84.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.41.0] workflows_definition
+
+## 2023-08-19 01:10:26
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.74.3 (2.86.6) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.41.1] workflows_definition
+
+## 2023-08-25 01:14:15
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.74.11 (2.87.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.41.2] workflows_definition
+
+## 2023-08-26 01:11:21
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.74.16 (2.88.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.42.0] workflows_definition
+
+## 2023-08-29 01:14:44
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.74.17 (2.88.5) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.42.1] workflows_definition
+
+## 2023-08-31 01:14:51
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.76.1 (2.89.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.43.0] workflows_definition
+
+## 2023-09-01 01:19:06
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.77.0 (2.91.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.0] workflows_definition
+
+## 2023-09-02 01:11:46
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.77.2 (2.93.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.1] workflows_definition
+
+## 2023-09-05 01:13:18
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.78.3 (2.96.3) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.2] workflows_definition
+
+## 2023-09-12 01:13:17
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.3] workflows_definition
+
+## 2023-09-16 01:13:34
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.86.0 (2.115.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.4] workflows_definition
+
+## 2023-09-20 01:15:18
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.88.0 (2.118.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.44.5] workflows_definition
+
+## 2023-09-26 01:16:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.91.0 (2.129.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.45.0] workflows_definition
+
+## 2023-09-27 01:16:24
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.91.2 (2.131.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.45.1] workflows_definition
+
+## 2023-09-29 01:15:45
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.91.3 (2.139.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.46.0] workflows_definition
+
+## 2023-10-01 01:25:20
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.92.2 (2.142.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.47.0] workflows_definition
+
+## 2023-10-02 01:16:33
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.92.3 (2.143.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.47.1] workflows_definition
+
+## 2023-10-05 01:16:33
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.94.0 (2.147.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.47.2] workflows_definition
+
+## 2023-10-07 01:15:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.96.1 (2.150.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.48.0] workflows_definition
+
+## 2023-10-13 01:18:10
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.99.1 (2.154.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.48.1] workflows_definition
+
+## 2023-10-18 01:16:47
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.101.0 (2.161.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v2.0.0] workflows_definition
+
+## 2023-10-21 01:14:07
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.104.0 (2.169.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v2.1.0] workflows_definition
+
+## 2023-10-28 01:13:24
+### Changes
+Based on:
+- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/workflows-definition.yaml
+- Speakeasy CLI 1.109.0 (2.173.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v2.1.1] workflows_definition
\ No newline at end of file
diff --git a/workflows_definition/USAGE.md b/workflows_definition/USAGE.md
index bc7b4fadb..7a8888a71 100755
--- a/workflows_definition/USAGE.md
+++ b/workflows_definition/USAGE.md
@@ -1,25 +1,27 @@
+
+
```python
import sdk
from sdk.models import operations, shared
s = sdk.SDK(
security=shared.Security(
- bearer_auth="Bearer YOUR_BEARER_TOKEN_HERE",
+ bearer_auth="",
),
)
-
req = operations.ChangeReasonStatusRequest(
change_reason_status_req=shared.ChangeReasonStatusReq(
- status="INACTIVE",
+ status=shared.ClosingReasonsStatus.ACTIVE,
),
- reason_id="deserunt",
+ reason_id='string',
)
-
+
res = s.closing_reason.change_reason_status(req)
if res.status_code == 200:
# handle response
+ pass
```
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/changereasonstatusrequest.md b/workflows_definition/docs/models/operations/changereasonstatusrequest.md
new file mode 100755
index 000000000..a140aca24
--- /dev/null
+++ b/workflows_definition/docs/models/operations/changereasonstatusrequest.md
@@ -0,0 +1,9 @@
+# ChangeReasonStatusRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
+| `change_reason_status_req` | [Optional[shared.ChangeReasonStatusReq]](../../models/shared/changereasonstatusreq.md) | :heavy_minus_sign: | change the status of a closing reason |
+| `reason_id` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/changereasonstatusresponse.md b/workflows_definition/docs/models/operations/changereasonstatusresponse.md
new file mode 100755
index 000000000..012a6b383
--- /dev/null
+++ b/workflows_definition/docs/models/operations/changereasonstatusresponse.md
@@ -0,0 +1,11 @@
+# ChangeReasonStatusResponse
+
+
+## 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: | bad request |
+| `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_definition/docs/models/operations/createclosingreasonresponse.md b/workflows_definition/docs/models/operations/createclosingreasonresponse.md
new file mode 100755
index 000000000..4a7eb57f6
--- /dev/null
+++ b/workflows_definition/docs/models/operations/createclosingreasonresponse.md
@@ -0,0 +1,11 @@
+# CreateClosingReasonResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `closing_reason` | [Optional[shared.ClosingReason]](../../models/shared/closingreason.md) | :heavy_minus_sign: | closing reason is stored successfully in the repository |
+| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
+| `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_definition/docs/models/operations/createdefinitionresponse.md b/workflows_definition/docs/models/operations/createdefinitionresponse.md
new file mode 100755
index 000000000..bf9a2c98e
--- /dev/null
+++ b/workflows_definition/docs/models/operations/createdefinitionresponse.md
@@ -0,0 +1,12 @@
+# CreateDefinitionResponse
+
+
+## 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_definition` | [Optional[shared.WorkflowDefinition]](../../models/shared/workflowdefinition.md) | :heavy_minus_sign: | Success - if the definition is created successfully |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/deletedefinitionrequest.md b/workflows_definition/docs/models/operations/deletedefinitionrequest.md
new file mode 100755
index 000000000..4644cc5a7
--- /dev/null
+++ b/workflows_definition/docs/models/operations/deletedefinitionrequest.md
@@ -0,0 +1,8 @@
+# DeleteDefinitionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
+| `definition_id` | *str* | :heavy_check_mark: | Id of the definition to de deleted. |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/deletedefinitionresponse.md b/workflows_definition/docs/models/operations/deletedefinitionresponse.md
new file mode 100755
index 000000000..568621af6
--- /dev/null
+++ b/workflows_definition/docs/models/operations/deletedefinitionresponse.md
@@ -0,0 +1,11 @@
+# DeleteDefinitionResponse
+
+
+## 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_definition/docs/models/operations/getallclosingreasonsrequest.md b/workflows_definition/docs/models/operations/getallclosingreasonsrequest.md
new file mode 100755
index 000000000..258ca6c8e
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getallclosingreasonsrequest.md
@@ -0,0 +1,8 @@
+# GetAllClosingReasonsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
+| `include_inactive` | *Optional[bool]* | :heavy_minus_sign: | Filter Closing Reasons by status like active inactiv |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/getallclosingreasonsresponse.md b/workflows_definition/docs/models/operations/getallclosingreasonsresponse.md
new file mode 100755
index 000000000..36e0e2283
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getallclosingreasonsresponse.md
@@ -0,0 +1,11 @@
+# GetAllClosingReasonsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `closing_reasons` | [Optional[shared.ClosingReasons]](../../models/shared/closingreasons.md) | :heavy_minus_sign: | Returns the entire catalog of closing reasons per organization |
+| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
+| `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_definition/docs/models/operations/getdefinitionrequest.md b/workflows_definition/docs/models/operations/getdefinitionrequest.md
new file mode 100755
index 000000000..54c03eb0c
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getdefinitionrequest.md
@@ -0,0 +1,8 @@
+# GetDefinitionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
+| `definition_id` | *str* | :heavy_check_mark: | Short uuid (length 8) to identify the Workflow Definition. |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/getdefinitionresponse.md b/workflows_definition/docs/models/operations/getdefinitionresponse.md
new file mode 100755
index 000000000..fc37b0d45
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getdefinitionresponse.md
@@ -0,0 +1,13 @@
+# GetDefinitionResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
+| `definition_not_found_resp` | [Optional[shared.DefinitionNotFoundResp]](../../models/shared/definitionnotfoundresp.md) | :heavy_minus_sign: | Definition Not found |
+| `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_definition` | [Optional[shared.WorkflowDefinition]](../../models/shared/workflowdefinition.md) | :heavy_minus_sign: | Returns the Workflow definition |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/getdefinitionsresponse.md b/workflows_definition/docs/models/operations/getdefinitionsresponse.md
new file mode 100755
index 000000000..fe201154d
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getdefinitionsresponse.md
@@ -0,0 +1,12 @@
+# GetDefinitionsResponse
+
+
+## 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_definitions` | List[[shared.WorkflowDefinition](../../models/shared/workflowdefinition.md)] | :heavy_minus_sign: | Success - definitions loaded with success. Empty array if org has no definitions. |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/getmaxallowedlimitresponse.md b/workflows_definition/docs/models/operations/getmaxallowedlimitresponse.md
new file mode 100755
index 000000000..736abd8cb
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getmaxallowedlimitresponse.md
@@ -0,0 +1,12 @@
+# GetMaxAllowedLimitResponse
+
+
+## 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 |
+| `max_allowed_limit` | [Optional[shared.MaxAllowedLimit]](../../models/shared/maxallowedlimit.md) | :heavy_minus_sign: | A combo of current number of workflows, and the max allowed number of workflows. |
+| `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_definition/docs/models/operations/getworkflowclosingreasonsrequest.md b/workflows_definition/docs/models/operations/getworkflowclosingreasonsrequest.md
new file mode 100755
index 000000000..4b23c9f97
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getworkflowclosingreasonsrequest.md
@@ -0,0 +1,8 @@
+# GetWorkflowClosingReasonsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------- | --------------------------- | --------------------------- | --------------------------- |
+| `definition_id` | *str* | :heavy_check_mark: | ID of a workflow definition |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/getworkflowclosingreasonsresponse.md b/workflows_definition/docs/models/operations/getworkflowclosingreasonsresponse.md
new file mode 100755
index 000000000..17b7cf997
--- /dev/null
+++ b/workflows_definition/docs/models/operations/getworkflowclosingreasonsresponse.md
@@ -0,0 +1,11 @@
+# GetWorkflowClosingReasonsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `closing_reasons_ids` | [Optional[shared.ClosingReasonsIds]](../../models/shared/closingreasonsids.md) | :heavy_minus_sign: | Returns the entire catalog of closing reasons for a specific workflow |
+| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
+| `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_definition/docs/models/operations/setworkflowclosingreasonsrequest.md b/workflows_definition/docs/models/operations/setworkflowclosingreasonsrequest.md
new file mode 100755
index 000000000..c8f8b872e
--- /dev/null
+++ b/workflows_definition/docs/models/operations/setworkflowclosingreasonsrequest.md
@@ -0,0 +1,9 @@
+# SetWorkflowClosingReasonsRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
+| `closing_reasons_ids` | [shared.ClosingReasonsIds](../../models/shared/closingreasonsids.md) | :heavy_check_mark: | set all closing reasons for a specific definition |
+| `definition_id` | *str* | :heavy_check_mark: | ID of a workflow definition |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/setworkflowclosingreasonsresponse.md b/workflows_definition/docs/models/operations/setworkflowclosingreasonsresponse.md
new file mode 100755
index 000000000..76541efd1
--- /dev/null
+++ b/workflows_definition/docs/models/operations/setworkflowclosingreasonsresponse.md
@@ -0,0 +1,10 @@
+# SetWorkflowClosingReasonsResponse
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
+| `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_definition/docs/models/operations/updatedefinitionrequest.md b/workflows_definition/docs/models/operations/updatedefinitionrequest.md
new file mode 100755
index 000000000..f1ee1fa8f
--- /dev/null
+++ b/workflows_definition/docs/models/operations/updatedefinitionrequest.md
@@ -0,0 +1,9 @@
+# UpdateDefinitionRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
+| `workflow_definition` | [shared.WorkflowDefinition](../../models/shared/workflowdefinition.md) | :heavy_check_mark: | Workflow Definition payload |
+| `definition_id` | *str* | :heavy_check_mark: | Short uuid (length 8) to identify the Workflow Definition. |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/operations/updatedefinitionresponse.md b/workflows_definition/docs/models/operations/updatedefinitionresponse.md
new file mode 100755
index 000000000..859c47f0e
--- /dev/null
+++ b/workflows_definition/docs/models/operations/updatedefinitionresponse.md
@@ -0,0 +1,12 @@
+# UpdateDefinitionResponse
+
+
+## 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_definition` | [Optional[shared.WorkflowDefinition]](../../models/shared/workflowdefinition.md) | :heavy_minus_sign: | Success - if the definition is updated successfully |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/changereasonstatusreq.md b/workflows_definition/docs/models/shared/changereasonstatusreq.md
new file mode 100755
index 000000000..c7ba4f00f
--- /dev/null
+++ b/workflows_definition/docs/models/shared/changereasonstatusreq.md
@@ -0,0 +1,8 @@
+# ChangeReasonStatusReq
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `status` | [ClosingReasonsStatus](../../models/shared/closingreasonsstatus.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/closingreason.md b/workflows_definition/docs/models/shared/closingreason.md
new file mode 100755
index 000000000..f330b63af
--- /dev/null
+++ b/workflows_definition/docs/models/shared/closingreason.md
@@ -0,0 +1,14 @@
+# ClosingReason
+
+One Closing reason for a workflow
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `creation_time` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `last_update_time` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `status` | [ClosingReasonsStatus](../../models/shared/closingreasonsstatus.md) | :heavy_check_mark: | N/A |
+| `title` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/closingreasonid.md b/workflows_definition/docs/models/shared/closingreasonid.md
new file mode 100755
index 000000000..3f125cffc
--- /dev/null
+++ b/workflows_definition/docs/models/shared/closingreasonid.md
@@ -0,0 +1,8 @@
+# ClosingReasonID
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
+| `id` | *str* | :heavy_check_mark: | N/A | x739cew |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/closingreasons.md b/workflows_definition/docs/models/shared/closingreasons.md
new file mode 100755
index 000000000..c36b9e2b6
--- /dev/null
+++ b/workflows_definition/docs/models/shared/closingreasons.md
@@ -0,0 +1,8 @@
+# ClosingReasons
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
+| `reasons` | List[[ClosingReason](../../models/shared/closingreason.md)] | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/closingreasonsids.md b/workflows_definition/docs/models/shared/closingreasonsids.md
new file mode 100755
index 000000000..7c2ace1cb
--- /dev/null
+++ b/workflows_definition/docs/models/shared/closingreasonsids.md
@@ -0,0 +1,8 @@
+# ClosingReasonsIds
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
+| `reasons` | List[[ClosingReasonID](../../models/shared/closingreasonid.md)] | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/closingreasonsstatus.md b/workflows_definition/docs/models/shared/closingreasonsstatus.md
new file mode 100755
index 000000000..b76021aaa
--- /dev/null
+++ b/workflows_definition/docs/models/shared/closingreasonsstatus.md
@@ -0,0 +1,9 @@
+# ClosingReasonsStatus
+
+
+## Values
+
+| Name | Value |
+| ---------- | ---------- |
+| `ACTIVE` | ACTIVE |
+| `INACTIVE` | INACTIVE |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/definitionnotfoundresp.md b/workflows_definition/docs/models/shared/definitionnotfoundresp.md
new file mode 100755
index 000000000..f839d1b4d
--- /dev/null
+++ b/workflows_definition/docs/models/shared/definitionnotfoundresp.md
@@ -0,0 +1,10 @@
+# DefinitionNotFoundResp
+
+Definition could be not found
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `message` | *Optional[str]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/dynamicduedate.md b/workflows_definition/docs/models/shared/dynamicduedate.md
new file mode 100755
index 000000000..ba075f756
--- /dev/null
+++ b/workflows_definition/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` | [DynamicDueDateActionTypeCondition](../../models/shared/dynamicduedateactiontypecondition.md) | :heavy_check_mark: | 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_definition/docs/models/shared/dynamicduedateactiontypecondition.md b/workflows_definition/docs/models/shared/dynamicduedateactiontypecondition.md
new file mode 100755
index 000000000..301816b03
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/dynamicduedatetimeperiod.md b/workflows_definition/docs/models/shared/dynamicduedatetimeperiod.md
new file mode 100755
index 000000000..b49a5cb9a
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/ecpdetails.md b/workflows_definition/docs/models/shared/ecpdetails.md
new file mode 100755
index 000000000..ca1cbf782
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/errorresp.md b/workflows_definition/docs/models/shared/errorresp.md
new file mode 100755
index 000000000..6c8383917
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/itemtype.md b/workflows_definition/docs/models/shared/itemtype.md
new file mode 100755
index 000000000..9d5135e83
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/maxallowedlimit.md b/workflows_definition/docs/models/shared/maxallowedlimit.md
new file mode 100755
index 000000000..9f6a5064d
--- /dev/null
+++ b/workflows_definition/docs/models/shared/maxallowedlimit.md
@@ -0,0 +1,9 @@
+# MaxAllowedLimit
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
+| `current_no_of_workflows` | *Optional[float]* | :heavy_minus_sign: | N/A |
+| `max_allowed` | *Optional[float]* | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/section.md b/workflows_definition/docs/models/shared/section.md
new file mode 100755
index 000000000..37f85028d
--- /dev/null
+++ b/workflows_definition/docs/models/shared/section.md
@@ -0,0 +1,14 @@
+# Section
+
+A group of Steps that define the progress of the Workflow
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
+| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `name` | *str* | :heavy_check_mark: | N/A |
+| `order` | *float* | :heavy_check_mark: | 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 |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/security.md b/workflows_definition/docs/models/shared/security.md
new file mode 100755
index 000000000..83ee1f8f9
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/step.md b/workflows_definition/docs/models/shared/step.md
new file mode 100755
index 000000000..8db6a1e83
--- /dev/null
+++ b/workflows_definition/docs/models/shared/step.md
@@ -0,0 +1,23 @@
+# Step
+
+Action that needs to be done in a Workflow
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | |
+| `automation_config` | [Optional[StepAutomationConfig]](../../models/shared/stepautomationconfig.md) | :heavy_minus_sign: | N/A | |
+| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2021-04-27T12:00:00.000Z |
+| `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 | |
+| `execution_type` | [Optional[StepType]](../../models/shared/steptype.md) | :heavy_minus_sign: | N/A | |
+| `id` | *Optional[str]* | :heavy_minus_sign: | 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 | |
+| `name` | *str* | :heavy_check_mark: | N/A | |
+| `order` | *float* | :heavy_check_mark: | N/A | |
+| `requirements` | List[[StepRequirement](../../models/shared/steprequirement.md)] | :heavy_minus_sign: | requirements that need to be fulfilled in order to enable the step execution | |
+| `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_definition/docs/models/shared/stepautomationconfig.md b/workflows_definition/docs/models/shared/stepautomationconfig.md
new file mode 100755
index 000000000..06ed327aa
--- /dev/null
+++ b/workflows_definition/docs/models/shared/stepautomationconfig.md
@@ -0,0 +1,8 @@
+# StepAutomationConfig
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
+| `flow_id` | *str* | :heavy_check_mark: | Id of the configured automation to run |
\ No newline at end of file
diff --git a/workflows_definition/docs/models/shared/stepjourney.md b/workflows_definition/docs/models/shared/stepjourney.md
new file mode 100755
index 000000000..03111fed3
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/steprequirement.md b/workflows_definition/docs/models/shared/steprequirement.md
new file mode 100755
index 000000000..446f8cf98
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/steprequirementcondition.md b/workflows_definition/docs/models/shared/steprequirementcondition.md
new file mode 100755
index 000000000..c34adc7d8
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/steptype.md b/workflows_definition/docs/models/shared/steptype.md
new file mode 100755
index 000000000..c52f47ba5
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/updateentityattributes.md b/workflows_definition/docs/models/shared/updateentityattributes.md
new file mode 100755
index 000000000..96c330966
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/updateentityattributessource.md b/workflows_definition/docs/models/shared/updateentityattributessource.md
new file mode 100755
index 000000000..9ffef4274
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/updateentityattributestarget.md b/workflows_definition/docs/models/shared/updateentityattributestarget.md
new file mode 100755
index 000000000..fa35f003c
--- /dev/null
+++ b/workflows_definition/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_definition/docs/models/shared/workflowdefinition.md b/workflows_definition/docs/models/shared/workflowdefinition.md
new file mode 100755
index 000000000..ab20d6dd4
--- /dev/null
+++ b/workflows_definition/docs/models/shared/workflowdefinition.md
@@ -0,0 +1,20 @@
+# WorkflowDefinition
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `assigned_to` | List[*str*] | :heavy_minus_sign: | N/A | |
+| `closing_reasons` | List[[ClosingReasonID](../../models/shared/closingreasonid.md)] | :heavy_minus_sign: | N/A | |
+| `creation_time` | *Optional[str]* | :heavy_minus_sign: | ISO String Date & Time | 2021-04-27T12:01:13.000Z |
+| `description` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `due_date` | *Optional[str]* | :heavy_minus_sign: | N/A | 2021-04-27T12:00:00.000Z |
+| `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/workflowdefinitionflow.md)] | :heavy_check_mark: | N/A | |
+| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `last_update_time` | *Optional[str]* | :heavy_minus_sign: | ISO String Date & Time | 2021-04-27T12:01:13.000Z |
+| `name` | *str* | :heavy_check_mark: | N/A | |
+| `update_entity_attributes` | List[[UpdateEntityAttributes](../../models/shared/updateentityattributes.md)] | :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_definition/docs/models/shared/workflowdefinitionflow.md b/workflows_definition/docs/models/shared/workflowdefinitionflow.md
new file mode 100755
index 000000000..ca68dc074
--- /dev/null
+++ b/workflows_definition/docs/models/shared/workflowdefinitionflow.md
@@ -0,0 +1,17 @@
+# WorkflowDefinitionFlow
+
+
+## Supported Types
+
+### Section
+
+```python
+workflowDefinitionFlow: shared.Section = /* values here */
+```
+
+### Step
+
+```python
+workflowDefinitionFlow: shared.Step = /* values here */
+```
+
diff --git a/workflows_definition/docs/sdks/closingreason/README.md b/workflows_definition/docs/sdks/closingreason/README.md
new file mode 100755
index 000000000..ba8457f07
--- /dev/null
+++ b/workflows_definition/docs/sdks/closingreason/README.md
@@ -0,0 +1,127 @@
+# ClosingReason
+(*closing_reason*)
+
+### Available Operations
+
+* [change_reason_status](#change_reason_status) - changeReasonStatus
+* [create_closing_reason](#create_closing_reason) - createClosingReason
+* [get_all_closing_reasons](#get_all_closing_reasons) - getAllClosingReasons
+
+## change_reason_status
+
+Change the status of a Closing Reason (eg. ACTIVE to INACTIVE).
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.ChangeReasonStatusRequest(
+ change_reason_status_req=shared.ChangeReasonStatusReq(
+ status=shared.ClosingReasonsStatus.ACTIVE,
+ ),
+ reason_id='string',
+)
+
+res = s.closing_reason.change_reason_status(req)
+
+if res.status_code == 200:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
+| `request` | [operations.ChangeReasonStatusRequest](../../models/operations/changereasonstatusrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.ChangeReasonStatusResponse](../../models/operations/changereasonstatusresponse.md)**
+
+
+## create_closing_reason
+
+A created Closing Reason is stored for the organization and will be displayed in the library of reasons.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = shared.ClosingReason(
+ status=shared.ClosingReasonsStatus.ACTIVE,
+ title='string',
+)
+
+res = s.closing_reason.create_closing_reason(req)
+
+if res.closing_reason is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `request` | [shared.ClosingReason](../../models/shared/closingreason.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.CreateClosingReasonResponse](../../models/operations/createclosingreasonresponse.md)**
+
+
+## get_all_closing_reasons
+
+Get all Closing Reasons defined in the organization by default all Active.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.GetAllClosingReasonsRequest()
+
+res = s.closing_reason.get_all_closing_reasons(req)
+
+if res.closing_reasons is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetAllClosingReasonsRequest](../../models/operations/getallclosingreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.GetAllClosingReasonsResponse](../../models/operations/getallclosingreasonsresponse.md)**
+
diff --git a/workflows_definition/docs/sdks/sdk/README.md b/workflows_definition/docs/sdks/sdk/README.md
new file mode 100755
index 000000000..c7cf50bc9
--- /dev/null
+++ b/workflows_definition/docs/sdks/sdk/README.md
@@ -0,0 +1,10 @@
+# SDK
+
+
+## Overview
+
+Workflows Definitions: Service for Workflow Definitions for different processes inside of an Organization
+
+
+### Available Operations
+
diff --git a/workflows_definition/docs/sdks/workflows/README.md b/workflows_definition/docs/sdks/workflows/README.md
new file mode 100755
index 000000000..c5c3a4e70
--- /dev/null
+++ b/workflows_definition/docs/sdks/workflows/README.md
@@ -0,0 +1,459 @@
+# Workflows
+(*workflows*)
+
+### Available Operations
+
+* [create_definition](#create_definition) - createDefinition
+* [delete_definition](#delete_definition) - deleteDefinition
+* [get_definition](#get_definition) - getDefinition
+* [get_definitions](#get_definitions) - getDefinitions
+* [get_max_allowed_limit](#get_max_allowed_limit) - getMaxAllowedLimit
+* [get_workflow_closing_reasons](#get_workflow_closing_reasons) - getWorkflowClosingReasons
+* [set_workflow_closing_reasons](#set_workflow_closing_reasons) - setWorkflowClosingReasons
+* [update_definition](#update_definition) - updateDefinition
+
+## create_definition
+
+Create a Workflow Definition.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = shared.WorkflowDefinition(
+ assigned_to=[
+ 'string',
+ ],
+ closing_reasons=[
+ shared.ClosingReasonID(
+ id='x739cew',
+ ),
+ ],
+ creation_time='2021-04-27T12:01:13.000Z',
+ due_date='2021-04-27T12:00:00.000Z',
+ dynamic_due_date=shared.DynamicDueDate(
+ action_type_condition=shared.DynamicDueDateActionTypeCondition.WORKFLOW_STARTED,
+ number_of_units=1581.6,
+ time_period=shared.DynamicDueDateTimePeriod.WEEKS,
+ ),
+ flow=[
+ shared.Section(
+ name='string',
+ order=768.01,
+ steps=[
+ shared.Step(
+ assigned_to=[
+ 'string',
+ ],
+ automation_config=shared.StepAutomationConfig(
+ flow_id='string',
+ ),
+ due_date='2021-04-27T12:00:00.000Z',
+ dynamic_due_date=shared.DynamicDueDate(
+ action_type_condition=shared.DynamicDueDateActionTypeCondition.STEP_CLOSED,
+ number_of_units=8711.4,
+ time_period=shared.DynamicDueDateTimePeriod.DAYS,
+ ),
+ ecp=shared.ECPDetails(
+ journey=shared.StepJourney(),
+ ),
+ installer=shared.ECPDetails(
+ journey=shared.StepJourney(),
+ ),
+ journey=shared.StepJourney(),
+ name='string',
+ order=8841.45,
+ requirements=[
+ shared.StepRequirement(
+ condition=shared.StepRequirementCondition.CLOSED,
+ definition_id='string',
+ type=shared.ItemType.SECTION,
+ ),
+ ],
+ type=shared.ItemType.STEP,
+ user_ids=[
+ 463.65,
+ ],
+ ),
+ ],
+ type=shared.ItemType.STEP,
+ ),
+ ],
+ last_update_time='2021-04-27T12:01:13.000Z',
+ name='string',
+ update_entity_attributes=[
+ shared.UpdateEntityAttributes(
+ source=shared.UpdateEntityAttributesSource.WORKFLOW_STATUS,
+ target=shared.UpdateEntityAttributesTarget(
+ entity_attribute='my_status',
+ entity_schema='opportunity',
+ ),
+ ),
+ ],
+ user_ids=[
+ 5488.16,
+ ],
+)
+
+res = s.workflows.create_definition(req)
+
+if res.workflow_definition is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
+| `request` | [shared.WorkflowDefinition](../../models/shared/workflowdefinition.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.CreateDefinitionResponse](../../models/operations/createdefinitionresponse.md)**
+
+
+## delete_definition
+
+Delete Workflow Definition.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.DeleteDefinitionRequest(
+ definition_id='string',
+)
+
+res = s.workflows.delete_definition(req)
+
+if res.status_code == 200:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.DeleteDefinitionRequest](../../models/operations/deletedefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.DeleteDefinitionResponse](../../models/operations/deletedefinitionresponse.md)**
+
+
+## get_definition
+
+Get specific Definition by id from the Organization.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.GetDefinitionRequest(
+ definition_id='string',
+)
+
+res = s.workflows.get_definition(req)
+
+if res.workflow_definition is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| `request` | [operations.GetDefinitionRequest](../../models/operations/getdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.GetDefinitionResponse](../../models/operations/getdefinitionresponse.md)**
+
+
+## get_definitions
+
+Retrieve all Workflow Definitions from an Organization
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+
+res = s.workflows.get_definitions()
+
+if res.workflow_definitions is not None:
+ # handle response
+ pass
+```
+
+
+### Response
+
+**[operations.GetDefinitionsResponse](../../models/operations/getdefinitionsresponse.md)**
+
+
+## get_max_allowed_limit
+
+Get limits and number of created executions for an Organization.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+
+res = s.workflows.get_max_allowed_limit()
+
+if res.max_allowed_limit is not None:
+ # handle response
+ pass
+```
+
+
+### Response
+
+**[operations.GetMaxAllowedLimitResponse](../../models/operations/getmaxallowedlimitresponse.md)**
+
+
+## get_workflow_closing_reasons
+
+Returns all closing reasons defined for the workflow.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.GetWorkflowClosingReasonsRequest(
+ definition_id='string',
+)
+
+res = s.workflows.get_workflow_closing_reasons(req)
+
+if res.closing_reasons_ids is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `request` | [operations.GetWorkflowClosingReasonsRequest](../../models/operations/getworkflowclosingreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.GetWorkflowClosingReasonsResponse](../../models/operations/getworkflowclosingreasonsresponse.md)**
+
+
+## set_workflow_closing_reasons
+
+Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.SetWorkflowClosingReasonsRequest(
+ closing_reasons_ids=shared.ClosingReasonsIds(
+ reasons=[
+ shared.ClosingReasonID(
+ id='x739cew',
+ ),
+ ],
+ ),
+ definition_id='string',
+)
+
+res = s.workflows.set_workflow_closing_reasons(req)
+
+if res.status_code == 200:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `request` | [operations.SetWorkflowClosingReasonsRequest](../../models/operations/setworkflowclosingreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.SetWorkflowClosingReasonsResponse](../../models/operations/setworkflowclosingreasonsresponse.md)**
+
+
+## update_definition
+
+Update Workflow Definition.
+
+### Example Usage
+
+```python
+import sdk
+from sdk.models import operations, shared
+
+s = sdk.SDK(
+ security=shared.Security(
+ bearer_auth="",
+ ),
+)
+
+req = operations.UpdateDefinitionRequest(
+ workflow_definition=shared.WorkflowDefinition(
+ assigned_to=[
+ 'string',
+ ],
+ closing_reasons=[
+ shared.ClosingReasonID(
+ id='x739cew',
+ ),
+ ],
+ creation_time='2021-04-27T12:01:13.000Z',
+ due_date='2021-04-27T12:00:00.000Z',
+ dynamic_due_date=shared.DynamicDueDate(
+ action_type_condition=shared.DynamicDueDateActionTypeCondition.WORKFLOW_STARTED,
+ number_of_units=8376.64,
+ time_period=shared.DynamicDueDateTimePeriod.MONTHS,
+ ),
+ flow=[
+ shared.Section(
+ name='string',
+ order=452.1,
+ steps=[
+ shared.Step(
+ assigned_to=[
+ 'string',
+ ],
+ automation_config=shared.StepAutomationConfig(
+ flow_id='string',
+ ),
+ due_date='2021-04-27T12:00:00.000Z',
+ dynamic_due_date=shared.DynamicDueDate(
+ action_type_condition=shared.DynamicDueDateActionTypeCondition.STEP_CLOSED,
+ number_of_units=9991.65,
+ time_period=shared.DynamicDueDateTimePeriod.DAYS,
+ ),
+ ecp=shared.ECPDetails(
+ journey=shared.StepJourney(),
+ ),
+ installer=shared.ECPDetails(
+ journey=shared.StepJourney(),
+ ),
+ journey=shared.StepJourney(),
+ name='string',
+ order=4890.23,
+ requirements=[
+ shared.StepRequirement(
+ condition=shared.StepRequirementCondition.CLOSED,
+ definition_id='string',
+ type=shared.ItemType.SECTION,
+ ),
+ ],
+ type=shared.ItemType.SECTION,
+ user_ids=[
+ 3753.56,
+ ],
+ ),
+ ],
+ type=shared.ItemType.STEP,
+ ),
+ ],
+ last_update_time='2021-04-27T12:01:13.000Z',
+ name='string',
+ update_entity_attributes=[
+ shared.UpdateEntityAttributes(
+ source=shared.UpdateEntityAttributesSource.WORKFLOW_STATUS,
+ target=shared.UpdateEntityAttributesTarget(
+ entity_attribute='my_status',
+ entity_schema='opportunity',
+ ),
+ ),
+ ],
+ user_ids=[
+ 3438.79,
+ ],
+ ),
+ definition_id='string',
+)
+
+res = s.workflows.update_definition(req)
+
+if res.workflow_definition is not None:
+ # handle response
+ pass
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `request` | [operations.UpdateDefinitionRequest](../../models/operations/updatedefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
+
+
+### Response
+
+**[operations.UpdateDefinitionResponse](../../models/operations/updatedefinitionresponse.md)**
+
diff --git a/workflows_definition/files.gen b/workflows_definition/files.gen
index 10dfa7951..bdf477d52 100755
--- a/workflows_definition/files.gen
+++ b/workflows_definition/files.gen
@@ -1,3 +1,4 @@
+src/sdk/sdkconfiguration.py
src/sdk/closing_reason.py
src/sdk/workflows.py
src/sdk/sdk.py
@@ -5,6 +6,7 @@ pylintrc
setup.py
src/sdk/__init__.py
src/sdk/models/__init__.py
+src/sdk/models/errors/sdkerror.py
src/sdk/utils/__init__.py
src/sdk/utils/retries.py
src/sdk/utils/utils.py
@@ -22,21 +24,73 @@ src/sdk/models/operations/updatedefinition.py
src/sdk/models/operations/__init__.py
src/sdk/models/shared/errorresp.py
src/sdk/models/shared/changereasonstatusreq.py
-src/sdk/models/shared/closingreasonsstatus_enum.py
+src/sdk/models/shared/closingreasonsstatus.py
src/sdk/models/shared/closingreason.py
src/sdk/models/shared/closingreasons.py
src/sdk/models/shared/workflowdefinition.py
src/sdk/models/shared/updateentityattributes.py
src/sdk/models/shared/section.py
-src/sdk/models/shared/itemtype_enum.py
+src/sdk/models/shared/itemtype.py
src/sdk/models/shared/step.py
src/sdk/models/shared/steprequirement.py
-src/sdk/models/shared/steptype_enum.py
+src/sdk/models/shared/stepjourney.py
src/sdk/models/shared/ecpdetails.py
+src/sdk/models/shared/steptype.py
src/sdk/models/shared/dynamicduedate.py
src/sdk/models/shared/closingreasonid.py
+src/sdk/models/shared/definitionnotfoundresp.py
src/sdk/models/shared/maxallowedlimit.py
src/sdk/models/shared/closingreasonsids.py
src/sdk/models/shared/security.py
src/sdk/models/shared/__init__.py
-USAGE.md
\ No newline at end of file
+src/sdk/models/errors/__init__.py
+USAGE.md
+docs/models/operations/changereasonstatusrequest.md
+docs/models/operations/changereasonstatusresponse.md
+docs/models/operations/createclosingreasonresponse.md
+docs/models/operations/getallclosingreasonsrequest.md
+docs/models/operations/getallclosingreasonsresponse.md
+docs/models/operations/createdefinitionresponse.md
+docs/models/operations/deletedefinitionrequest.md
+docs/models/operations/deletedefinitionresponse.md
+docs/models/operations/getdefinitionrequest.md
+docs/models/operations/getdefinitionresponse.md
+docs/models/operations/getdefinitionsresponse.md
+docs/models/operations/getmaxallowedlimitresponse.md
+docs/models/operations/getworkflowclosingreasonsrequest.md
+docs/models/operations/getworkflowclosingreasonsresponse.md
+docs/models/operations/setworkflowclosingreasonsrequest.md
+docs/models/operations/setworkflowclosingreasonsresponse.md
+docs/models/operations/updatedefinitionrequest.md
+docs/models/operations/updatedefinitionresponse.md
+docs/models/shared/errorresp.md
+docs/models/shared/changereasonstatusreq.md
+docs/models/shared/closingreasonsstatus.md
+docs/models/shared/closingreason.md
+docs/models/shared/closingreasons.md
+docs/models/shared/workflowdefinitionflow.md
+docs/models/shared/workflowdefinition.md
+docs/models/shared/updateentityattributessource.md
+docs/models/shared/updateentityattributestarget.md
+docs/models/shared/updateentityattributes.md
+docs/models/shared/section.md
+docs/models/shared/itemtype.md
+docs/models/shared/stepautomationconfig.md
+docs/models/shared/step.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/closingreasonid.md
+docs/models/shared/definitionnotfoundresp.md
+docs/models/shared/maxallowedlimit.md
+docs/models/shared/closingreasonsids.md
+docs/models/shared/security.md
+docs/sdks/sdk/README.md
+docs/sdks/closingreason/README.md
+docs/sdks/workflows/README.md
+.gitattributes
\ No newline at end of file
diff --git a/workflows_definition/gen.yaml b/workflows_definition/gen.yaml
index 38abb52c1..0893a59b3 100755
--- a/workflows_definition/gen.yaml
+++ b/workflows_definition/gen.yaml
@@ -1,16 +1,26 @@
configVersion: 1.0.0
management:
- docChecksum: 3f8335b3dac5dd26e396d579dbc082e7
+ docChecksum: 9b6852be8e431e603a3d5a80f505bfb0
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: SDK
- 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: Speakeasy
description: Python Client SDK Generated by Speakeasy
+ flattenGlobalSecurity: false
+ installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=workflows_definition
+ maxMethodParams: 0
packageName: openapi
+ repoSubDirectory: workflows_definition
diff --git a/workflows_definition/pylintrc b/workflows_definition/pylintrc
index 79b8008d0..1ed32214e 100755
--- a/workflows_definition/pylintrc
+++ b/workflows_definition/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_definition/setup.py b/workflows_definition/setup.py
index 997ae148d..c49235d2a 100755
--- a/workflows_definition/setup.py
+++ b/workflows_definition/setup.py
@@ -10,30 +10,31 @@
setuptools.setup(
name="openapi",
- version="1.2.2",
+ version="2.1.1",
author="Speakeasy",
description="Python Client SDK Generated by Speakeasy",
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_definition/src/sdk/__init__.py b/workflows_definition/src/sdk/__init__.py
index b9e232018..e6c0deeb6 100755
--- a/workflows_definition/src/sdk/__init__.py
+++ b/workflows_definition/src/sdk/__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_definition/src/sdk/closing_reason.py b/workflows_definition/src/sdk/closing_reason.py
index f36c81d19..625ddf2b0 100755
--- a/workflows_definition/src/sdk/closing_reason.py
+++ b/workflows_definition/src/sdk/closing_reason.py
@@ -1,40 +1,32 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-import requests as requests_http
-from . import utils
-from sdk.models import operations, shared
+from .sdkconfiguration import SDKConfiguration
+from sdk import utils
+from sdk.models import errors, operations, shared
from typing import Optional
class ClosingReason:
- _client: requests_http.Session
- _security_client: requests_http.Session
- _server_url: str
- _language: str
- _sdk_version: str
- _gen_version: str
+ sdk_configuration: SDKConfiguration
- 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
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
+ self.sdk_configuration = sdk_config
+
def change_reason_status(self, request: operations.ChangeReasonStatusRequest) -> operations.ChangeReasonStatusResponse:
r"""changeReasonStatus
Change the status of a Closing Reason (eg. ACTIVE to INACTIVE).
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.ChangeReasonStatusRequest, base_url, '/v1/workflows/closing-reasons/{reasonId}', request)
-
headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, "change_reason_status_req", 'json')
+ req_content_type, data, form = utils.serialize_request_body(request, "change_reason_status_req", False, True, 'json')
if req_content_type not in ('multipart/form-data', 'multipart/mixed'):
headers['content-type'] = req_content_type
+ 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')
@@ -47,25 +39,29 @@ def change_reason_status(self, request: operations.ChangeReasonStatusRequest) ->
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_closing_reason(self, request: shared.ClosingReason) -> operations.CreateClosingReasonResponse:
r"""createClosingReason
A created Closing Reason is stored for the organization and will be displayed in the library of reasons.
"""
- base_url = self._server_url
-
- url = base_url.removesuffix('/') + '/v1/workflows/closing-reasons'
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+ url = base_url + '/v1/workflows/closing-reasons'
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')
@@ -76,22 +72,27 @@ def create_closing_reason(self, request: shared.ClosingReason) -> operations.Cre
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.ClosingReason])
res.closing_reason = 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_all_closing_reasons(self, request: operations.GetAllClosingReasonsRequest) -> operations.GetAllClosingReasonsResponse:
r"""getAllClosingReasons
Get all Closing Reasons defined in the organization by default all Active.
"""
- base_url = self._server_url
-
- url = base_url.removesuffix('/') + '/v1/workflows/closing-reasons'
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+ url = base_url + '/v1/workflows/closing-reasons'
+ headers = {}
query_params = utils.get_query_params(operations.GetAllClosingReasonsRequest, 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.GetAllClosingReasonsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -100,6 +101,8 @@ def get_all_closing_reasons(self, request: operations.GetAllClosingReasonsReques
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.ClosingReasons])
res.closing_reasons = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
return res
diff --git a/workflows_definition/src/sdk/models/__init__.py b/workflows_definition/src/sdk/models/__init__.py
index 889f8adcf..36628d6cc 100755
--- a/workflows_definition/src/sdk/models/__init__.py
+++ b/workflows_definition/src/sdk/models/__init__.py
@@ -1,2 +1,3 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+# __init__.py
diff --git a/workflows_definition/src/sdk/models/errors/__init__.py b/workflows_definition/src/sdk/models/errors/__init__.py
new file mode 100755
index 000000000..cfd848441
--- /dev/null
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/models/errors/sdkerror.py b/workflows_definition/src/sdk/models/errors/sdkerror.py
new file mode 100755
index 000000000..6bb02bbd6
--- /dev/null
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/models/operations/changereasonstatus.py b/workflows_definition/src/sdk/models/operations/changereasonstatus.py
index a6a129510..df54fd668 100755
--- a/workflows_definition/src/sdk/models/operations/changereasonstatus.py
+++ b/workflows_definition/src/sdk/models/operations/changereasonstatus.py
@@ -10,18 +10,22 @@
@dataclasses.dataclass
class ChangeReasonStatusRequest:
-
- reason_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'reasonId', 'style': 'simple', 'explode': False }})
+ reason_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'reasonId', 'style': 'simple', 'explode': False }})
change_reason_status_req: Optional[shared_changereasonstatusreq.ChangeReasonStatusReq] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }})
- r"""change the status of a closing reason"""
+ r"""change the status of a closing reason"""
+
+
@dataclasses.dataclass
class ChangeReasonStatusResponse:
-
- 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"""bad request"""
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+ r"""bad request"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/createclosingreason.py b/workflows_definition/src/sdk/models/operations/createclosingreason.py
index c4e398006..20925e9dc 100755
--- a/workflows_definition/src/sdk/models/operations/createclosingreason.py
+++ b/workflows_definition/src/sdk/models/operations/createclosingreason.py
@@ -9,10 +9,13 @@
@dataclasses.dataclass
class CreateClosingReasonResponse:
-
- 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: Optional[shared_closingreason.ClosingReason] = dataclasses.field(default=None)
- r"""closing reason is stored successfully in the repository"""
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+ r"""closing reason is stored successfully in the repository"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/createdefinition.py b/workflows_definition/src/sdk/models/operations/createdefinition.py
index 684e8b7b3..d3b6b5f4f 100755
--- a/workflows_definition/src/sdk/models/operations/createdefinition.py
+++ b/workflows_definition/src/sdk/models/operations/createdefinition.py
@@ -10,12 +10,15 @@
@dataclasses.dataclass
class CreateDefinitionResponse:
-
- 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_definition: Optional[shared_workflowdefinition.WorkflowDefinition] = dataclasses.field(default=None)
- r"""Success - if the definition is created successfully"""
-
\ No newline at end of file
+ r"""Success - if the definition is created successfully"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/deletedefinition.py b/workflows_definition/src/sdk/models/operations/deletedefinition.py
index 072a47c07..a3fb9f258 100755
--- a/workflows_definition/src/sdk/models/operations/deletedefinition.py
+++ b/workflows_definition/src/sdk/models/operations/deletedefinition.py
@@ -9,17 +9,21 @@
@dataclasses.dataclass
class DeleteDefinitionRequest:
-
definition_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'definitionId', 'style': 'simple', 'explode': False }})
- r"""Id of the definition to de deleted."""
+ r"""Id of the definition to de deleted."""
+
+
@dataclasses.dataclass
class DeleteDefinitionResponse:
-
- 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_definition/src/sdk/models/operations/getallclosingreasons.py b/workflows_definition/src/sdk/models/operations/getallclosingreasons.py
index eb38791a4..c115c083f 100755
--- a/workflows_definition/src/sdk/models/operations/getallclosingreasons.py
+++ b/workflows_definition/src/sdk/models/operations/getallclosingreasons.py
@@ -9,17 +9,21 @@
@dataclasses.dataclass
class GetAllClosingReasonsRequest:
-
include_inactive: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'includeInactive', 'style': 'form', 'explode': True }})
- r"""Filter Closing Reasons by status like active inactiv"""
+ r"""Filter Closing Reasons by status like active inactiv"""
+
+
@dataclasses.dataclass
class GetAllClosingReasonsResponse:
-
- 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_reasons: Optional[shared_closingreasons.ClosingReasons] = dataclasses.field(default=None)
- r"""Returns the entire catalog of closing reasons per organization"""
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+ r"""Returns the entire catalog of closing reasons per organization"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/getdefinition.py b/workflows_definition/src/sdk/models/operations/getdefinition.py
index 75129d9df..9346550c2 100755
--- a/workflows_definition/src/sdk/models/operations/getdefinition.py
+++ b/workflows_definition/src/sdk/models/operations/getdefinition.py
@@ -3,28 +3,33 @@
from __future__ import annotations
import dataclasses
import requests as requests_http
+from ..shared import definitionnotfoundresp as shared_definitionnotfoundresp
from ..shared import errorresp as shared_errorresp
from ..shared import workflowdefinition as shared_workflowdefinition
-from typing import Any, Optional
+from typing import Optional
@dataclasses.dataclass
class GetDefinitionRequest:
-
definition_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'definitionId', 'style': 'simple', 'explode': False }})
- r"""Short uuid (length 8) to identify the Workflow Definition."""
+ r"""Short uuid (length 8) to identify the Workflow Definition."""
+
+
@dataclasses.dataclass
class GetDefinitionResponse:
-
- content_type: str = dataclasses.field()
- status_code: int = dataclasses.field()
- definition_not_found_resp: Optional[Any] = dataclasses.field(default=None)
- r"""Definition Not found"""
+ 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"""
+ definition_not_found_resp: Optional[shared_definitionnotfoundresp.DefinitionNotFoundResp] = dataclasses.field(default=None)
+ r"""Definition Not found"""
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_definition: Optional[shared_workflowdefinition.WorkflowDefinition] = dataclasses.field(default=None)
- r"""Returns the Workflow definition"""
-
\ No newline at end of file
+ r"""Returns the Workflow definition"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/getdefinitions.py b/workflows_definition/src/sdk/models/operations/getdefinitions.py
index a4c55c890..59aa505a0 100755
--- a/workflows_definition/src/sdk/models/operations/getdefinitions.py
+++ b/workflows_definition/src/sdk/models/operations/getdefinitions.py
@@ -5,17 +5,20 @@
import requests as requests_http
from ..shared import errorresp as shared_errorresp
from ..shared import workflowdefinition as shared_workflowdefinition
-from typing import Optional
+from typing import List, Optional
@dataclasses.dataclass
class GetDefinitionsResponse:
-
- 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_definitions: Optional[list[shared_workflowdefinition.WorkflowDefinition]] = dataclasses.field(default=None)
- r"""Success - definitions loaded with success. Empty array if org has no definitions."""
-
\ 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_definitions: Optional[List[shared_workflowdefinition.WorkflowDefinition]] = dataclasses.field(default=None)
+ r"""Success - definitions loaded with success. Empty array if org has no definitions."""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/getmaxallowedlimit.py b/workflows_definition/src/sdk/models/operations/getmaxallowedlimit.py
index 0ecca4374..0505a1c64 100755
--- a/workflows_definition/src/sdk/models/operations/getmaxallowedlimit.py
+++ b/workflows_definition/src/sdk/models/operations/getmaxallowedlimit.py
@@ -10,12 +10,15 @@
@dataclasses.dataclass
class GetMaxAllowedLimitResponse:
-
- 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"""
+ r"""Other errors"""
max_allowed_limit: Optional[shared_maxallowedlimit.MaxAllowedLimit] = dataclasses.field(default=None)
- r"""A combo of current number of workflows, and the max allowed number of workflows."""
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+ r"""A combo of current number of workflows, and the max allowed number of workflows."""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/getworkflowclosingreasons.py b/workflows_definition/src/sdk/models/operations/getworkflowclosingreasons.py
index 7d3fdd9b8..8fa78d72d 100755
--- a/workflows_definition/src/sdk/models/operations/getworkflowclosingreasons.py
+++ b/workflows_definition/src/sdk/models/operations/getworkflowclosingreasons.py
@@ -9,17 +9,21 @@
@dataclasses.dataclass
class GetWorkflowClosingReasonsRequest:
-
definition_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'definitionId', 'style': 'simple', 'explode': False }})
- r"""ID of a workflow definition"""
+ r"""ID of a workflow definition"""
+
+
@dataclasses.dataclass
class GetWorkflowClosingReasonsResponse:
-
- 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_reasons_ids: Optional[shared_closingreasonsids.ClosingReasonsIds] = dataclasses.field(default=None)
- r"""Returns the entire catalog of closing reasons for a specific workflow"""
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+ r"""Returns the entire catalog of closing reasons for a specific workflow"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
+
+
diff --git a/workflows_definition/src/sdk/models/operations/setworkflowclosingreasons.py b/workflows_definition/src/sdk/models/operations/setworkflowclosingreasons.py
index 73d4a13e3..da14138b8 100755
--- a/workflows_definition/src/sdk/models/operations/setworkflowclosingreasons.py
+++ b/workflows_definition/src/sdk/models/operations/setworkflowclosingreasons.py
@@ -9,17 +9,21 @@
@dataclasses.dataclass
class SetWorkflowClosingReasonsRequest:
-
closing_reasons_ids: shared_closingreasonsids.ClosingReasonsIds = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})
- r"""set all closing reasons for a specific definition"""
+ r"""set all closing reasons for a specific definition"""
definition_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'definitionId', 'style': 'simple', 'explode': False }})
- r"""ID of a workflow definition"""
+ r"""ID of a workflow definition"""
+
+
@dataclasses.dataclass
class SetWorkflowClosingReasonsResponse:
+ 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"""
+ raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
+ r"""Raw HTTP response; suitable for custom response parsing"""
- content_type: str = dataclasses.field()
- status_code: int = dataclasses.field()
- raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/operations/updatedefinition.py b/workflows_definition/src/sdk/models/operations/updatedefinition.py
index 793dbe7b9..154ade941 100755
--- a/workflows_definition/src/sdk/models/operations/updatedefinition.py
+++ b/workflows_definition/src/sdk/models/operations/updatedefinition.py
@@ -10,21 +10,25 @@
@dataclasses.dataclass
class UpdateDefinitionRequest:
-
definition_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'definitionId', 'style': 'simple', 'explode': False }})
- r"""Short uuid (length 8) to identify the Workflow Definition."""
+ r"""Short uuid (length 8) to identify the Workflow Definition."""
workflow_definition: shared_workflowdefinition.WorkflowDefinition = dataclasses.field(metadata={'request': { 'media_type': 'application/json' }})
- r"""Workflow Definition payload"""
+ r"""Workflow Definition payload"""
+
+
@dataclasses.dataclass
class UpdateDefinitionResponse:
-
- 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_definition: Optional[shared_workflowdefinition.WorkflowDefinition] = dataclasses.field(default=None)
- r"""Success - if the definition is updated successfully"""
-
\ No newline at end of file
+ r"""Success - if the definition is updated successfully"""
+
+
diff --git a/workflows_definition/src/sdk/models/shared/__init__.py b/workflows_definition/src/sdk/models/shared/__init__.py
index e2d4de35c..00e21c777 100755
--- a/workflows_definition/src/sdk/models/shared/__init__.py
+++ b/workflows_definition/src/sdk/models/shared/__init__.py
@@ -5,18 +5,20 @@
from .closingreasonid import *
from .closingreasons import *
from .closingreasonsids import *
-from .closingreasonsstatus_enum import *
+from .closingreasonsstatus import *
+from .definitionnotfoundresp import *
from .dynamicduedate import *
from .ecpdetails import *
from .errorresp import *
-from .itemtype_enum import *
+from .itemtype import *
from .maxallowedlimit import *
from .section import *
from .security import *
from .step import *
+from .stepjourney import *
from .steprequirement import *
-from .steptype_enum import *
+from .steptype import *
from .updateentityattributes import *
from .workflowdefinition import *
-__all__ = ["ChangeReasonStatusReq","ClosingReason","ClosingReasonID","ClosingReasons","ClosingReasonsIds","ClosingReasonsStatusEnum","DynamicDueDate","DynamicDueDateActionTypeConditionEnum","DynamicDueDateTimePeriodEnum","ECPDetails","ErrorResp","ItemTypeEnum","MaxAllowedLimit","Section","Security","Step","StepAutomationConfig","StepRequirement","StepRequirementConditionEnum","StepTypeEnum","UpdateEntityAttributes","UpdateEntityAttributesSourceEnum","UpdateEntityAttributesTarget","WorkflowDefinition"]
+__all__ = ["ChangeReasonStatusReq","ClosingReason","ClosingReasonID","ClosingReasons","ClosingReasonsIds","ClosingReasonsStatus","DefinitionNotFoundResp","DynamicDueDate","DynamicDueDateActionTypeCondition","DynamicDueDateTimePeriod","ECPDetails","ErrorResp","ItemType","MaxAllowedLimit","Section","Security","Step","StepAutomationConfig","StepJourney","StepRequirement","StepRequirementCondition","StepType","UpdateEntityAttributes","UpdateEntityAttributesSource","UpdateEntityAttributesTarget","WorkflowDefinition","WorkflowDefinitionFlow"]
diff --git a/workflows_definition/src/sdk/models/shared/changereasonstatusreq.py b/workflows_definition/src/sdk/models/shared/changereasonstatusreq.py
index 778594aa8..b058e8968 100755
--- a/workflows_definition/src/sdk/models/shared/changereasonstatusreq.py
+++ b/workflows_definition/src/sdk/models/shared/changereasonstatusreq.py
@@ -2,7 +2,7 @@
from __future__ import annotations
import dataclasses
-from ..shared import closingreasonsstatus_enum as shared_closingreasonsstatus_enum
+from ..shared import closingreasonsstatus as shared_closingreasonsstatus
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
@@ -10,7 +10,6 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ChangeReasonStatusReq:
- r"""change the status of a closing reason"""
+ status: shared_closingreasonsstatus.ClosingReasonsStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- status: shared_closingreasonsstatus_enum.ClosingReasonsStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/closingreason.py b/workflows_definition/src/sdk/models/shared/closingreason.py
index 5de90d015..d705cbc3e 100755
--- a/workflows_definition/src/sdk/models/shared/closingreason.py
+++ b/workflows_definition/src/sdk/models/shared/closingreason.py
@@ -2,7 +2,7 @@
from __future__ import annotations
import dataclasses
-from ..shared import closingreasonsstatus_enum as shared_closingreasonsstatus_enum
+from ..shared import closingreasonsstatus as shared_closingreasonsstatus
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
from typing import Optional
@@ -12,10 +12,10 @@
@dataclasses.dataclass
class ClosingReason:
r"""One Closing reason for a workflow"""
+ status: shared_closingreasonsstatus.ClosingReasonsStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
+ title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }})
+ creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), '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 }})
+ 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 }})
- status: shared_closingreasonsstatus_enum.ClosingReasonsStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
- title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }})
- creation_time: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creationTime'), '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 }})
- 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 }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/closingreasonid.py b/workflows_definition/src/sdk/models/shared/closingreasonid.py
index 4be444c3f..6f3f25cc0 100755
--- a/workflows_definition/src/sdk/models/shared/closingreasonid.py
+++ b/workflows_definition/src/sdk/models/shared/closingreasonid.py
@@ -9,6 +9,6 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ClosingReasonID:
+ 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') }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/closingreasons.py b/workflows_definition/src/sdk/models/shared/closingreasons.py
index f596d73e5..d54d2176d 100755
--- a/workflows_definition/src/sdk/models/shared/closingreasons.py
+++ b/workflows_definition/src/sdk/models/shared/closingreasons.py
@@ -5,12 +5,12 @@
from ..shared import closingreason as shared_closingreason
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
+from typing import List
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ClosingReasons:
- r"""Returns the entire catalog of closing reasons per organization"""
+ reasons: List[shared_closingreason.ClosingReason] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons') }})
- reasons: list[shared_closingreason.ClosingReason] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons') }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/closingreasonsids.py b/workflows_definition/src/sdk/models/shared/closingreasonsids.py
index e09a20598..307d7ec6e 100755
--- a/workflows_definition/src/sdk/models/shared/closingreasonsids.py
+++ b/workflows_definition/src/sdk/models/shared/closingreasonsids.py
@@ -5,12 +5,12 @@
from ..shared import closingreasonid as shared_closingreasonid
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
+from typing import List
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ClosingReasonsIds:
- r"""Returns the entire catalog of closing reasons for a specific workflow"""
+ reasons: List[shared_closingreasonid.ClosingReasonID] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons') }})
- reasons: list[shared_closingreasonid.ClosingReasonID] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reasons') }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/closingreasonsstatus_enum.py b/workflows_definition/src/sdk/models/shared/closingreasonsstatus.py
similarity index 59%
rename from workflows_definition/src/sdk/models/shared/closingreasonsstatus_enum.py
rename to workflows_definition/src/sdk/models/shared/closingreasonsstatus.py
index c38dcb022..78cb07893 100755
--- a/workflows_definition/src/sdk/models/shared/closingreasonsstatus_enum.py
+++ b/workflows_definition/src/sdk/models/shared/closingreasonsstatus.py
@@ -3,6 +3,6 @@
from __future__ import annotations
from enum import Enum
-class ClosingReasonsStatusEnum(str, Enum):
- ACTIVE = "ACTIVE"
- INACTIVE = "INACTIVE"
+class ClosingReasonsStatus(str, Enum):
+ ACTIVE = 'ACTIVE'
+ INACTIVE = 'INACTIVE'
diff --git a/workflows_definition/src/sdk/models/shared/definitionnotfoundresp.py b/workflows_definition/src/sdk/models/shared/definitionnotfoundresp.py
new file mode 100755
index 000000000..bbeea7646
--- /dev/null
+++ b/workflows_definition/src/sdk/models/shared/definitionnotfoundresp.py
@@ -0,0 +1,16 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+from dataclasses_json import Undefined, dataclass_json
+from sdk import utils
+from typing import Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+@dataclasses.dataclass
+class DefinitionNotFoundResp:
+ r"""Definition could be not found"""
+ message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message'), 'exclude': lambda f: f is None }})
+
+
diff --git a/workflows_definition/src/sdk/models/shared/dynamicduedate.py b/workflows_definition/src/sdk/models/shared/dynamicduedate.py
index 9168c322c..7b887316a 100755
--- a/workflows_definition/src/sdk/models/shared/dynamicduedate.py
+++ b/workflows_definition/src/sdk/models/shared/dynamicduedate.py
@@ -7,23 +7,23 @@
from sdk 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"""
+ action_type_condition: DynamicDueDateActionTypeCondition = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('actionTypeCondition') }})
+ 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') }})
+ step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('stepId'), 'exclude': lambda f: f is None }})
- action_type_condition: DynamicDueDateActionTypeConditionEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('actionTypeCondition') }})
- 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') }})
- 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_definition/src/sdk/models/shared/ecpdetails.py b/workflows_definition/src/sdk/models/shared/ecpdetails.py
index 9862030a0..69f3783ca 100755
--- a/workflows_definition/src/sdk/models/shared/ecpdetails.py
+++ b/workflows_definition/src/sdk/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 sdk 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_definition/src/sdk/models/shared/errorresp.py b/workflows_definition/src/sdk/models/shared/errorresp.py
index 50110f530..493bb953f 100755
--- a/workflows_definition/src/sdk/models/shared/errorresp.py
+++ b/workflows_definition/src/sdk/models/shared/errorresp.py
@@ -10,7 +10,6 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ErrorResp:
- r"""bad request"""
+ 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_definition/src/sdk/models/shared/itemtype_enum.py b/workflows_definition/src/sdk/models/shared/itemtype.py
similarity index 64%
rename from workflows_definition/src/sdk/models/shared/itemtype_enum.py
rename to workflows_definition/src/sdk/models/shared/itemtype.py
index 0449374b7..9c9bb00b2 100755
--- a/workflows_definition/src/sdk/models/shared/itemtype_enum.py
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/models/shared/maxallowedlimit.py b/workflows_definition/src/sdk/models/shared/maxallowedlimit.py
index 27a27b3f1..683c672a5 100755
--- a/workflows_definition/src/sdk/models/shared/maxallowedlimit.py
+++ b/workflows_definition/src/sdk/models/shared/maxallowedlimit.py
@@ -10,8 +10,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class MaxAllowedLimit:
- r"""A combo of current number of workflows, and the max allowed number of workflows."""
+ current_no_of_workflows: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentNoOfWorkflows'), 'exclude': lambda f: f is None }})
+ max_allowed: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maxAllowed'), 'exclude': lambda f: f is None }})
- current_no_of_workflows: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currentNoOfWorkflows'), 'exclude': lambda f: f is None }})
- max_allowed: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maxAllowed'), 'exclude': lambda f: f is None }})
-
\ No newline at end of file
+
diff --git a/workflows_definition/src/sdk/models/shared/section.py b/workflows_definition/src/sdk/models/shared/section.py
index 7d3aaaded..027fd5dbd 100755
--- a/workflows_definition/src/sdk/models/shared/section.py
+++ b/workflows_definition/src/sdk/models/shared/section.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 ..shared import step as shared_step
from dataclasses_json import Undefined, dataclass_json
from sdk 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"""
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ order: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('order') }})
+ 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') }})
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
- name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
- order: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('order') }})
- 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') }})
- 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_definition/src/sdk/models/shared/security.py b/workflows_definition/src/sdk/models/shared/security.py
index e41721b57..6cd735f54 100755
--- a/workflows_definition/src/sdk/models/shared/security.py
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/models/shared/step.py b/workflows_definition/src/sdk/models/shared/step.py
index 721ab3632..a2f7a86a6 100755
--- a/workflows_definition/src/sdk/models/shared/step.py
+++ b/workflows_definition/src/sdk/models/shared/step.py
@@ -4,41 +4,49 @@
import dataclasses
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 steptype_enum as shared_steptype_enum
+from ..shared import steptype as shared_steptype
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
-from typing import Optional
+from typing import List, Optional
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class StepAutomationConfig:
-
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"""
+
+
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class Step:
r"""Action that needs to be done in a Workflow"""
-
- name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
- order: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('order') }})
- 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 }})
- automation_config: Optional[StepAutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), '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 }})
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ order: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('order') }})
+ 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 }})
+ automation_config: Optional[StepAutomationConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('automationConfig'), '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"""
- 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 }})
- id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), '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 }})
- r"""requirements that need to be fulfilled in order to enable the step execution"""
- 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"""Details regarding ECP for the workflow step"""
+ 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 }})
+ id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), '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 }})
+ 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 }})
+ r"""requirements that need to be fulfilled in order to enable the step execution"""
+ 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_definition/src/sdk/models/shared/stepjourney.py b/workflows_definition/src/sdk/models/shared/stepjourney.py
new file mode 100755
index 000000000..4aa0cb744
--- /dev/null
+++ b/workflows_definition/src/sdk/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 sdk 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_definition/src/sdk/models/shared/steprequirement.py b/workflows_definition/src/sdk/models/shared/steprequirement.py
index da66f0075..2e3bdab7e 100755
--- a/workflows_definition/src/sdk/models/shared/steprequirement.py
+++ b/workflows_definition/src/sdk/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 sdk 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_definition/src/sdk/models/shared/steptype_enum.py b/workflows_definition/src/sdk/models/shared/steptype.py
similarity index 61%
rename from workflows_definition/src/sdk/models/shared/steptype_enum.py
rename to workflows_definition/src/sdk/models/shared/steptype.py
index bd26773ba..178c7ab17 100755
--- a/workflows_definition/src/sdk/models/shared/steptype_enum.py
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/models/shared/updateentityattributes.py b/workflows_definition/src/sdk/models/shared/updateentityattributes.py
index 8092aca87..0b76e4c72 100755
--- a/workflows_definition/src/sdk/models/shared/updateentityattributes.py
+++ b/workflows_definition/src/sdk/models/shared/updateentityattributes.py
@@ -6,24 +6,25 @@
from enum import Enum
from sdk 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_definition/src/sdk/models/shared/workflowdefinition.py b/workflows_definition/src/sdk/models/shared/workflowdefinition.py
index 1ca247d15..dc443d946 100755
--- a/workflows_definition/src/sdk/models/shared/workflowdefinition.py
+++ b/workflows_definition/src/sdk/models/shared/workflowdefinition.py
@@ -4,33 +4,42 @@
import dataclasses
from ..shared import closingreasonid as shared_closingreasonid
from ..shared import dynamicduedate as shared_dynamicduedate
+from ..shared import section as shared_section
+from ..shared import step as shared_step
from ..shared import updateentityattributes as shared_updateentityattributes
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
-from typing import Any, Optional
+from typing import List, Optional, Union
+
+
+@dataclasses.dataclass
+class WorkflowDefinitionFlow:
+ pass
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class WorkflowDefinition:
- r"""Workflow Definition payload"""
-
- flow: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flow') }})
- name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
- 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_reasons: Optional[list[shared_closingreasonid.ClosingReasonID]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasons'), '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') }})
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ 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_reasons: Optional[List[shared_closingreasonid.ClosingReasonID]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('closingReasons'), '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"""ISO String Date & Time"""
- description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), '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"""ISO String Date & Time"""
+ description: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), '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"""
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_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"""ISO String Date & Time"""
- 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 }})
- 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"""ISO String Date & Time"""
+ 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 }})
+ 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_definition/src/sdk/sdk.py b/workflows_definition/src/sdk/sdk.py
index 4ea77f02e..0b4ec23bf 100755
--- a/workflows_definition/src/sdk/sdk.py
+++ b/workflows_definition/src/sdk/sdk.py
@@ -1,81 +1,59 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
import requests as requests_http
-from . import utils
from .closing_reason import ClosingReason
+from .sdkconfiguration import SDKConfiguration
from .workflows import Workflows
+from sdk import utils
from sdk.models import shared
-
-SERVERS = [
- "https://workflows-definition.sls.epilot.io",
-]
-"""Contains the list of servers available to the SDK"""
+from typing import Dict
class SDK:
- r"""Service for Workflow Definitions for different processes inside of an Organization
-
- """
+ r"""Workflows Definitions: Service for Workflow Definitions for different processes inside of an Organization"""
closing_reason: ClosingReason
workflows: Workflows
- _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.closing_reason = ClosingReason(
- self._client,
- self._security_client,
- self._server_url,
- self._language,
- self._sdk_version,
- self._gen_version
- )
-
- self.workflows = Workflows(
- self._client,
- self._security_client,
- self._server_url,
- self._language,
- self._sdk_version,
- self._gen_version
- )
-
+ self.closing_reason = ClosingReason(self.sdk_configuration)
+ self.workflows = Workflows(self.sdk_configuration)
\ No newline at end of file
diff --git a/workflows_definition/src/sdk/sdkconfiguration.py b/workflows_definition/src/sdk/sdkconfiguration.py
new file mode 100755
index 000000000..f2d598eb4
--- /dev/null
+++ b/workflows_definition/src/sdk/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-definition.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 openapi'
+ 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_definition/src/sdk/utils/retries.py b/workflows_definition/src/sdk/utils/retries.py
index c6251d948..25f49a1f2 100755
--- a/workflows_definition/src/sdk/utils/retries.py
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/utils/utils.py b/workflows_definition/src/sdk/utils/utils.py
index 9d4fba324..3ab126104 100755
--- a/workflows_definition/src/sdk/utils/utils.py
+++ b/workflows_definition/src/sdk/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_definition/src/sdk/workflows.py b/workflows_definition/src/sdk/workflows.py
index b442b7f15..4495f69c6 100755
--- a/workflows_definition/src/sdk/workflows.py
+++ b/workflows_definition/src/sdk/workflows.py
@@ -1,42 +1,34 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
-import requests as requests_http
-from . import utils
-from sdk.models import operations, shared
-from typing import Any, Optional
+from .sdkconfiguration import SDKConfiguration
+from sdk import utils
+from sdk.models import errors, operations, shared
+from typing import List, Optional
class Workflows:
- _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_definition(self, request: shared.WorkflowDefinition) -> operations.CreateDefinitionResponse:
r"""createDefinition
Create a Workflow Definition.
"""
- base_url = self._server_url
-
- url = base_url.removesuffix('/') + '/v1/workflows/definitions'
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+ url = base_url + '/v1/workflows/definitions'
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')
@@ -47,25 +39,32 @@ def create_definition(self, request: shared.WorkflowDefinition) -> operations.Cr
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.WorkflowDefinition])
res.workflow_definition = 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_definition(self, request: operations.DeleteDefinitionRequest) -> operations.DeleteDefinitionResponse:
r"""deleteDefinition
Delete Workflow Definition.
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.DeleteDefinitionRequest, base_url, '/v1/workflows/definitions/{definitionId}', 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.DeleteDefinitionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -76,21 +75,26 @@ def delete_definition(self, request: operations.DeleteDefinitionRequest) -> oper
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_definition(self, request: operations.GetDefinitionRequest) -> operations.GetDefinitionResponse:
r"""getDefinition
Get specific Definition by id from the Organization.
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.GetDefinitionRequest, base_url, '/v1/workflows/definitions/{definitionId}', 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.GetDefinitionResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -99,56 +103,72 @@ def get_definition(self, request: operations.GetDefinitionRequest) -> operations
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.WorkflowDefinition])
res.workflow_definition = 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)
elif http_res.status_code == 404:
if utils.match_content_type(content_type, 'application/json'):
- out = utils.unmarshal_json(http_res.text, Optional[Any])
+ out = utils.unmarshal_json(http_res.text, Optional[shared.DefinitionNotFoundResp])
res.definition_not_found_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_definitions(self) -> operations.GetDefinitionsResponse:
r"""getDefinitions
Retrieve all Workflow Definitions from an Organization
"""
- base_url = self._server_url
-
- url = base_url.removesuffix('/') + '/v1/workflows/definitions'
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+ url = base_url + '/v1/workflows/definitions'
+ headers = {}
+ 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)
+ http_res = client.request('GET', url, headers=headers)
content_type = http_res.headers.get('Content-Type')
res = operations.GetDefinitionsResponse(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.WorkflowDefinition]])
+ out = utils.unmarshal_json(http_res.text, Optional[List[shared.WorkflowDefinition]])
res.workflow_definitions = 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_max_allowed_limit(self) -> operations.GetMaxAllowedLimitResponse:
r"""getMaxAllowedLimit
Get limits and number of created executions for an Organization.
"""
- base_url = self._server_url
-
- url = base_url.removesuffix('/') + '/v1/workflows/limits/max-allowed'
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
+ url = base_url + '/v1/workflows/limits/max-allowed'
+ headers = {}
+ 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)
+ http_res = client.request('GET', url, headers=headers)
content_type = http_res.headers.get('Content-Type')
res = operations.GetMaxAllowedLimitResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -157,25 +177,32 @@ def get_max_allowed_limit(self) -> operations.GetMaxAllowedLimitResponse:
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.MaxAllowedLimit])
res.max_allowed_limit = 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_workflow_closing_reasons(self, request: operations.GetWorkflowClosingReasonsRequest) -> operations.GetWorkflowClosingReasonsResponse:
r"""getWorkflowClosingReasons
Returns all closing reasons defined for the workflow.
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.GetWorkflowClosingReasonsRequest, base_url, '/v1/workflows/definitions/{definitionId}/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.GetWorkflowClosingReasonsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
@@ -184,52 +211,56 @@ def get_workflow_closing_reasons(self, request: operations.GetWorkflowClosingRea
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.ClosingReasonsIds])
res.closing_reasons_ids = out
+ else:
+ raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
return res
+
def set_workflow_closing_reasons(self, request: operations.SetWorkflowClosingReasonsRequest) -> operations.SetWorkflowClosingReasonsResponse:
r"""setWorkflowClosingReasons
Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.SetWorkflowClosingReasonsRequest, base_url, '/v1/workflows/definitions/{definitionId}/closing-reasons', request)
-
headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, "closing_reasons_ids", 'json')
+ req_content_type, data, form = utils.serialize_request_body(request, "closing_reasons_ids", 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'] = '*/*'
+ 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')
res = operations.SetWorkflowClosingReasonsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
- if http_res.status_code == 201:
- pass
return res
+
def update_definition(self, request: operations.UpdateDefinitionRequest) -> operations.UpdateDefinitionResponse:
r"""updateDefinition
Update Workflow Definition.
"""
- base_url = self._server_url
+ base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = utils.generate_url(operations.UpdateDefinitionRequest, base_url, '/v1/workflows/definitions/{definitionId}', request)
-
headers = {}
- req_content_type, data, form = utils.serialize_request_body(request, "workflow_definition", 'json')
+ req_content_type, data, form = utils.serialize_request_body(request, "workflow_definition", 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('PUT', url, data=data, files=form, headers=headers)
content_type = http_res.headers.get('Content-Type')
@@ -240,10 +271,14 @@ def update_definition(self, request: operations.UpdateDefinitionRequest) -> oper
if utils.match_content_type(content_type, 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[shared.WorkflowDefinition])
res.workflow_definition = 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