hatchet-sdk 1.11.0__py3-none-any.whl → 1.12.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/__init__.py +2 -0
- hatchet_sdk/client.py +2 -0
- hatchet_sdk/clients/admin.py +4 -2
- hatchet_sdk/clients/events.py +10 -2
- hatchet_sdk/clients/rest/__init__.py +4 -0
- hatchet_sdk/clients/rest/api/event_api.py +67 -0
- hatchet_sdk/clients/rest/api/filter_api.py +339 -0
- hatchet_sdk/clients/rest/api/tenant_api.py +275 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +310 -0
- hatchet_sdk/clients/rest/models/__init__.py +4 -0
- hatchet_sdk/clients/rest/models/create_tenant_request.py +15 -2
- hatchet_sdk/clients/rest/models/tenant.py +6 -0
- hatchet_sdk/clients/rest/models/tenant_ui_version.py +37 -0
- hatchet_sdk/clients/rest/models/update_tenant_request.py +6 -0
- hatchet_sdk/clients/rest/models/v1_update_filter_request.py +98 -0
- hatchet_sdk/contracts/v1/workflows_pb2.py +26 -24
- hatchet_sdk/contracts/v1/workflows_pb2.pyi +14 -2
- hatchet_sdk/features/filters.py +36 -0
- hatchet_sdk/features/runs.py +22 -3
- hatchet_sdk/features/tenant.py +32 -0
- hatchet_sdk/hatchet.py +51 -8
- hatchet_sdk/runnables/action.py +1 -1
- hatchet_sdk/runnables/types.py +22 -4
- hatchet_sdk/runnables/workflow.py +413 -188
- hatchet_sdk/waits.py +2 -2
- {hatchet_sdk-1.11.0.dist-info → hatchet_sdk-1.12.0.dist-info}/METADATA +1 -1
- {hatchet_sdk-1.11.0.dist-info → hatchet_sdk-1.12.0.dist-info}/RECORD +29 -27
- hatchet_sdk/runnables/standalone.py +0 -391
- {hatchet_sdk-1.11.0.dist-info → hatchet_sdk-1.12.0.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.11.0.dist-info → hatchet_sdk-1.12.0.dist-info}/entry_points.txt +0 -0
|
@@ -1730,6 +1730,281 @@ class TenantApi:
|
|
|
1730
1730
|
_request_auth=_request_auth,
|
|
1731
1731
|
)
|
|
1732
1732
|
|
|
1733
|
+
@validate_call
|
|
1734
|
+
def tenant_get(
|
|
1735
|
+
self,
|
|
1736
|
+
tenant: Annotated[
|
|
1737
|
+
str,
|
|
1738
|
+
Field(
|
|
1739
|
+
min_length=36,
|
|
1740
|
+
strict=True,
|
|
1741
|
+
max_length=36,
|
|
1742
|
+
description="The tenant id to get details for",
|
|
1743
|
+
),
|
|
1744
|
+
],
|
|
1745
|
+
_request_timeout: Union[
|
|
1746
|
+
None,
|
|
1747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1748
|
+
Tuple[
|
|
1749
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1750
|
+
],
|
|
1751
|
+
] = None,
|
|
1752
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1753
|
+
_content_type: Optional[StrictStr] = None,
|
|
1754
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1755
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1756
|
+
) -> Tenant:
|
|
1757
|
+
"""Get tenant
|
|
1758
|
+
|
|
1759
|
+
Get the details of a tenant
|
|
1760
|
+
|
|
1761
|
+
:param tenant: The tenant id to get details for (required)
|
|
1762
|
+
:type tenant: str
|
|
1763
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1764
|
+
number provided, it will be total request
|
|
1765
|
+
timeout. It can also be a pair (tuple) of
|
|
1766
|
+
(connection, read) timeouts.
|
|
1767
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1768
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1769
|
+
request; this effectively ignores the
|
|
1770
|
+
authentication in the spec for a single request.
|
|
1771
|
+
:type _request_auth: dict, optional
|
|
1772
|
+
:param _content_type: force content-type for the request.
|
|
1773
|
+
:type _content_type: str, Optional
|
|
1774
|
+
:param _headers: set to override the headers for a single
|
|
1775
|
+
request; this effectively ignores the headers
|
|
1776
|
+
in the spec for a single request.
|
|
1777
|
+
:type _headers: dict, optional
|
|
1778
|
+
:param _host_index: set to override the host_index for a single
|
|
1779
|
+
request; this effectively ignores the host_index
|
|
1780
|
+
in the spec for a single request.
|
|
1781
|
+
:type _host_index: int, optional
|
|
1782
|
+
:return: Returns the result object.
|
|
1783
|
+
""" # noqa: E501
|
|
1784
|
+
|
|
1785
|
+
_param = self._tenant_get_serialize(
|
|
1786
|
+
tenant=tenant,
|
|
1787
|
+
_request_auth=_request_auth,
|
|
1788
|
+
_content_type=_content_type,
|
|
1789
|
+
_headers=_headers,
|
|
1790
|
+
_host_index=_host_index,
|
|
1791
|
+
)
|
|
1792
|
+
|
|
1793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1794
|
+
"200": "Tenant",
|
|
1795
|
+
"400": "APIErrors",
|
|
1796
|
+
"403": "APIError",
|
|
1797
|
+
"404": "APIErrors",
|
|
1798
|
+
}
|
|
1799
|
+
response_data = self.api_client.call_api(
|
|
1800
|
+
*_param, _request_timeout=_request_timeout
|
|
1801
|
+
)
|
|
1802
|
+
response_data.read()
|
|
1803
|
+
return self.api_client.response_deserialize(
|
|
1804
|
+
response_data=response_data,
|
|
1805
|
+
response_types_map=_response_types_map,
|
|
1806
|
+
).data
|
|
1807
|
+
|
|
1808
|
+
@validate_call
|
|
1809
|
+
def tenant_get_with_http_info(
|
|
1810
|
+
self,
|
|
1811
|
+
tenant: Annotated[
|
|
1812
|
+
str,
|
|
1813
|
+
Field(
|
|
1814
|
+
min_length=36,
|
|
1815
|
+
strict=True,
|
|
1816
|
+
max_length=36,
|
|
1817
|
+
description="The tenant id to get details for",
|
|
1818
|
+
),
|
|
1819
|
+
],
|
|
1820
|
+
_request_timeout: Union[
|
|
1821
|
+
None,
|
|
1822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1823
|
+
Tuple[
|
|
1824
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1825
|
+
],
|
|
1826
|
+
] = None,
|
|
1827
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1828
|
+
_content_type: Optional[StrictStr] = None,
|
|
1829
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1830
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1831
|
+
) -> ApiResponse[Tenant]:
|
|
1832
|
+
"""Get tenant
|
|
1833
|
+
|
|
1834
|
+
Get the details of a tenant
|
|
1835
|
+
|
|
1836
|
+
:param tenant: The tenant id to get details for (required)
|
|
1837
|
+
:type tenant: str
|
|
1838
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1839
|
+
number provided, it will be total request
|
|
1840
|
+
timeout. It can also be a pair (tuple) of
|
|
1841
|
+
(connection, read) timeouts.
|
|
1842
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1843
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1844
|
+
request; this effectively ignores the
|
|
1845
|
+
authentication in the spec for a single request.
|
|
1846
|
+
:type _request_auth: dict, optional
|
|
1847
|
+
:param _content_type: force content-type for the request.
|
|
1848
|
+
:type _content_type: str, Optional
|
|
1849
|
+
:param _headers: set to override the headers for a single
|
|
1850
|
+
request; this effectively ignores the headers
|
|
1851
|
+
in the spec for a single request.
|
|
1852
|
+
:type _headers: dict, optional
|
|
1853
|
+
:param _host_index: set to override the host_index for a single
|
|
1854
|
+
request; this effectively ignores the host_index
|
|
1855
|
+
in the spec for a single request.
|
|
1856
|
+
:type _host_index: int, optional
|
|
1857
|
+
:return: Returns the result object.
|
|
1858
|
+
""" # noqa: E501
|
|
1859
|
+
|
|
1860
|
+
_param = self._tenant_get_serialize(
|
|
1861
|
+
tenant=tenant,
|
|
1862
|
+
_request_auth=_request_auth,
|
|
1863
|
+
_content_type=_content_type,
|
|
1864
|
+
_headers=_headers,
|
|
1865
|
+
_host_index=_host_index,
|
|
1866
|
+
)
|
|
1867
|
+
|
|
1868
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1869
|
+
"200": "Tenant",
|
|
1870
|
+
"400": "APIErrors",
|
|
1871
|
+
"403": "APIError",
|
|
1872
|
+
"404": "APIErrors",
|
|
1873
|
+
}
|
|
1874
|
+
response_data = self.api_client.call_api(
|
|
1875
|
+
*_param, _request_timeout=_request_timeout
|
|
1876
|
+
)
|
|
1877
|
+
response_data.read()
|
|
1878
|
+
return self.api_client.response_deserialize(
|
|
1879
|
+
response_data=response_data,
|
|
1880
|
+
response_types_map=_response_types_map,
|
|
1881
|
+
)
|
|
1882
|
+
|
|
1883
|
+
@validate_call
|
|
1884
|
+
def tenant_get_without_preload_content(
|
|
1885
|
+
self,
|
|
1886
|
+
tenant: Annotated[
|
|
1887
|
+
str,
|
|
1888
|
+
Field(
|
|
1889
|
+
min_length=36,
|
|
1890
|
+
strict=True,
|
|
1891
|
+
max_length=36,
|
|
1892
|
+
description="The tenant id to get details for",
|
|
1893
|
+
),
|
|
1894
|
+
],
|
|
1895
|
+
_request_timeout: Union[
|
|
1896
|
+
None,
|
|
1897
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1898
|
+
Tuple[
|
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1900
|
+
],
|
|
1901
|
+
] = None,
|
|
1902
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1903
|
+
_content_type: Optional[StrictStr] = None,
|
|
1904
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1905
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1906
|
+
) -> RESTResponseType:
|
|
1907
|
+
"""Get tenant
|
|
1908
|
+
|
|
1909
|
+
Get the details of a tenant
|
|
1910
|
+
|
|
1911
|
+
:param tenant: The tenant id to get details for (required)
|
|
1912
|
+
:type tenant: str
|
|
1913
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1914
|
+
number provided, it will be total request
|
|
1915
|
+
timeout. It can also be a pair (tuple) of
|
|
1916
|
+
(connection, read) timeouts.
|
|
1917
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1918
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1919
|
+
request; this effectively ignores the
|
|
1920
|
+
authentication in the spec for a single request.
|
|
1921
|
+
:type _request_auth: dict, optional
|
|
1922
|
+
:param _content_type: force content-type for the request.
|
|
1923
|
+
:type _content_type: str, Optional
|
|
1924
|
+
:param _headers: set to override the headers for a single
|
|
1925
|
+
request; this effectively ignores the headers
|
|
1926
|
+
in the spec for a single request.
|
|
1927
|
+
:type _headers: dict, optional
|
|
1928
|
+
:param _host_index: set to override the host_index for a single
|
|
1929
|
+
request; this effectively ignores the host_index
|
|
1930
|
+
in the spec for a single request.
|
|
1931
|
+
:type _host_index: int, optional
|
|
1932
|
+
:return: Returns the result object.
|
|
1933
|
+
""" # noqa: E501
|
|
1934
|
+
|
|
1935
|
+
_param = self._tenant_get_serialize(
|
|
1936
|
+
tenant=tenant,
|
|
1937
|
+
_request_auth=_request_auth,
|
|
1938
|
+
_content_type=_content_type,
|
|
1939
|
+
_headers=_headers,
|
|
1940
|
+
_host_index=_host_index,
|
|
1941
|
+
)
|
|
1942
|
+
|
|
1943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1944
|
+
"200": "Tenant",
|
|
1945
|
+
"400": "APIErrors",
|
|
1946
|
+
"403": "APIError",
|
|
1947
|
+
"404": "APIErrors",
|
|
1948
|
+
}
|
|
1949
|
+
response_data = self.api_client.call_api(
|
|
1950
|
+
*_param, _request_timeout=_request_timeout
|
|
1951
|
+
)
|
|
1952
|
+
return response_data.response
|
|
1953
|
+
|
|
1954
|
+
def _tenant_get_serialize(
|
|
1955
|
+
self,
|
|
1956
|
+
tenant,
|
|
1957
|
+
_request_auth,
|
|
1958
|
+
_content_type,
|
|
1959
|
+
_headers,
|
|
1960
|
+
_host_index,
|
|
1961
|
+
) -> RequestSerialized:
|
|
1962
|
+
|
|
1963
|
+
_host = None
|
|
1964
|
+
|
|
1965
|
+
_collection_formats: Dict[str, str] = {}
|
|
1966
|
+
|
|
1967
|
+
_path_params: Dict[str, str] = {}
|
|
1968
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1969
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1970
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1971
|
+
_files: Dict[
|
|
1972
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1973
|
+
] = {}
|
|
1974
|
+
_body_params: Optional[bytes] = None
|
|
1975
|
+
|
|
1976
|
+
# process the path parameters
|
|
1977
|
+
if tenant is not None:
|
|
1978
|
+
_path_params["tenant"] = tenant
|
|
1979
|
+
# process the query parameters
|
|
1980
|
+
# process the header parameters
|
|
1981
|
+
# process the form parameters
|
|
1982
|
+
# process the body parameter
|
|
1983
|
+
|
|
1984
|
+
# set the HTTP header `Accept`
|
|
1985
|
+
if "Accept" not in _header_params:
|
|
1986
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1987
|
+
["application/json"]
|
|
1988
|
+
)
|
|
1989
|
+
|
|
1990
|
+
# authentication setting
|
|
1991
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1992
|
+
|
|
1993
|
+
return self.api_client.param_serialize(
|
|
1994
|
+
method="GET",
|
|
1995
|
+
resource_path="/api/v1/tenants/{tenant}",
|
|
1996
|
+
path_params=_path_params,
|
|
1997
|
+
query_params=_query_params,
|
|
1998
|
+
header_params=_header_params,
|
|
1999
|
+
body=_body_params,
|
|
2000
|
+
post_params=_form_params,
|
|
2001
|
+
files=_files,
|
|
2002
|
+
auth_settings=_auth_settings,
|
|
2003
|
+
collection_formats=_collection_formats,
|
|
2004
|
+
_host=_host,
|
|
2005
|
+
_request_auth=_request_auth,
|
|
2006
|
+
)
|
|
2007
|
+
|
|
1733
2008
|
@validate_call
|
|
1734
2009
|
def tenant_get_step_run_queue_metrics(
|
|
1735
2010
|
self,
|
|
@@ -915,6 +915,284 @@ class WorkflowRunsApi:
|
|
|
915
915
|
_request_auth=_request_auth,
|
|
916
916
|
)
|
|
917
917
|
|
|
918
|
+
@validate_call
|
|
919
|
+
def v1_workflow_run_get_status(
|
|
920
|
+
self,
|
|
921
|
+
v1_workflow_run: Annotated[
|
|
922
|
+
str,
|
|
923
|
+
Field(
|
|
924
|
+
min_length=36,
|
|
925
|
+
strict=True,
|
|
926
|
+
max_length=36,
|
|
927
|
+
description="The workflow run id to get the status for",
|
|
928
|
+
),
|
|
929
|
+
],
|
|
930
|
+
_request_timeout: Union[
|
|
931
|
+
None,
|
|
932
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
933
|
+
Tuple[
|
|
934
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
935
|
+
],
|
|
936
|
+
] = None,
|
|
937
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
938
|
+
_content_type: Optional[StrictStr] = None,
|
|
939
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
940
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
941
|
+
) -> V1TaskStatus:
|
|
942
|
+
"""Get workflow run status
|
|
943
|
+
|
|
944
|
+
Get the status of a workflow run.
|
|
945
|
+
|
|
946
|
+
:param v1_workflow_run: The workflow run id to get the status for (required)
|
|
947
|
+
:type v1_workflow_run: str
|
|
948
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
949
|
+
number provided, it will be total request
|
|
950
|
+
timeout. It can also be a pair (tuple) of
|
|
951
|
+
(connection, read) timeouts.
|
|
952
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
953
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
954
|
+
request; this effectively ignores the
|
|
955
|
+
authentication in the spec for a single request.
|
|
956
|
+
:type _request_auth: dict, optional
|
|
957
|
+
:param _content_type: force content-type for the request.
|
|
958
|
+
:type _content_type: str, Optional
|
|
959
|
+
:param _headers: set to override the headers for a single
|
|
960
|
+
request; this effectively ignores the headers
|
|
961
|
+
in the spec for a single request.
|
|
962
|
+
:type _headers: dict, optional
|
|
963
|
+
:param _host_index: set to override the host_index for a single
|
|
964
|
+
request; this effectively ignores the host_index
|
|
965
|
+
in the spec for a single request.
|
|
966
|
+
:type _host_index: int, optional
|
|
967
|
+
:return: Returns the result object.
|
|
968
|
+
""" # noqa: E501
|
|
969
|
+
|
|
970
|
+
_param = self._v1_workflow_run_get_status_serialize(
|
|
971
|
+
v1_workflow_run=v1_workflow_run,
|
|
972
|
+
_request_auth=_request_auth,
|
|
973
|
+
_content_type=_content_type,
|
|
974
|
+
_headers=_headers,
|
|
975
|
+
_host_index=_host_index,
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
979
|
+
"200": "V1TaskStatus",
|
|
980
|
+
"400": "APIErrors",
|
|
981
|
+
"403": "APIErrors",
|
|
982
|
+
"404": "APIErrors",
|
|
983
|
+
"501": "APIErrors",
|
|
984
|
+
}
|
|
985
|
+
response_data = self.api_client.call_api(
|
|
986
|
+
*_param, _request_timeout=_request_timeout
|
|
987
|
+
)
|
|
988
|
+
response_data.read()
|
|
989
|
+
return self.api_client.response_deserialize(
|
|
990
|
+
response_data=response_data,
|
|
991
|
+
response_types_map=_response_types_map,
|
|
992
|
+
).data
|
|
993
|
+
|
|
994
|
+
@validate_call
|
|
995
|
+
def v1_workflow_run_get_status_with_http_info(
|
|
996
|
+
self,
|
|
997
|
+
v1_workflow_run: Annotated[
|
|
998
|
+
str,
|
|
999
|
+
Field(
|
|
1000
|
+
min_length=36,
|
|
1001
|
+
strict=True,
|
|
1002
|
+
max_length=36,
|
|
1003
|
+
description="The workflow run id to get the status for",
|
|
1004
|
+
),
|
|
1005
|
+
],
|
|
1006
|
+
_request_timeout: Union[
|
|
1007
|
+
None,
|
|
1008
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1009
|
+
Tuple[
|
|
1010
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1011
|
+
],
|
|
1012
|
+
] = None,
|
|
1013
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1014
|
+
_content_type: Optional[StrictStr] = None,
|
|
1015
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1016
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1017
|
+
) -> ApiResponse[V1TaskStatus]:
|
|
1018
|
+
"""Get workflow run status
|
|
1019
|
+
|
|
1020
|
+
Get the status of a workflow run.
|
|
1021
|
+
|
|
1022
|
+
:param v1_workflow_run: The workflow run id to get the status for (required)
|
|
1023
|
+
:type v1_workflow_run: str
|
|
1024
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1025
|
+
number provided, it will be total request
|
|
1026
|
+
timeout. It can also be a pair (tuple) of
|
|
1027
|
+
(connection, read) timeouts.
|
|
1028
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1029
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1030
|
+
request; this effectively ignores the
|
|
1031
|
+
authentication in the spec for a single request.
|
|
1032
|
+
:type _request_auth: dict, optional
|
|
1033
|
+
:param _content_type: force content-type for the request.
|
|
1034
|
+
:type _content_type: str, Optional
|
|
1035
|
+
:param _headers: set to override the headers for a single
|
|
1036
|
+
request; this effectively ignores the headers
|
|
1037
|
+
in the spec for a single request.
|
|
1038
|
+
:type _headers: dict, optional
|
|
1039
|
+
:param _host_index: set to override the host_index for a single
|
|
1040
|
+
request; this effectively ignores the host_index
|
|
1041
|
+
in the spec for a single request.
|
|
1042
|
+
:type _host_index: int, optional
|
|
1043
|
+
:return: Returns the result object.
|
|
1044
|
+
""" # noqa: E501
|
|
1045
|
+
|
|
1046
|
+
_param = self._v1_workflow_run_get_status_serialize(
|
|
1047
|
+
v1_workflow_run=v1_workflow_run,
|
|
1048
|
+
_request_auth=_request_auth,
|
|
1049
|
+
_content_type=_content_type,
|
|
1050
|
+
_headers=_headers,
|
|
1051
|
+
_host_index=_host_index,
|
|
1052
|
+
)
|
|
1053
|
+
|
|
1054
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1055
|
+
"200": "V1TaskStatus",
|
|
1056
|
+
"400": "APIErrors",
|
|
1057
|
+
"403": "APIErrors",
|
|
1058
|
+
"404": "APIErrors",
|
|
1059
|
+
"501": "APIErrors",
|
|
1060
|
+
}
|
|
1061
|
+
response_data = self.api_client.call_api(
|
|
1062
|
+
*_param, _request_timeout=_request_timeout
|
|
1063
|
+
)
|
|
1064
|
+
response_data.read()
|
|
1065
|
+
return self.api_client.response_deserialize(
|
|
1066
|
+
response_data=response_data,
|
|
1067
|
+
response_types_map=_response_types_map,
|
|
1068
|
+
)
|
|
1069
|
+
|
|
1070
|
+
@validate_call
|
|
1071
|
+
def v1_workflow_run_get_status_without_preload_content(
|
|
1072
|
+
self,
|
|
1073
|
+
v1_workflow_run: Annotated[
|
|
1074
|
+
str,
|
|
1075
|
+
Field(
|
|
1076
|
+
min_length=36,
|
|
1077
|
+
strict=True,
|
|
1078
|
+
max_length=36,
|
|
1079
|
+
description="The workflow run id to get the status for",
|
|
1080
|
+
),
|
|
1081
|
+
],
|
|
1082
|
+
_request_timeout: Union[
|
|
1083
|
+
None,
|
|
1084
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1085
|
+
Tuple[
|
|
1086
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1087
|
+
],
|
|
1088
|
+
] = None,
|
|
1089
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1090
|
+
_content_type: Optional[StrictStr] = None,
|
|
1091
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1092
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1093
|
+
) -> RESTResponseType:
|
|
1094
|
+
"""Get workflow run status
|
|
1095
|
+
|
|
1096
|
+
Get the status of a workflow run.
|
|
1097
|
+
|
|
1098
|
+
:param v1_workflow_run: The workflow run id to get the status for (required)
|
|
1099
|
+
:type v1_workflow_run: str
|
|
1100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1101
|
+
number provided, it will be total request
|
|
1102
|
+
timeout. It can also be a pair (tuple) of
|
|
1103
|
+
(connection, read) timeouts.
|
|
1104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1106
|
+
request; this effectively ignores the
|
|
1107
|
+
authentication in the spec for a single request.
|
|
1108
|
+
:type _request_auth: dict, optional
|
|
1109
|
+
:param _content_type: force content-type for the request.
|
|
1110
|
+
:type _content_type: str, Optional
|
|
1111
|
+
:param _headers: set to override the headers for a single
|
|
1112
|
+
request; this effectively ignores the headers
|
|
1113
|
+
in the spec for a single request.
|
|
1114
|
+
:type _headers: dict, optional
|
|
1115
|
+
:param _host_index: set to override the host_index for a single
|
|
1116
|
+
request; this effectively ignores the host_index
|
|
1117
|
+
in the spec for a single request.
|
|
1118
|
+
:type _host_index: int, optional
|
|
1119
|
+
:return: Returns the result object.
|
|
1120
|
+
""" # noqa: E501
|
|
1121
|
+
|
|
1122
|
+
_param = self._v1_workflow_run_get_status_serialize(
|
|
1123
|
+
v1_workflow_run=v1_workflow_run,
|
|
1124
|
+
_request_auth=_request_auth,
|
|
1125
|
+
_content_type=_content_type,
|
|
1126
|
+
_headers=_headers,
|
|
1127
|
+
_host_index=_host_index,
|
|
1128
|
+
)
|
|
1129
|
+
|
|
1130
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1131
|
+
"200": "V1TaskStatus",
|
|
1132
|
+
"400": "APIErrors",
|
|
1133
|
+
"403": "APIErrors",
|
|
1134
|
+
"404": "APIErrors",
|
|
1135
|
+
"501": "APIErrors",
|
|
1136
|
+
}
|
|
1137
|
+
response_data = self.api_client.call_api(
|
|
1138
|
+
*_param, _request_timeout=_request_timeout
|
|
1139
|
+
)
|
|
1140
|
+
return response_data.response
|
|
1141
|
+
|
|
1142
|
+
def _v1_workflow_run_get_status_serialize(
|
|
1143
|
+
self,
|
|
1144
|
+
v1_workflow_run,
|
|
1145
|
+
_request_auth,
|
|
1146
|
+
_content_type,
|
|
1147
|
+
_headers,
|
|
1148
|
+
_host_index,
|
|
1149
|
+
) -> RequestSerialized:
|
|
1150
|
+
|
|
1151
|
+
_host = None
|
|
1152
|
+
|
|
1153
|
+
_collection_formats: Dict[str, str] = {}
|
|
1154
|
+
|
|
1155
|
+
_path_params: Dict[str, str] = {}
|
|
1156
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1157
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1158
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1159
|
+
_files: Dict[
|
|
1160
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1161
|
+
] = {}
|
|
1162
|
+
_body_params: Optional[bytes] = None
|
|
1163
|
+
|
|
1164
|
+
# process the path parameters
|
|
1165
|
+
if v1_workflow_run is not None:
|
|
1166
|
+
_path_params["v1-workflow-run"] = v1_workflow_run
|
|
1167
|
+
# process the query parameters
|
|
1168
|
+
# process the header parameters
|
|
1169
|
+
# process the form parameters
|
|
1170
|
+
# process the body parameter
|
|
1171
|
+
|
|
1172
|
+
# set the HTTP header `Accept`
|
|
1173
|
+
if "Accept" not in _header_params:
|
|
1174
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1175
|
+
["application/json"]
|
|
1176
|
+
)
|
|
1177
|
+
|
|
1178
|
+
# authentication setting
|
|
1179
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1180
|
+
|
|
1181
|
+
return self.api_client.param_serialize(
|
|
1182
|
+
method="GET",
|
|
1183
|
+
resource_path="/api/v1/stable/workflow-runs/{v1-workflow-run}/status",
|
|
1184
|
+
path_params=_path_params,
|
|
1185
|
+
query_params=_query_params,
|
|
1186
|
+
header_params=_header_params,
|
|
1187
|
+
body=_body_params,
|
|
1188
|
+
post_params=_form_params,
|
|
1189
|
+
files=_files,
|
|
1190
|
+
auth_settings=_auth_settings,
|
|
1191
|
+
collection_formats=_collection_formats,
|
|
1192
|
+
_host=_host,
|
|
1193
|
+
_request_auth=_request_auth,
|
|
1194
|
+
)
|
|
1195
|
+
|
|
918
1196
|
@validate_call
|
|
919
1197
|
def v1_workflow_run_get_timings(
|
|
920
1198
|
self,
|
|
@@ -1264,6 +1542,12 @@ class WorkflowRunsApi:
|
|
|
1264
1542
|
description="The external id of the event that triggered the workflow run"
|
|
1265
1543
|
),
|
|
1266
1544
|
] = None,
|
|
1545
|
+
include_payloads: Annotated[
|
|
1546
|
+
Optional[StrictBool],
|
|
1547
|
+
Field(
|
|
1548
|
+
description="A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset."
|
|
1549
|
+
),
|
|
1550
|
+
] = None,
|
|
1267
1551
|
_request_timeout: Union[
|
|
1268
1552
|
None,
|
|
1269
1553
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1304,6 +1588,8 @@ class WorkflowRunsApi:
|
|
|
1304
1588
|
:type parent_task_external_id: str
|
|
1305
1589
|
:param triggering_event_external_id: The external id of the event that triggered the workflow run
|
|
1306
1590
|
:type triggering_event_external_id: str
|
|
1591
|
+
:param include_payloads: A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset.
|
|
1592
|
+
:type include_payloads: bool
|
|
1307
1593
|
:param _request_timeout: timeout setting for this request. If one
|
|
1308
1594
|
number provided, it will be total request
|
|
1309
1595
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1339,6 +1625,7 @@ class WorkflowRunsApi:
|
|
|
1339
1625
|
worker_id=worker_id,
|
|
1340
1626
|
parent_task_external_id=parent_task_external_id,
|
|
1341
1627
|
triggering_event_external_id=triggering_event_external_id,
|
|
1628
|
+
include_payloads=include_payloads,
|
|
1342
1629
|
_request_auth=_request_auth,
|
|
1343
1630
|
_content_type=_content_type,
|
|
1344
1631
|
_headers=_headers,
|
|
@@ -1411,6 +1698,12 @@ class WorkflowRunsApi:
|
|
|
1411
1698
|
description="The external id of the event that triggered the workflow run"
|
|
1412
1699
|
),
|
|
1413
1700
|
] = None,
|
|
1701
|
+
include_payloads: Annotated[
|
|
1702
|
+
Optional[StrictBool],
|
|
1703
|
+
Field(
|
|
1704
|
+
description="A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset."
|
|
1705
|
+
),
|
|
1706
|
+
] = None,
|
|
1414
1707
|
_request_timeout: Union[
|
|
1415
1708
|
None,
|
|
1416
1709
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1451,6 +1744,8 @@ class WorkflowRunsApi:
|
|
|
1451
1744
|
:type parent_task_external_id: str
|
|
1452
1745
|
:param triggering_event_external_id: The external id of the event that triggered the workflow run
|
|
1453
1746
|
:type triggering_event_external_id: str
|
|
1747
|
+
:param include_payloads: A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset.
|
|
1748
|
+
:type include_payloads: bool
|
|
1454
1749
|
:param _request_timeout: timeout setting for this request. If one
|
|
1455
1750
|
number provided, it will be total request
|
|
1456
1751
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1486,6 +1781,7 @@ class WorkflowRunsApi:
|
|
|
1486
1781
|
worker_id=worker_id,
|
|
1487
1782
|
parent_task_external_id=parent_task_external_id,
|
|
1488
1783
|
triggering_event_external_id=triggering_event_external_id,
|
|
1784
|
+
include_payloads=include_payloads,
|
|
1489
1785
|
_request_auth=_request_auth,
|
|
1490
1786
|
_content_type=_content_type,
|
|
1491
1787
|
_headers=_headers,
|
|
@@ -1558,6 +1854,12 @@ class WorkflowRunsApi:
|
|
|
1558
1854
|
description="The external id of the event that triggered the workflow run"
|
|
1559
1855
|
),
|
|
1560
1856
|
] = None,
|
|
1857
|
+
include_payloads: Annotated[
|
|
1858
|
+
Optional[StrictBool],
|
|
1859
|
+
Field(
|
|
1860
|
+
description="A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset."
|
|
1861
|
+
),
|
|
1862
|
+
] = None,
|
|
1561
1863
|
_request_timeout: Union[
|
|
1562
1864
|
None,
|
|
1563
1865
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1598,6 +1900,8 @@ class WorkflowRunsApi:
|
|
|
1598
1900
|
:type parent_task_external_id: str
|
|
1599
1901
|
:param triggering_event_external_id: The external id of the event that triggered the workflow run
|
|
1600
1902
|
:type triggering_event_external_id: str
|
|
1903
|
+
:param include_payloads: A flag for whether or not to include the input and output payloads in the response. Defaults to `true` if unset.
|
|
1904
|
+
:type include_payloads: bool
|
|
1601
1905
|
:param _request_timeout: timeout setting for this request. If one
|
|
1602
1906
|
number provided, it will be total request
|
|
1603
1907
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1633,6 +1937,7 @@ class WorkflowRunsApi:
|
|
|
1633
1937
|
worker_id=worker_id,
|
|
1634
1938
|
parent_task_external_id=parent_task_external_id,
|
|
1635
1939
|
triggering_event_external_id=triggering_event_external_id,
|
|
1940
|
+
include_payloads=include_payloads,
|
|
1636
1941
|
_request_auth=_request_auth,
|
|
1637
1942
|
_content_type=_content_type,
|
|
1638
1943
|
_headers=_headers,
|
|
@@ -1664,6 +1969,7 @@ class WorkflowRunsApi:
|
|
|
1664
1969
|
worker_id,
|
|
1665
1970
|
parent_task_external_id,
|
|
1666
1971
|
triggering_event_external_id,
|
|
1972
|
+
include_payloads,
|
|
1667
1973
|
_request_auth,
|
|
1668
1974
|
_content_type,
|
|
1669
1975
|
_headers,
|
|
@@ -1751,6 +2057,10 @@ class WorkflowRunsApi:
|
|
|
1751
2057
|
("triggering_event_external_id", triggering_event_external_id)
|
|
1752
2058
|
)
|
|
1753
2059
|
|
|
2060
|
+
if include_payloads is not None:
|
|
2061
|
+
|
|
2062
|
+
_query_params.append(("include_payloads", include_payloads))
|
|
2063
|
+
|
|
1754
2064
|
# process the header parameters
|
|
1755
2065
|
# process the form parameters
|
|
1756
2066
|
# process the body parameter
|
|
@@ -171,6 +171,7 @@ from hatchet_sdk.clients.rest.models.tenant_resource_policy import TenantResourc
|
|
|
171
171
|
from hatchet_sdk.clients.rest.models.tenant_step_run_queue_metrics import (
|
|
172
172
|
TenantStepRunQueueMetrics,
|
|
173
173
|
)
|
|
174
|
+
from hatchet_sdk.clients.rest.models.tenant_ui_version import TenantUIVersion
|
|
174
175
|
from hatchet_sdk.clients.rest.models.tenant_version import TenantVersion
|
|
175
176
|
from hatchet_sdk.clients.rest.models.trigger_workflow_run_request import (
|
|
176
177
|
TriggerWorkflowRunRequest,
|
|
@@ -225,6 +226,9 @@ from hatchet_sdk.clients.rest.models.v1_task_timing_list import V1TaskTimingList
|
|
|
225
226
|
from hatchet_sdk.clients.rest.models.v1_trigger_workflow_run_request import (
|
|
226
227
|
V1TriggerWorkflowRunRequest,
|
|
227
228
|
)
|
|
229
|
+
from hatchet_sdk.clients.rest.models.v1_update_filter_request import (
|
|
230
|
+
V1UpdateFilterRequest,
|
|
231
|
+
)
|
|
228
232
|
from hatchet_sdk.clients.rest.models.v1_workflow_run import V1WorkflowRun
|
|
229
233
|
from hatchet_sdk.clients.rest.models.v1_workflow_run_details import V1WorkflowRunDetails
|
|
230
234
|
from hatchet_sdk.clients.rest.models.v1_workflow_run_display_name import (
|