windmill-api 1.444.0__py3-none-any.whl → 1.445.1__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.

Files changed (49) hide show
  1. windmill_api/api/capture/list_captures.py +30 -0
  2. windmill_api/api/input_/get_input_history.py +15 -0
  3. windmill_api/api/nats_trigger/__init__.py +0 -0
  4. windmill_api/api/nats_trigger/create_nats_trigger.py +105 -0
  5. windmill_api/api/nats_trigger/delete_nats_trigger.py +101 -0
  6. windmill_api/api/nats_trigger/exists_nats_trigger.py +160 -0
  7. windmill_api/api/nats_trigger/get_nats_trigger.py +166 -0
  8. windmill_api/api/nats_trigger/list_nats_triggers.py +237 -0
  9. windmill_api/api/nats_trigger/set_nats_trigger_enabled.py +113 -0
  10. windmill_api/api/nats_trigger/update_nats_trigger.py +113 -0
  11. windmill_api/api/workspace/change_workspace_color.py +105 -0
  12. windmill_api/models/add_granular_acls_kind.py +1 -0
  13. windmill_api/models/capture_config_trigger_kind.py +1 -0
  14. windmill_api/models/capture_trigger_kind.py +1 -0
  15. windmill_api/models/change_workspace_color_json_body.py +58 -0
  16. windmill_api/models/create_nats_trigger_json_body.py +120 -0
  17. windmill_api/models/create_workspace.py +8 -0
  18. windmill_api/models/create_workspace_json_body.py +8 -0
  19. windmill_api/models/edit_nats_trigger.py +112 -0
  20. windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +1 -0
  21. windmill_api/models/get_granular_acls_kind.py +1 -0
  22. windmill_api/models/get_nats_trigger_response_200.py +196 -0
  23. windmill_api/models/get_nats_trigger_response_200_extra_perms.py +44 -0
  24. windmill_api/models/get_settings_response_200.py +8 -0
  25. windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
  26. windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
  27. windmill_api/models/get_used_triggers_response_200.py +7 -0
  28. windmill_api/models/list_captures_response_200_item_trigger_kind.py +1 -0
  29. windmill_api/models/list_captures_trigger_kind.py +1 -0
  30. windmill_api/models/list_nats_triggers_response_200_item.py +196 -0
  31. windmill_api/models/list_nats_triggers_response_200_item_extra_perms.py +44 -0
  32. windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +7 -0
  33. windmill_api/models/list_workspaces_as_super_admin_response_200_item.py +8 -0
  34. windmill_api/models/list_workspaces_response_200_item.py +8 -0
  35. windmill_api/models/nats_trigger.py +196 -0
  36. windmill_api/models/nats_trigger_extra_perms.py +44 -0
  37. windmill_api/models/new_nats_trigger.py +120 -0
  38. windmill_api/models/ping_capture_config_trigger_kind.py +1 -0
  39. windmill_api/models/remove_granular_acls_kind.py +1 -0
  40. windmill_api/models/set_capture_config_json_body_trigger_kind.py +1 -0
  41. windmill_api/models/set_nats_trigger_enabled_json_body.py +58 -0
  42. windmill_api/models/triggers_count.py +8 -0
  43. windmill_api/models/update_nats_trigger_json_body.py +112 -0
  44. windmill_api/models/user_workspace_list_workspaces_item.py +7 -0
  45. windmill_api/models/workspace.py +8 -0
  46. {windmill_api-1.444.0.dist-info → windmill_api-1.445.1.dist-info}/METADATA +1 -1
  47. {windmill_api-1.444.0.dist-info → windmill_api-1.445.1.dist-info}/RECORD +49 -28
  48. {windmill_api-1.444.0.dist-info → windmill_api-1.445.1.dist-info}/LICENSE +0 -0
  49. {windmill_api-1.444.0.dist-info → windmill_api-1.445.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,105 @@
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.change_workspace_color_json_body import ChangeWorkspaceColorJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ json_body: ChangeWorkspaceColorJsonBody,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ json_json_body = json_body.to_dict()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/workspaces/change_workspace_color".format(
24
+ workspace=workspace,
25
+ ),
26
+ "json": json_json_body,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
31
+ if client.raise_on_unexpected_status:
32
+ raise errors.UnexpectedStatus(response.status_code, response.content)
33
+ else:
34
+ return None
35
+
36
+
37
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
38
+ return Response(
39
+ status_code=HTTPStatus(response.status_code),
40
+ content=response.content,
41
+ headers=response.headers,
42
+ parsed=_parse_response(client=client, response=response),
43
+ )
44
+
45
+
46
+ def sync_detailed(
47
+ workspace: str,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ json_body: ChangeWorkspaceColorJsonBody,
51
+ ) -> Response[Any]:
52
+ """change workspace id
53
+
54
+ Args:
55
+ workspace (str):
56
+ json_body (ChangeWorkspaceColorJsonBody):
57
+
58
+ Raises:
59
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
61
+
62
+ Returns:
63
+ Response[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ json_body=json_body,
69
+ )
70
+
71
+ response = client.get_httpx_client().request(
72
+ **kwargs,
73
+ )
74
+
75
+ return _build_response(client=client, response=response)
76
+
77
+
78
+ async def asyncio_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ json_body: ChangeWorkspaceColorJsonBody,
83
+ ) -> Response[Any]:
84
+ """change workspace id
85
+
86
+ Args:
87
+ workspace (str):
88
+ json_body (ChangeWorkspaceColorJsonBody):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ workspace=workspace,
100
+ json_body=json_body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -8,6 +8,7 @@ class AddGranularAclsKind(str, Enum):
8
8
  GROUP = "group_"
9
9
  HTTP_TRIGGER = "http_trigger"
10
10
  KAFKA_TRIGGER = "kafka_trigger"
11
+ NATS_TRIGGER = "nats_trigger"
11
12
  RAW_APP = "raw_app"
12
13
  RESOURCE = "resource"
13
14
  SCHEDULE = "schedule"
@@ -5,6 +5,7 @@ class CaptureConfigTriggerKind(str, Enum):
5
5
  EMAIL = "email"
6
6
  HTTP = "http"
7
7
  KAFKA = "kafka"
8
+ NATS = "nats"
8
9
  WEBHOOK = "webhook"
9
10
  WEBSOCKET = "websocket"
10
11
 
@@ -5,6 +5,7 @@ class CaptureTriggerKind(str, Enum):
5
5
  EMAIL = "email"
6
6
  HTTP = "http"
7
7
  KAFKA = "kafka"
8
+ NATS = "nats"
8
9
  WEBHOOK = "webhook"
9
10
  WEBSOCKET = "websocket"
10
11
 
@@ -0,0 +1,58 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ChangeWorkspaceColorJsonBody")
9
+
10
+
11
+ @_attrs_define
12
+ class ChangeWorkspaceColorJsonBody:
13
+ """
14
+ Attributes:
15
+ color (Union[Unset, str]):
16
+ """
17
+
18
+ color: Union[Unset, str] = UNSET
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ color = self.color
23
+
24
+ field_dict: Dict[str, Any] = {}
25
+ field_dict.update(self.additional_properties)
26
+ field_dict.update({})
27
+ if color is not UNSET:
28
+ field_dict["color"] = color
29
+
30
+ return field_dict
31
+
32
+ @classmethod
33
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
34
+ d = src_dict.copy()
35
+ color = d.pop("color", UNSET)
36
+
37
+ change_workspace_color_json_body = cls(
38
+ color=color,
39
+ )
40
+
41
+ change_workspace_color_json_body.additional_properties = d
42
+ return change_workspace_color_json_body
43
+
44
+ @property
45
+ def additional_keys(self) -> List[str]:
46
+ return list(self.additional_properties.keys())
47
+
48
+ def __getitem__(self, key: str) -> Any:
49
+ return self.additional_properties[key]
50
+
51
+ def __setitem__(self, key: str, value: Any) -> None:
52
+ self.additional_properties[key] = value
53
+
54
+ def __delitem__(self, key: str) -> None:
55
+ del self.additional_properties[key]
56
+
57
+ def __contains__(self, key: str) -> bool:
58
+ return key in self.additional_properties
@@ -0,0 +1,120 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="CreateNatsTriggerJsonBody")
9
+
10
+
11
+ @_attrs_define
12
+ class CreateNatsTriggerJsonBody:
13
+ """
14
+ Attributes:
15
+ path (str):
16
+ script_path (str):
17
+ is_flow (bool):
18
+ nats_resource_path (str):
19
+ use_jetstream (bool):
20
+ subjects (List[str]):
21
+ stream_name (Union[Unset, str]):
22
+ consumer_name (Union[Unset, str]):
23
+ enabled (Union[Unset, bool]):
24
+ """
25
+
26
+ path: str
27
+ script_path: str
28
+ is_flow: bool
29
+ nats_resource_path: str
30
+ use_jetstream: bool
31
+ subjects: List[str]
32
+ stream_name: Union[Unset, str] = UNSET
33
+ consumer_name: Union[Unset, str] = UNSET
34
+ enabled: Union[Unset, bool] = UNSET
35
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
36
+
37
+ def to_dict(self) -> Dict[str, Any]:
38
+ path = self.path
39
+ script_path = self.script_path
40
+ is_flow = self.is_flow
41
+ nats_resource_path = self.nats_resource_path
42
+ use_jetstream = self.use_jetstream
43
+ subjects = self.subjects
44
+
45
+ stream_name = self.stream_name
46
+ consumer_name = self.consumer_name
47
+ enabled = self.enabled
48
+
49
+ field_dict: Dict[str, Any] = {}
50
+ field_dict.update(self.additional_properties)
51
+ field_dict.update(
52
+ {
53
+ "path": path,
54
+ "script_path": script_path,
55
+ "is_flow": is_flow,
56
+ "nats_resource_path": nats_resource_path,
57
+ "use_jetstream": use_jetstream,
58
+ "subjects": subjects,
59
+ }
60
+ )
61
+ if stream_name is not UNSET:
62
+ field_dict["stream_name"] = stream_name
63
+ if consumer_name is not UNSET:
64
+ field_dict["consumer_name"] = consumer_name
65
+ if enabled is not UNSET:
66
+ field_dict["enabled"] = enabled
67
+
68
+ return field_dict
69
+
70
+ @classmethod
71
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
72
+ d = src_dict.copy()
73
+ path = d.pop("path")
74
+
75
+ script_path = d.pop("script_path")
76
+
77
+ is_flow = d.pop("is_flow")
78
+
79
+ nats_resource_path = d.pop("nats_resource_path")
80
+
81
+ use_jetstream = d.pop("use_jetstream")
82
+
83
+ subjects = cast(List[str], d.pop("subjects"))
84
+
85
+ stream_name = d.pop("stream_name", UNSET)
86
+
87
+ consumer_name = d.pop("consumer_name", UNSET)
88
+
89
+ enabled = d.pop("enabled", UNSET)
90
+
91
+ create_nats_trigger_json_body = cls(
92
+ path=path,
93
+ script_path=script_path,
94
+ is_flow=is_flow,
95
+ nats_resource_path=nats_resource_path,
96
+ use_jetstream=use_jetstream,
97
+ subjects=subjects,
98
+ stream_name=stream_name,
99
+ consumer_name=consumer_name,
100
+ enabled=enabled,
101
+ )
102
+
103
+ create_nats_trigger_json_body.additional_properties = d
104
+ return create_nats_trigger_json_body
105
+
106
+ @property
107
+ def additional_keys(self) -> List[str]:
108
+ return list(self.additional_properties.keys())
109
+
110
+ def __getitem__(self, key: str) -> Any:
111
+ return self.additional_properties[key]
112
+
113
+ def __setitem__(self, key: str, value: Any) -> None:
114
+ self.additional_properties[key] = value
115
+
116
+ def __delitem__(self, key: str) -> None:
117
+ del self.additional_properties[key]
118
+
119
+ def __contains__(self, key: str) -> bool:
120
+ return key in self.additional_properties
@@ -15,17 +15,20 @@ class CreateWorkspace:
15
15
  id (str):
16
16
  name (str):
17
17
  username (Union[Unset, str]):
18
+ color (Union[Unset, str]):
18
19
  """
19
20
 
20
21
  id: str
21
22
  name: str
22
23
  username: Union[Unset, str] = UNSET
24
+ color: Union[Unset, str] = UNSET
23
25
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
26
 
25
27
  def to_dict(self) -> Dict[str, Any]:
26
28
  id = self.id
27
29
  name = self.name
28
30
  username = self.username
31
+ color = self.color
29
32
 
30
33
  field_dict: Dict[str, Any] = {}
31
34
  field_dict.update(self.additional_properties)
@@ -37,6 +40,8 @@ class CreateWorkspace:
37
40
  )
38
41
  if username is not UNSET:
39
42
  field_dict["username"] = username
43
+ if color is not UNSET:
44
+ field_dict["color"] = color
40
45
 
41
46
  return field_dict
42
47
 
@@ -49,10 +54,13 @@ class CreateWorkspace:
49
54
 
50
55
  username = d.pop("username", UNSET)
51
56
 
57
+ color = d.pop("color", UNSET)
58
+
52
59
  create_workspace = cls(
53
60
  id=id,
54
61
  name=name,
55
62
  username=username,
63
+ color=color,
56
64
  )
57
65
 
58
66
  create_workspace.additional_properties = d
@@ -15,17 +15,20 @@ class CreateWorkspaceJsonBody:
15
15
  id (str):
16
16
  name (str):
17
17
  username (Union[Unset, str]):
18
+ color (Union[Unset, str]):
18
19
  """
19
20
 
20
21
  id: str
21
22
  name: str
22
23
  username: Union[Unset, str] = UNSET
24
+ color: Union[Unset, str] = UNSET
23
25
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
24
26
 
25
27
  def to_dict(self) -> Dict[str, Any]:
26
28
  id = self.id
27
29
  name = self.name
28
30
  username = self.username
31
+ color = self.color
29
32
 
30
33
  field_dict: Dict[str, Any] = {}
31
34
  field_dict.update(self.additional_properties)
@@ -37,6 +40,8 @@ class CreateWorkspaceJsonBody:
37
40
  )
38
41
  if username is not UNSET:
39
42
  field_dict["username"] = username
43
+ if color is not UNSET:
44
+ field_dict["color"] = color
40
45
 
41
46
  return field_dict
42
47
 
@@ -49,10 +54,13 @@ class CreateWorkspaceJsonBody:
49
54
 
50
55
  username = d.pop("username", UNSET)
51
56
 
57
+ color = d.pop("color", UNSET)
58
+
52
59
  create_workspace_json_body = cls(
53
60
  id=id,
54
61
  name=name,
55
62
  username=username,
63
+ color=color,
56
64
  )
57
65
 
58
66
  create_workspace_json_body.additional_properties = d
@@ -0,0 +1,112 @@
1
+ from typing import Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="EditNatsTrigger")
9
+
10
+
11
+ @_attrs_define
12
+ class EditNatsTrigger:
13
+ """
14
+ Attributes:
15
+ nats_resource_path (str):
16
+ use_jetstream (bool):
17
+ subjects (List[str]):
18
+ path (str):
19
+ script_path (str):
20
+ is_flow (bool):
21
+ stream_name (Union[Unset, str]):
22
+ consumer_name (Union[Unset, str]):
23
+ """
24
+
25
+ nats_resource_path: str
26
+ use_jetstream: bool
27
+ subjects: List[str]
28
+ path: str
29
+ script_path: str
30
+ is_flow: bool
31
+ stream_name: Union[Unset, str] = UNSET
32
+ consumer_name: Union[Unset, str] = UNSET
33
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> Dict[str, Any]:
36
+ nats_resource_path = self.nats_resource_path
37
+ use_jetstream = self.use_jetstream
38
+ subjects = self.subjects
39
+
40
+ path = self.path
41
+ script_path = self.script_path
42
+ is_flow = self.is_flow
43
+ stream_name = self.stream_name
44
+ consumer_name = self.consumer_name
45
+
46
+ field_dict: Dict[str, Any] = {}
47
+ field_dict.update(self.additional_properties)
48
+ field_dict.update(
49
+ {
50
+ "nats_resource_path": nats_resource_path,
51
+ "use_jetstream": use_jetstream,
52
+ "subjects": subjects,
53
+ "path": path,
54
+ "script_path": script_path,
55
+ "is_flow": is_flow,
56
+ }
57
+ )
58
+ if stream_name is not UNSET:
59
+ field_dict["stream_name"] = stream_name
60
+ if consumer_name is not UNSET:
61
+ field_dict["consumer_name"] = consumer_name
62
+
63
+ return field_dict
64
+
65
+ @classmethod
66
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
67
+ d = src_dict.copy()
68
+ nats_resource_path = d.pop("nats_resource_path")
69
+
70
+ use_jetstream = d.pop("use_jetstream")
71
+
72
+ subjects = cast(List[str], d.pop("subjects"))
73
+
74
+ path = d.pop("path")
75
+
76
+ script_path = d.pop("script_path")
77
+
78
+ is_flow = d.pop("is_flow")
79
+
80
+ stream_name = d.pop("stream_name", UNSET)
81
+
82
+ consumer_name = d.pop("consumer_name", UNSET)
83
+
84
+ edit_nats_trigger = cls(
85
+ nats_resource_path=nats_resource_path,
86
+ use_jetstream=use_jetstream,
87
+ subjects=subjects,
88
+ path=path,
89
+ script_path=script_path,
90
+ is_flow=is_flow,
91
+ stream_name=stream_name,
92
+ consumer_name=consumer_name,
93
+ )
94
+
95
+ edit_nats_trigger.additional_properties = d
96
+ return edit_nats_trigger
97
+
98
+ @property
99
+ def additional_keys(self) -> List[str]:
100
+ return list(self.additional_properties.keys())
101
+
102
+ def __getitem__(self, key: str) -> Any:
103
+ return self.additional_properties[key]
104
+
105
+ def __setitem__(self, key: str, value: Any) -> None:
106
+ self.additional_properties[key] = value
107
+
108
+ def __delitem__(self, key: str) -> None:
109
+ del self.additional_properties[key]
110
+
111
+ def __contains__(self, key: str) -> bool:
112
+ return key in self.additional_properties
@@ -5,6 +5,7 @@ class GetCaptureConfigsResponse200ItemTriggerKind(str, Enum):
5
5
  EMAIL = "email"
6
6
  HTTP = "http"
7
7
  KAFKA = "kafka"
8
+ NATS = "nats"
8
9
  WEBHOOK = "webhook"
9
10
  WEBSOCKET = "websocket"
10
11
 
@@ -8,6 +8,7 @@ class GetGranularAclsKind(str, Enum):
8
8
  GROUP = "group_"
9
9
  HTTP_TRIGGER = "http_trigger"
10
10
  KAFKA_TRIGGER = "kafka_trigger"
11
+ NATS_TRIGGER = "nats_trigger"
11
12
  RAW_APP = "raw_app"
12
13
  RESOURCE = "resource"
13
14
  SCHEDULE = "schedule"