windmill-api 1.390.1__py3-none-any.whl → 1.391.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 windmill-api might be problematic. Click here for more details.

@@ -0,0 +1,96 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.connect_slack_callback_instance_json_body import ConnectSlackCallbackInstanceJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ json_body: ConnectSlackCallbackInstanceJsonBody,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ json_json_body = json_body.to_dict()
19
+
20
+ return {
21
+ "method": "post",
22
+ "url": "/oauth/connect_slack_callback",
23
+ "json": json_json_body,
24
+ }
25
+
26
+
27
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
28
+ if client.raise_on_unexpected_status:
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+ else:
31
+ return None
32
+
33
+
34
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
35
+ return Response(
36
+ status_code=HTTPStatus(response.status_code),
37
+ content=response.content,
38
+ headers=response.headers,
39
+ parsed=_parse_response(client=client, response=response),
40
+ )
41
+
42
+
43
+ def sync_detailed(
44
+ *,
45
+ client: Union[AuthenticatedClient, Client],
46
+ json_body: ConnectSlackCallbackInstanceJsonBody,
47
+ ) -> Response[Any]:
48
+ """connect slack callback instance
49
+
50
+ Args:
51
+ json_body (ConnectSlackCallbackInstanceJsonBody):
52
+
53
+ Raises:
54
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
55
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
56
+
57
+ Returns:
58
+ Response[Any]
59
+ """
60
+
61
+ kwargs = _get_kwargs(
62
+ json_body=json_body,
63
+ )
64
+
65
+ response = client.get_httpx_client().request(
66
+ **kwargs,
67
+ )
68
+
69
+ return _build_response(client=client, response=response)
70
+
71
+
72
+ async def asyncio_detailed(
73
+ *,
74
+ client: Union[AuthenticatedClient, Client],
75
+ json_body: ConnectSlackCallbackInstanceJsonBody,
76
+ ) -> Response[Any]:
77
+ """connect slack callback instance
78
+
79
+ Args:
80
+ json_body (ConnectSlackCallbackInstanceJsonBody):
81
+
82
+ Raises:
83
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
84
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
85
+
86
+ Returns:
87
+ Response[Any]
88
+ """
89
+
90
+ kwargs = _get_kwargs(
91
+ json_body=json_body,
92
+ )
93
+
94
+ response = await client.get_async_httpx_client().request(**kwargs)
95
+
96
+ return _build_response(client=client, response=response)
@@ -0,0 +1,65 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="ConnectSlackCallbackInstanceJsonBody")
7
+
8
+
9
+ @_attrs_define
10
+ class ConnectSlackCallbackInstanceJsonBody:
11
+ """
12
+ Attributes:
13
+ code (str):
14
+ state (str):
15
+ """
16
+
17
+ code: str
18
+ state: str
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ code = self.code
23
+ state = self.state
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "code": code,
30
+ "state": state,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ code = d.pop("code")
40
+
41
+ state = d.pop("state")
42
+
43
+ connect_slack_callback_instance_json_body = cls(
44
+ code=code,
45
+ state=state,
46
+ )
47
+
48
+ connect_slack_callback_instance_json_body.additional_properties = d
49
+ return connect_slack_callback_instance_json_body
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: windmill-api
3
- Version: 1.390.1
3
+ Version: 1.391.0
4
4
  Summary: A client library for accessing Windmill API
5
5
  License: Apache-2.0
6
6
  Author: Ruben Fiszel
@@ -172,6 +172,7 @@ windmill_api/api/metrics/get_job_metrics.py,sha256=0tXzNiB-wcYVHTQp3fGylKmr4_jCB
172
172
  windmill_api/api/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
173
  windmill_api/api/oauth/connect_callback.py,sha256=12cfwUWge6lMnTuVv9sxmk9oYpal4INyn-uN8EAURm4,4542
174
174
  windmill_api/api/oauth/connect_slack_callback.py,sha256=7yr6_qXTGVSkRD3ZSdmdbkTLz3MEZrMBSpbCKmvGk4Q,2773
175
+ windmill_api/api/oauth/connect_slack_callback_instance.py,sha256=3Sk1OuX9HJZsHKoQVnFcUi3tnOPG5LshUFVNiU0eHLY,2615
175
176
  windmill_api/api/oauth/create_account.py,sha256=6wN43bsHrXTmuHvm8VcJocutAsDpwXmFxRcyeYnu5tM,2711
176
177
  windmill_api/api/oauth/disconnect_account.py,sha256=hmfYyMJ1BaLEJ0yn2H41Jq4-8XU7BAxj9Rbzxa-cbx8,2424
177
178
  windmill_api/api/oauth/disconnect_slack.py,sha256=tG_hs15E6uPq_fCrp88NyFXTkwPYWIIiwQcSaKBw8og,2297
@@ -532,6 +533,7 @@ windmill_api/models/config.py,sha256=Tl07rzRCA8Z4gSnCaK4YU8wriDvSCv3iUDpdutvYB2o
532
533
  windmill_api/models/config_config.py,sha256=0-Z932i9VEzxsgMxZHFfA02X1AHxax-I3p9A8KBVldo,1215
533
534
  windmill_api/models/connect_callback_json_body.py,sha256=85RFBg7JqD8NbZOOmq-NlCsf26pLopNJ6Vy7IOUXTr8,1635
534
535
  windmill_api/models/connect_callback_response_200.py,sha256=1QPmLSSR9_YsbgOlf6Aum7WzP8gV84215g5ZOi1NXKo,2596
536
+ windmill_api/models/connect_slack_callback_instance_json_body.py,sha256=c0Rnk7V8qF2Dr471eWnWZe41d5SXnhZEKpbJH1WkpYM,1706
535
537
  windmill_api/models/connect_slack_callback_json_body.py,sha256=AopjAfEL44s4fFJeZFrhYznF-9k_Fo61T7yF4F6KeJw,1663
536
538
  windmill_api/models/contextual_variable.py,sha256=CYU0_ENlCZN9aD2hztezo1o0kkVCH-RYD46FIeWigeI,2010
537
539
  windmill_api/models/create_account_json_body.py,sha256=42H2HXa-7_1IcT72OXaiF8feh3R60_NYoGet8735Di8,2058
@@ -2619,7 +2621,7 @@ windmill_api/models/workspace_git_sync_settings_repositories_item_exclude_types_
2619
2621
  windmill_api/models/workspace_invite.py,sha256=HnAJWGv5LwxWkz1T3fhgHKIccO7RFC1lixwUUXG6CXs,2037
2620
2622
  windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
2621
2623
  windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
2622
- windmill_api-1.390.1.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
2623
- windmill_api-1.390.1.dist-info/METADATA,sha256=iERf-l71JUGOf85TwhCBeuyyAkuZ_j7CNAotPZ3QHG8,5023
2624
- windmill_api-1.390.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
2625
- windmill_api-1.390.1.dist-info/RECORD,,
2624
+ windmill_api-1.391.0.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
2625
+ windmill_api-1.391.0.dist-info/METADATA,sha256=WneM2Rhaf0wpkq0HPTrvrC5-lq_TGIkMSBaL8HMpsIc,5023
2626
+ windmill_api-1.391.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
2627
+ windmill_api-1.391.0.dist-info/RECORD,,