hatchet-sdk 1.20.0__py3-none-any.whl → 1.20.2__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/clients/rest/__init__.py +11 -3
- hatchet_sdk/clients/rest/api/task_api.py +27 -0
- hatchet_sdk/clients/rest/api/tenant_api.py +345 -0
- hatchet_sdk/clients/rest/api/user_api.py +9 -0
- hatchet_sdk/clients/rest/api/webhook_api.py +323 -8
- hatchet_sdk/clients/rest/api/workflow_api.py +327 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +408 -0
- hatchet_sdk/clients/rest/configuration.py +8 -0
- hatchet_sdk/clients/rest/models/__init__.py +11 -3
- hatchet_sdk/clients/rest/models/create_tenant_request.py +19 -1
- hatchet_sdk/clients/rest/models/registered_workflow.py +86 -0
- hatchet_sdk/clients/rest/models/tenant.py +6 -0
- hatchet_sdk/clients/rest/models/tenant_environment.py +38 -0
- hatchet_sdk/clients/rest/models/update_cron_workflow_trigger_request.py +83 -0
- hatchet_sdk/clients/rest/models/update_tenant_member_request.py +85 -0
- hatchet_sdk/clients/rest/models/v1_filter.py +8 -1
- hatchet_sdk/clients/rest/models/v1_update_webhook_request.py +86 -0
- hatchet_sdk/clients/rest/models/v1_webhook_source_name.py +2 -0
- hatchet_sdk/clients/rest/models/worker.py +22 -0
- hatchet_sdk/features/runs.py +224 -0
- hatchet_sdk/utils/iterables.py +9 -0
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/METADATA +4 -6
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/RECORD +25 -19
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.20.0.dist-info → hatchet_sdk-1.20.2.dist-info}/entry_points.txt +0 -0
|
@@ -22,11 +22,11 @@ from hatchet_sdk.clients.rest.api_response import ApiResponse
|
|
|
22
22
|
from hatchet_sdk.clients.rest.models.v1_create_webhook_request import (
|
|
23
23
|
V1CreateWebhookRequest,
|
|
24
24
|
)
|
|
25
|
+
from hatchet_sdk.clients.rest.models.v1_update_webhook_request import (
|
|
26
|
+
V1UpdateWebhookRequest,
|
|
27
|
+
)
|
|
25
28
|
from hatchet_sdk.clients.rest.models.v1_webhook import V1Webhook
|
|
26
29
|
from hatchet_sdk.clients.rest.models.v1_webhook_list import V1WebhookList
|
|
27
|
-
from hatchet_sdk.clients.rest.models.v1_webhook_receive200_response import (
|
|
28
|
-
V1WebhookReceive200Response,
|
|
29
|
-
)
|
|
30
30
|
from hatchet_sdk.clients.rest.models.v1_webhook_source_name import V1WebhookSourceName
|
|
31
31
|
from hatchet_sdk.clients.rest.rest import RESTResponseType
|
|
32
32
|
|
|
@@ -1293,7 +1293,7 @@ class WebhookApi:
|
|
|
1293
1293
|
_content_type: Optional[StrictStr] = None,
|
|
1294
1294
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1295
1295
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1296
|
-
) ->
|
|
1296
|
+
) -> Dict[str, object]:
|
|
1297
1297
|
"""Post a webhook message
|
|
1298
1298
|
|
|
1299
1299
|
Post an incoming webhook message
|
|
@@ -1334,7 +1334,7 @@ class WebhookApi:
|
|
|
1334
1334
|
)
|
|
1335
1335
|
|
|
1336
1336
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1337
|
-
"200": "
|
|
1337
|
+
"200": "Dict[str, object]",
|
|
1338
1338
|
"400": "APIErrors",
|
|
1339
1339
|
"403": "APIErrors",
|
|
1340
1340
|
}
|
|
@@ -1368,7 +1368,7 @@ class WebhookApi:
|
|
|
1368
1368
|
_content_type: Optional[StrictStr] = None,
|
|
1369
1369
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1370
1370
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1371
|
-
) -> ApiResponse[
|
|
1371
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1372
1372
|
"""Post a webhook message
|
|
1373
1373
|
|
|
1374
1374
|
Post an incoming webhook message
|
|
@@ -1409,7 +1409,7 @@ class WebhookApi:
|
|
|
1409
1409
|
)
|
|
1410
1410
|
|
|
1411
1411
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1412
|
-
"200": "
|
|
1412
|
+
"200": "Dict[str, object]",
|
|
1413
1413
|
"400": "APIErrors",
|
|
1414
1414
|
"403": "APIErrors",
|
|
1415
1415
|
}
|
|
@@ -1484,7 +1484,7 @@ class WebhookApi:
|
|
|
1484
1484
|
)
|
|
1485
1485
|
|
|
1486
1486
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1487
|
-
"200": "
|
|
1487
|
+
"200": "Dict[str, object]",
|
|
1488
1488
|
"400": "APIErrors",
|
|
1489
1489
|
"403": "APIErrors",
|
|
1490
1490
|
}
|
|
@@ -1549,3 +1549,318 @@ class WebhookApi:
|
|
|
1549
1549
|
_host=_host,
|
|
1550
1550
|
_request_auth=_request_auth,
|
|
1551
1551
|
)
|
|
1552
|
+
|
|
1553
|
+
@validate_call
|
|
1554
|
+
def v1_webhook_update(
|
|
1555
|
+
self,
|
|
1556
|
+
tenant: Annotated[
|
|
1557
|
+
str,
|
|
1558
|
+
Field(
|
|
1559
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1560
|
+
),
|
|
1561
|
+
],
|
|
1562
|
+
v1_webhook: Annotated[StrictStr, Field(description="The webhook name")],
|
|
1563
|
+
v1_update_webhook_request: Annotated[
|
|
1564
|
+
V1UpdateWebhookRequest,
|
|
1565
|
+
Field(description="The input to the webhook creation"),
|
|
1566
|
+
],
|
|
1567
|
+
_request_timeout: Union[
|
|
1568
|
+
None,
|
|
1569
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1570
|
+
Tuple[
|
|
1571
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1572
|
+
],
|
|
1573
|
+
] = None,
|
|
1574
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1575
|
+
_content_type: Optional[StrictStr] = None,
|
|
1576
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1577
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1578
|
+
) -> V1Webhook:
|
|
1579
|
+
"""Update a webhook
|
|
1580
|
+
|
|
1581
|
+
Update a webhook
|
|
1582
|
+
|
|
1583
|
+
:param tenant: The tenant id (required)
|
|
1584
|
+
:type tenant: str
|
|
1585
|
+
:param v1_webhook: The webhook name (required)
|
|
1586
|
+
:type v1_webhook: str
|
|
1587
|
+
:param v1_update_webhook_request: The input to the webhook creation (required)
|
|
1588
|
+
:type v1_update_webhook_request: V1UpdateWebhookRequest
|
|
1589
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1590
|
+
number provided, it will be total request
|
|
1591
|
+
timeout. It can also be a pair (tuple) of
|
|
1592
|
+
(connection, read) timeouts.
|
|
1593
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1594
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1595
|
+
request; this effectively ignores the
|
|
1596
|
+
authentication in the spec for a single request.
|
|
1597
|
+
:type _request_auth: dict, optional
|
|
1598
|
+
:param _content_type: force content-type for the request.
|
|
1599
|
+
:type _content_type: str, Optional
|
|
1600
|
+
:param _headers: set to override the headers for a single
|
|
1601
|
+
request; this effectively ignores the headers
|
|
1602
|
+
in the spec for a single request.
|
|
1603
|
+
:type _headers: dict, optional
|
|
1604
|
+
:param _host_index: set to override the host_index for a single
|
|
1605
|
+
request; this effectively ignores the host_index
|
|
1606
|
+
in the spec for a single request.
|
|
1607
|
+
:type _host_index: int, optional
|
|
1608
|
+
:return: Returns the result object.
|
|
1609
|
+
""" # noqa: E501
|
|
1610
|
+
|
|
1611
|
+
_param = self._v1_webhook_update_serialize(
|
|
1612
|
+
tenant=tenant,
|
|
1613
|
+
v1_webhook=v1_webhook,
|
|
1614
|
+
v1_update_webhook_request=v1_update_webhook_request,
|
|
1615
|
+
_request_auth=_request_auth,
|
|
1616
|
+
_content_type=_content_type,
|
|
1617
|
+
_headers=_headers,
|
|
1618
|
+
_host_index=_host_index,
|
|
1619
|
+
)
|
|
1620
|
+
|
|
1621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1622
|
+
"200": "V1Webhook",
|
|
1623
|
+
"400": "APIErrors",
|
|
1624
|
+
"403": "APIErrors",
|
|
1625
|
+
"404": "APIErrors",
|
|
1626
|
+
}
|
|
1627
|
+
response_data = self.api_client.call_api(
|
|
1628
|
+
*_param, _request_timeout=_request_timeout
|
|
1629
|
+
)
|
|
1630
|
+
response_data.read()
|
|
1631
|
+
return self.api_client.response_deserialize(
|
|
1632
|
+
response_data=response_data,
|
|
1633
|
+
response_types_map=_response_types_map,
|
|
1634
|
+
).data
|
|
1635
|
+
|
|
1636
|
+
@validate_call
|
|
1637
|
+
def v1_webhook_update_with_http_info(
|
|
1638
|
+
self,
|
|
1639
|
+
tenant: Annotated[
|
|
1640
|
+
str,
|
|
1641
|
+
Field(
|
|
1642
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1643
|
+
),
|
|
1644
|
+
],
|
|
1645
|
+
v1_webhook: Annotated[StrictStr, Field(description="The webhook name")],
|
|
1646
|
+
v1_update_webhook_request: Annotated[
|
|
1647
|
+
V1UpdateWebhookRequest,
|
|
1648
|
+
Field(description="The input to the webhook creation"),
|
|
1649
|
+
],
|
|
1650
|
+
_request_timeout: Union[
|
|
1651
|
+
None,
|
|
1652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1653
|
+
Tuple[
|
|
1654
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1655
|
+
],
|
|
1656
|
+
] = None,
|
|
1657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1658
|
+
_content_type: Optional[StrictStr] = None,
|
|
1659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1661
|
+
) -> ApiResponse[V1Webhook]:
|
|
1662
|
+
"""Update a webhook
|
|
1663
|
+
|
|
1664
|
+
Update a webhook
|
|
1665
|
+
|
|
1666
|
+
:param tenant: The tenant id (required)
|
|
1667
|
+
:type tenant: str
|
|
1668
|
+
:param v1_webhook: The webhook name (required)
|
|
1669
|
+
:type v1_webhook: str
|
|
1670
|
+
:param v1_update_webhook_request: The input to the webhook creation (required)
|
|
1671
|
+
:type v1_update_webhook_request: V1UpdateWebhookRequest
|
|
1672
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1673
|
+
number provided, it will be total request
|
|
1674
|
+
timeout. It can also be a pair (tuple) of
|
|
1675
|
+
(connection, read) timeouts.
|
|
1676
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1677
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1678
|
+
request; this effectively ignores the
|
|
1679
|
+
authentication in the spec for a single request.
|
|
1680
|
+
:type _request_auth: dict, optional
|
|
1681
|
+
:param _content_type: force content-type for the request.
|
|
1682
|
+
:type _content_type: str, Optional
|
|
1683
|
+
:param _headers: set to override the headers for a single
|
|
1684
|
+
request; this effectively ignores the headers
|
|
1685
|
+
in the spec for a single request.
|
|
1686
|
+
:type _headers: dict, optional
|
|
1687
|
+
:param _host_index: set to override the host_index for a single
|
|
1688
|
+
request; this effectively ignores the host_index
|
|
1689
|
+
in the spec for a single request.
|
|
1690
|
+
:type _host_index: int, optional
|
|
1691
|
+
:return: Returns the result object.
|
|
1692
|
+
""" # noqa: E501
|
|
1693
|
+
|
|
1694
|
+
_param = self._v1_webhook_update_serialize(
|
|
1695
|
+
tenant=tenant,
|
|
1696
|
+
v1_webhook=v1_webhook,
|
|
1697
|
+
v1_update_webhook_request=v1_update_webhook_request,
|
|
1698
|
+
_request_auth=_request_auth,
|
|
1699
|
+
_content_type=_content_type,
|
|
1700
|
+
_headers=_headers,
|
|
1701
|
+
_host_index=_host_index,
|
|
1702
|
+
)
|
|
1703
|
+
|
|
1704
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1705
|
+
"200": "V1Webhook",
|
|
1706
|
+
"400": "APIErrors",
|
|
1707
|
+
"403": "APIErrors",
|
|
1708
|
+
"404": "APIErrors",
|
|
1709
|
+
}
|
|
1710
|
+
response_data = self.api_client.call_api(
|
|
1711
|
+
*_param, _request_timeout=_request_timeout
|
|
1712
|
+
)
|
|
1713
|
+
response_data.read()
|
|
1714
|
+
return self.api_client.response_deserialize(
|
|
1715
|
+
response_data=response_data,
|
|
1716
|
+
response_types_map=_response_types_map,
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1719
|
+
@validate_call
|
|
1720
|
+
def v1_webhook_update_without_preload_content(
|
|
1721
|
+
self,
|
|
1722
|
+
tenant: Annotated[
|
|
1723
|
+
str,
|
|
1724
|
+
Field(
|
|
1725
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1726
|
+
),
|
|
1727
|
+
],
|
|
1728
|
+
v1_webhook: Annotated[StrictStr, Field(description="The webhook name")],
|
|
1729
|
+
v1_update_webhook_request: Annotated[
|
|
1730
|
+
V1UpdateWebhookRequest,
|
|
1731
|
+
Field(description="The input to the webhook creation"),
|
|
1732
|
+
],
|
|
1733
|
+
_request_timeout: Union[
|
|
1734
|
+
None,
|
|
1735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1736
|
+
Tuple[
|
|
1737
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1738
|
+
],
|
|
1739
|
+
] = None,
|
|
1740
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1741
|
+
_content_type: Optional[StrictStr] = None,
|
|
1742
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1743
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1744
|
+
) -> RESTResponseType:
|
|
1745
|
+
"""Update a webhook
|
|
1746
|
+
|
|
1747
|
+
Update a webhook
|
|
1748
|
+
|
|
1749
|
+
:param tenant: The tenant id (required)
|
|
1750
|
+
:type tenant: str
|
|
1751
|
+
:param v1_webhook: The webhook name (required)
|
|
1752
|
+
:type v1_webhook: str
|
|
1753
|
+
:param v1_update_webhook_request: The input to the webhook creation (required)
|
|
1754
|
+
:type v1_update_webhook_request: V1UpdateWebhookRequest
|
|
1755
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1756
|
+
number provided, it will be total request
|
|
1757
|
+
timeout. It can also be a pair (tuple) of
|
|
1758
|
+
(connection, read) timeouts.
|
|
1759
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1760
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1761
|
+
request; this effectively ignores the
|
|
1762
|
+
authentication in the spec for a single request.
|
|
1763
|
+
:type _request_auth: dict, optional
|
|
1764
|
+
:param _content_type: force content-type for the request.
|
|
1765
|
+
:type _content_type: str, Optional
|
|
1766
|
+
:param _headers: set to override the headers for a single
|
|
1767
|
+
request; this effectively ignores the headers
|
|
1768
|
+
in the spec for a single request.
|
|
1769
|
+
:type _headers: dict, optional
|
|
1770
|
+
:param _host_index: set to override the host_index for a single
|
|
1771
|
+
request; this effectively ignores the host_index
|
|
1772
|
+
in the spec for a single request.
|
|
1773
|
+
:type _host_index: int, optional
|
|
1774
|
+
:return: Returns the result object.
|
|
1775
|
+
""" # noqa: E501
|
|
1776
|
+
|
|
1777
|
+
_param = self._v1_webhook_update_serialize(
|
|
1778
|
+
tenant=tenant,
|
|
1779
|
+
v1_webhook=v1_webhook,
|
|
1780
|
+
v1_update_webhook_request=v1_update_webhook_request,
|
|
1781
|
+
_request_auth=_request_auth,
|
|
1782
|
+
_content_type=_content_type,
|
|
1783
|
+
_headers=_headers,
|
|
1784
|
+
_host_index=_host_index,
|
|
1785
|
+
)
|
|
1786
|
+
|
|
1787
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1788
|
+
"200": "V1Webhook",
|
|
1789
|
+
"400": "APIErrors",
|
|
1790
|
+
"403": "APIErrors",
|
|
1791
|
+
"404": "APIErrors",
|
|
1792
|
+
}
|
|
1793
|
+
response_data = self.api_client.call_api(
|
|
1794
|
+
*_param, _request_timeout=_request_timeout
|
|
1795
|
+
)
|
|
1796
|
+
return response_data.response
|
|
1797
|
+
|
|
1798
|
+
def _v1_webhook_update_serialize(
|
|
1799
|
+
self,
|
|
1800
|
+
tenant,
|
|
1801
|
+
v1_webhook,
|
|
1802
|
+
v1_update_webhook_request,
|
|
1803
|
+
_request_auth,
|
|
1804
|
+
_content_type,
|
|
1805
|
+
_headers,
|
|
1806
|
+
_host_index,
|
|
1807
|
+
) -> RequestSerialized:
|
|
1808
|
+
|
|
1809
|
+
_host = None
|
|
1810
|
+
|
|
1811
|
+
_collection_formats: Dict[str, str] = {}
|
|
1812
|
+
|
|
1813
|
+
_path_params: Dict[str, str] = {}
|
|
1814
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1815
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1816
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1817
|
+
_files: Dict[
|
|
1818
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1819
|
+
] = {}
|
|
1820
|
+
_body_params: Optional[bytes] = None
|
|
1821
|
+
|
|
1822
|
+
# process the path parameters
|
|
1823
|
+
if tenant is not None:
|
|
1824
|
+
_path_params["tenant"] = tenant
|
|
1825
|
+
if v1_webhook is not None:
|
|
1826
|
+
_path_params["v1-webhook"] = v1_webhook
|
|
1827
|
+
# process the query parameters
|
|
1828
|
+
# process the header parameters
|
|
1829
|
+
# process the form parameters
|
|
1830
|
+
# process the body parameter
|
|
1831
|
+
if v1_update_webhook_request is not None:
|
|
1832
|
+
_body_params = v1_update_webhook_request
|
|
1833
|
+
|
|
1834
|
+
# set the HTTP header `Accept`
|
|
1835
|
+
if "Accept" not in _header_params:
|
|
1836
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1837
|
+
["application/json"]
|
|
1838
|
+
)
|
|
1839
|
+
|
|
1840
|
+
# set the HTTP header `Content-Type`
|
|
1841
|
+
if _content_type:
|
|
1842
|
+
_header_params["Content-Type"] = _content_type
|
|
1843
|
+
else:
|
|
1844
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1845
|
+
["application/json"]
|
|
1846
|
+
)
|
|
1847
|
+
if _default_content_type is not None:
|
|
1848
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1849
|
+
|
|
1850
|
+
# authentication setting
|
|
1851
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1852
|
+
|
|
1853
|
+
return self.api_client.param_serialize(
|
|
1854
|
+
method="PATCH",
|
|
1855
|
+
resource_path="/api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook}",
|
|
1856
|
+
path_params=_path_params,
|
|
1857
|
+
query_params=_query_params,
|
|
1858
|
+
header_params=_header_params,
|
|
1859
|
+
body=_body_params,
|
|
1860
|
+
post_params=_form_params,
|
|
1861
|
+
files=_files,
|
|
1862
|
+
auth_settings=_auth_settings,
|
|
1863
|
+
collection_formats=_collection_formats,
|
|
1864
|
+
_host=_host,
|
|
1865
|
+
_request_auth=_request_auth,
|
|
1866
|
+
)
|