windmill-api 1.409.4__py3-none-any.whl → 1.410.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 (44) hide show
  1. windmill_api/api/app/get_app_latest_version.py +166 -0
  2. windmill_api/api/flow/get_flow_latest_version.py +166 -0
  3. windmill_api/api/script/get_script_latest_version.py +166 -0
  4. windmill_api/api/websocket_trigger/__init__.py +0 -0
  5. windmill_api/api/websocket_trigger/create_websocket_trigger.py +105 -0
  6. windmill_api/api/websocket_trigger/delete_websocket_trigger.py +101 -0
  7. windmill_api/api/{http_trigger/used.py → websocket_trigger/exists_websocket_trigger.py} +19 -5
  8. windmill_api/api/websocket_trigger/get_websocket_trigger.py +166 -0
  9. windmill_api/api/websocket_trigger/list_websocket_triggers.py +237 -0
  10. windmill_api/api/websocket_trigger/set_websocket_trigger_enabled.py +113 -0
  11. windmill_api/api/websocket_trigger/update_websocket_trigger.py +113 -0
  12. windmill_api/api/workspace/get_used_triggers.py +152 -0
  13. windmill_api/models/add_granular_acls_kind.py +1 -0
  14. windmill_api/models/create_websocket_trigger_json_body.py +112 -0
  15. windmill_api/models/create_websocket_trigger_json_body_filters_item.py +65 -0
  16. windmill_api/models/edit_websocket_trigger.py +101 -0
  17. windmill_api/models/edit_websocket_trigger_filters_item.py +65 -0
  18. windmill_api/models/get_app_latest_version_response_200.py +68 -0
  19. windmill_api/models/get_flow_latest_version_response_200.py +78 -0
  20. windmill_api/models/get_granular_acls_kind.py +1 -0
  21. windmill_api/models/get_script_latest_version_response_200.py +68 -0
  22. windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
  23. windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
  24. windmill_api/models/get_used_triggers_response_200.py +65 -0
  25. windmill_api/models/get_websocket_trigger_response_200.py +184 -0
  26. windmill_api/models/get_websocket_trigger_response_200_extra_perms.py +44 -0
  27. windmill_api/models/get_websocket_trigger_response_200_filters_item.py +65 -0
  28. windmill_api/models/list_websocket_triggers_response_200_item.py +192 -0
  29. windmill_api/models/list_websocket_triggers_response_200_item_extra_perms.py +44 -0
  30. windmill_api/models/list_websocket_triggers_response_200_item_filters_item.py +65 -0
  31. windmill_api/models/new_websocket_trigger.py +112 -0
  32. windmill_api/models/new_websocket_trigger_filters_item.py +65 -0
  33. windmill_api/models/remove_granular_acls_kind.py +1 -0
  34. windmill_api/models/set_websocket_trigger_enabled_json_body.py +58 -0
  35. windmill_api/models/triggers_count.py +8 -0
  36. windmill_api/models/update_websocket_trigger_json_body.py +101 -0
  37. windmill_api/models/update_websocket_trigger_json_body_filters_item.py +65 -0
  38. windmill_api/models/websocket_trigger.py +184 -0
  39. windmill_api/models/websocket_trigger_extra_perms.py +44 -0
  40. windmill_api/models/websocket_trigger_filters_item.py +65 -0
  41. {windmill_api-1.409.4.dist-info → windmill_api-1.410.1.dist-info}/METADATA +1 -1
  42. {windmill_api-1.409.4.dist-info → windmill_api-1.410.1.dist-info}/RECORD +44 -11
  43. {windmill_api-1.409.4.dist-info → windmill_api-1.410.1.dist-info}/LICENSE +0 -0
  44. {windmill_api-1.409.4.dist-info → windmill_api-1.410.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,192 @@
1
+ import datetime
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+ from dateutil.parser import isoparse
7
+
8
+ from ..types import UNSET, Unset
9
+
10
+ if TYPE_CHECKING:
11
+ from ..models.list_websocket_triggers_response_200_item_extra_perms import (
12
+ ListWebsocketTriggersResponse200ItemExtraPerms,
13
+ )
14
+ from ..models.list_websocket_triggers_response_200_item_filters_item import (
15
+ ListWebsocketTriggersResponse200ItemFiltersItem,
16
+ )
17
+
18
+
19
+ T = TypeVar("T", bound="ListWebsocketTriggersResponse200Item")
20
+
21
+
22
+ @_attrs_define
23
+ class ListWebsocketTriggersResponse200Item:
24
+ """
25
+ Attributes:
26
+ path (str):
27
+ edited_by (str):
28
+ edited_at (datetime.datetime):
29
+ script_path (str):
30
+ url (str):
31
+ is_flow (bool):
32
+ extra_perms (ListWebsocketTriggersResponse200ItemExtraPerms):
33
+ email (str):
34
+ workspace_id (str):
35
+ enabled (bool):
36
+ filters (List['ListWebsocketTriggersResponse200ItemFiltersItem']):
37
+ server_id (Union[Unset, str]):
38
+ last_server_ping (Union[Unset, datetime.datetime]):
39
+ error (Union[Unset, str]):
40
+ """
41
+
42
+ path: str
43
+ edited_by: str
44
+ edited_at: datetime.datetime
45
+ script_path: str
46
+ url: str
47
+ is_flow: bool
48
+ extra_perms: "ListWebsocketTriggersResponse200ItemExtraPerms"
49
+ email: str
50
+ workspace_id: str
51
+ enabled: bool
52
+ filters: List["ListWebsocketTriggersResponse200ItemFiltersItem"]
53
+ server_id: Union[Unset, str] = UNSET
54
+ last_server_ping: Union[Unset, datetime.datetime] = UNSET
55
+ error: Union[Unset, str] = UNSET
56
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ path = self.path
60
+ edited_by = self.edited_by
61
+ edited_at = self.edited_at.isoformat()
62
+
63
+ script_path = self.script_path
64
+ url = self.url
65
+ is_flow = self.is_flow
66
+ extra_perms = self.extra_perms.to_dict()
67
+
68
+ email = self.email
69
+ workspace_id = self.workspace_id
70
+ enabled = self.enabled
71
+ filters = []
72
+ for filters_item_data in self.filters:
73
+ filters_item = filters_item_data.to_dict()
74
+
75
+ filters.append(filters_item)
76
+
77
+ server_id = self.server_id
78
+ last_server_ping: Union[Unset, str] = UNSET
79
+ if not isinstance(self.last_server_ping, Unset):
80
+ last_server_ping = self.last_server_ping.isoformat()
81
+
82
+ error = self.error
83
+
84
+ field_dict: Dict[str, Any] = {}
85
+ field_dict.update(self.additional_properties)
86
+ field_dict.update(
87
+ {
88
+ "path": path,
89
+ "edited_by": edited_by,
90
+ "edited_at": edited_at,
91
+ "script_path": script_path,
92
+ "url": url,
93
+ "is_flow": is_flow,
94
+ "extra_perms": extra_perms,
95
+ "email": email,
96
+ "workspace_id": workspace_id,
97
+ "enabled": enabled,
98
+ "filters": filters,
99
+ }
100
+ )
101
+ if server_id is not UNSET:
102
+ field_dict["server_id"] = server_id
103
+ if last_server_ping is not UNSET:
104
+ field_dict["last_server_ping"] = last_server_ping
105
+ if error is not UNSET:
106
+ field_dict["error"] = error
107
+
108
+ return field_dict
109
+
110
+ @classmethod
111
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
112
+ from ..models.list_websocket_triggers_response_200_item_extra_perms import (
113
+ ListWebsocketTriggersResponse200ItemExtraPerms,
114
+ )
115
+ from ..models.list_websocket_triggers_response_200_item_filters_item import (
116
+ ListWebsocketTriggersResponse200ItemFiltersItem,
117
+ )
118
+
119
+ d = src_dict.copy()
120
+ path = d.pop("path")
121
+
122
+ edited_by = d.pop("edited_by")
123
+
124
+ edited_at = isoparse(d.pop("edited_at"))
125
+
126
+ script_path = d.pop("script_path")
127
+
128
+ url = d.pop("url")
129
+
130
+ is_flow = d.pop("is_flow")
131
+
132
+ extra_perms = ListWebsocketTriggersResponse200ItemExtraPerms.from_dict(d.pop("extra_perms"))
133
+
134
+ email = d.pop("email")
135
+
136
+ workspace_id = d.pop("workspace_id")
137
+
138
+ enabled = d.pop("enabled")
139
+
140
+ filters = []
141
+ _filters = d.pop("filters")
142
+ for filters_item_data in _filters:
143
+ filters_item = ListWebsocketTriggersResponse200ItemFiltersItem.from_dict(filters_item_data)
144
+
145
+ filters.append(filters_item)
146
+
147
+ server_id = d.pop("server_id", UNSET)
148
+
149
+ _last_server_ping = d.pop("last_server_ping", UNSET)
150
+ last_server_ping: Union[Unset, datetime.datetime]
151
+ if isinstance(_last_server_ping, Unset):
152
+ last_server_ping = UNSET
153
+ else:
154
+ last_server_ping = isoparse(_last_server_ping)
155
+
156
+ error = d.pop("error", UNSET)
157
+
158
+ list_websocket_triggers_response_200_item = cls(
159
+ path=path,
160
+ edited_by=edited_by,
161
+ edited_at=edited_at,
162
+ script_path=script_path,
163
+ url=url,
164
+ is_flow=is_flow,
165
+ extra_perms=extra_perms,
166
+ email=email,
167
+ workspace_id=workspace_id,
168
+ enabled=enabled,
169
+ filters=filters,
170
+ server_id=server_id,
171
+ last_server_ping=last_server_ping,
172
+ error=error,
173
+ )
174
+
175
+ list_websocket_triggers_response_200_item.additional_properties = d
176
+ return list_websocket_triggers_response_200_item
177
+
178
+ @property
179
+ def additional_keys(self) -> List[str]:
180
+ return list(self.additional_properties.keys())
181
+
182
+ def __getitem__(self, key: str) -> Any:
183
+ return self.additional_properties[key]
184
+
185
+ def __setitem__(self, key: str, value: Any) -> None:
186
+ self.additional_properties[key] = value
187
+
188
+ def __delitem__(self, key: str) -> None:
189
+ del self.additional_properties[key]
190
+
191
+ def __contains__(self, key: str) -> bool:
192
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
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="ListWebsocketTriggersResponse200ItemExtraPerms")
7
+
8
+
9
+ @_attrs_define
10
+ class ListWebsocketTriggersResponse200ItemExtraPerms:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, bool] = _attrs_field(init=False, factory=dict)
14
+
15
+ def to_dict(self) -> Dict[str, Any]:
16
+ field_dict: Dict[str, Any] = {}
17
+ field_dict.update(self.additional_properties)
18
+ field_dict.update({})
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
24
+ d = src_dict.copy()
25
+ list_websocket_triggers_response_200_item_extra_perms = cls()
26
+
27
+ list_websocket_triggers_response_200_item_extra_perms.additional_properties = d
28
+ return list_websocket_triggers_response_200_item_extra_perms
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> bool:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: bool) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -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="ListWebsocketTriggersResponse200ItemFiltersItem")
7
+
8
+
9
+ @_attrs_define
10
+ class ListWebsocketTriggersResponse200ItemFiltersItem:
11
+ """
12
+ Attributes:
13
+ key (str):
14
+ value (Any):
15
+ """
16
+
17
+ key: str
18
+ value: Any
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ key = self.key
23
+ value = self.value
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "key": key,
30
+ "value": value,
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
+ key = d.pop("key")
40
+
41
+ value = d.pop("value")
42
+
43
+ list_websocket_triggers_response_200_item_filters_item = cls(
44
+ key=key,
45
+ value=value,
46
+ )
47
+
48
+ list_websocket_triggers_response_200_item_filters_item.additional_properties = d
49
+ return list_websocket_triggers_response_200_item_filters_item
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
@@ -0,0 +1,112 @@
1
+ from typing import TYPE_CHECKING, 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
+ if TYPE_CHECKING:
9
+ from ..models.new_websocket_trigger_filters_item import NewWebsocketTriggerFiltersItem
10
+
11
+
12
+ T = TypeVar("T", bound="NewWebsocketTrigger")
13
+
14
+
15
+ @_attrs_define
16
+ class NewWebsocketTrigger:
17
+ """
18
+ Attributes:
19
+ path (str):
20
+ script_path (str):
21
+ is_flow (bool):
22
+ url (str):
23
+ filters (List['NewWebsocketTriggerFiltersItem']):
24
+ enabled (Union[Unset, bool]):
25
+ """
26
+
27
+ path: str
28
+ script_path: str
29
+ is_flow: bool
30
+ url: str
31
+ filters: List["NewWebsocketTriggerFiltersItem"]
32
+ enabled: Union[Unset, bool] = UNSET
33
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> Dict[str, Any]:
36
+ path = self.path
37
+ script_path = self.script_path
38
+ is_flow = self.is_flow
39
+ url = self.url
40
+ filters = []
41
+ for filters_item_data in self.filters:
42
+ filters_item = filters_item_data.to_dict()
43
+
44
+ filters.append(filters_item)
45
+
46
+ enabled = self.enabled
47
+
48
+ field_dict: Dict[str, Any] = {}
49
+ field_dict.update(self.additional_properties)
50
+ field_dict.update(
51
+ {
52
+ "path": path,
53
+ "script_path": script_path,
54
+ "is_flow": is_flow,
55
+ "url": url,
56
+ "filters": filters,
57
+ }
58
+ )
59
+ if enabled is not UNSET:
60
+ field_dict["enabled"] = enabled
61
+
62
+ return field_dict
63
+
64
+ @classmethod
65
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
66
+ from ..models.new_websocket_trigger_filters_item import NewWebsocketTriggerFiltersItem
67
+
68
+ d = src_dict.copy()
69
+ path = d.pop("path")
70
+
71
+ script_path = d.pop("script_path")
72
+
73
+ is_flow = d.pop("is_flow")
74
+
75
+ url = d.pop("url")
76
+
77
+ filters = []
78
+ _filters = d.pop("filters")
79
+ for filters_item_data in _filters:
80
+ filters_item = NewWebsocketTriggerFiltersItem.from_dict(filters_item_data)
81
+
82
+ filters.append(filters_item)
83
+
84
+ enabled = d.pop("enabled", UNSET)
85
+
86
+ new_websocket_trigger = cls(
87
+ path=path,
88
+ script_path=script_path,
89
+ is_flow=is_flow,
90
+ url=url,
91
+ filters=filters,
92
+ enabled=enabled,
93
+ )
94
+
95
+ new_websocket_trigger.additional_properties = d
96
+ return new_websocket_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
@@ -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="NewWebsocketTriggerFiltersItem")
7
+
8
+
9
+ @_attrs_define
10
+ class NewWebsocketTriggerFiltersItem:
11
+ """
12
+ Attributes:
13
+ key (str):
14
+ value (Any):
15
+ """
16
+
17
+ key: str
18
+ value: Any
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ key = self.key
23
+ value = self.value
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "key": key,
30
+ "value": value,
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
+ key = d.pop("key")
40
+
41
+ value = d.pop("value")
42
+
43
+ new_websocket_trigger_filters_item = cls(
44
+ key=key,
45
+ value=value,
46
+ )
47
+
48
+ new_websocket_trigger_filters_item.additional_properties = d
49
+ return new_websocket_trigger_filters_item
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
@@ -12,6 +12,7 @@ class RemoveGranularAclsKind(str, Enum):
12
12
  SCHEDULE = "schedule"
13
13
  SCRIPT = "script"
14
14
  VARIABLE = "variable"
15
+ WEBSOCKET_TRIGGER = "websocket_trigger"
15
16
 
16
17
  def __str__(self) -> str:
17
18
  return str(self.value)
@@ -0,0 +1,58 @@
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="SetWebsocketTriggerEnabledJsonBody")
7
+
8
+
9
+ @_attrs_define
10
+ class SetWebsocketTriggerEnabledJsonBody:
11
+ """
12
+ Attributes:
13
+ enabled (bool):
14
+ """
15
+
16
+ enabled: bool
17
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> Dict[str, Any]:
20
+ enabled = self.enabled
21
+
22
+ field_dict: Dict[str, Any] = {}
23
+ field_dict.update(self.additional_properties)
24
+ field_dict.update(
25
+ {
26
+ "enabled": enabled,
27
+ }
28
+ )
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
+ enabled = d.pop("enabled")
36
+
37
+ set_websocket_trigger_enabled_json_body = cls(
38
+ enabled=enabled,
39
+ )
40
+
41
+ set_websocket_trigger_enabled_json_body.additional_properties = d
42
+ return set_websocket_trigger_enabled_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
@@ -21,6 +21,7 @@ class TriggersCount:
21
21
  http_routes_count (Union[Unset, float]):
22
22
  webhook_count (Union[Unset, float]):
23
23
  email_count (Union[Unset, float]):
24
+ websocket_count (Union[Unset, float]):
24
25
  """
25
26
 
26
27
  primary_schedule: Union[Unset, "TriggersCountPrimarySchedule"] = UNSET
@@ -28,6 +29,7 @@ class TriggersCount:
28
29
  http_routes_count: Union[Unset, float] = UNSET
29
30
  webhook_count: Union[Unset, float] = UNSET
30
31
  email_count: Union[Unset, float] = UNSET
32
+ websocket_count: Union[Unset, float] = UNSET
31
33
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
32
34
 
33
35
  def to_dict(self) -> Dict[str, Any]:
@@ -39,6 +41,7 @@ class TriggersCount:
39
41
  http_routes_count = self.http_routes_count
40
42
  webhook_count = self.webhook_count
41
43
  email_count = self.email_count
44
+ websocket_count = self.websocket_count
42
45
 
43
46
  field_dict: Dict[str, Any] = {}
44
47
  field_dict.update(self.additional_properties)
@@ -53,6 +56,8 @@ class TriggersCount:
53
56
  field_dict["webhook_count"] = webhook_count
54
57
  if email_count is not UNSET:
55
58
  field_dict["email_count"] = email_count
59
+ if websocket_count is not UNSET:
60
+ field_dict["websocket_count"] = websocket_count
56
61
 
57
62
  return field_dict
58
63
 
@@ -76,12 +81,15 @@ class TriggersCount:
76
81
 
77
82
  email_count = d.pop("email_count", UNSET)
78
83
 
84
+ websocket_count = d.pop("websocket_count", UNSET)
85
+
79
86
  triggers_count = cls(
80
87
  primary_schedule=primary_schedule,
81
88
  schedule_count=schedule_count,
82
89
  http_routes_count=http_routes_count,
83
90
  webhook_count=webhook_count,
84
91
  email_count=email_count,
92
+ websocket_count=websocket_count,
85
93
  )
86
94
 
87
95
  triggers_count.additional_properties = d
@@ -0,0 +1,101 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ if TYPE_CHECKING:
7
+ from ..models.update_websocket_trigger_json_body_filters_item import UpdateWebsocketTriggerJsonBodyFiltersItem
8
+
9
+
10
+ T = TypeVar("T", bound="UpdateWebsocketTriggerJsonBody")
11
+
12
+
13
+ @_attrs_define
14
+ class UpdateWebsocketTriggerJsonBody:
15
+ """
16
+ Attributes:
17
+ url (str):
18
+ path (str):
19
+ script_path (str):
20
+ is_flow (bool):
21
+ filters (List['UpdateWebsocketTriggerJsonBodyFiltersItem']):
22
+ """
23
+
24
+ url: str
25
+ path: str
26
+ script_path: str
27
+ is_flow: bool
28
+ filters: List["UpdateWebsocketTriggerJsonBodyFiltersItem"]
29
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> Dict[str, Any]:
32
+ url = self.url
33
+ path = self.path
34
+ script_path = self.script_path
35
+ is_flow = self.is_flow
36
+ filters = []
37
+ for filters_item_data in self.filters:
38
+ filters_item = filters_item_data.to_dict()
39
+
40
+ filters.append(filters_item)
41
+
42
+ field_dict: Dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update(
45
+ {
46
+ "url": url,
47
+ "path": path,
48
+ "script_path": script_path,
49
+ "is_flow": is_flow,
50
+ "filters": filters,
51
+ }
52
+ )
53
+
54
+ return field_dict
55
+
56
+ @classmethod
57
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
58
+ from ..models.update_websocket_trigger_json_body_filters_item import UpdateWebsocketTriggerJsonBodyFiltersItem
59
+
60
+ d = src_dict.copy()
61
+ url = d.pop("url")
62
+
63
+ path = d.pop("path")
64
+
65
+ script_path = d.pop("script_path")
66
+
67
+ is_flow = d.pop("is_flow")
68
+
69
+ filters = []
70
+ _filters = d.pop("filters")
71
+ for filters_item_data in _filters:
72
+ filters_item = UpdateWebsocketTriggerJsonBodyFiltersItem.from_dict(filters_item_data)
73
+
74
+ filters.append(filters_item)
75
+
76
+ update_websocket_trigger_json_body = cls(
77
+ url=url,
78
+ path=path,
79
+ script_path=script_path,
80
+ is_flow=is_flow,
81
+ filters=filters,
82
+ )
83
+
84
+ update_websocket_trigger_json_body.additional_properties = d
85
+ return update_websocket_trigger_json_body
86
+
87
+ @property
88
+ def additional_keys(self) -> List[str]:
89
+ return list(self.additional_properties.keys())
90
+
91
+ def __getitem__(self, key: str) -> Any:
92
+ return self.additional_properties[key]
93
+
94
+ def __setitem__(self, key: str, value: Any) -> None:
95
+ self.additional_properties[key] = value
96
+
97
+ def __delitem__(self, key: str) -> None:
98
+ del self.additional_properties[key]
99
+
100
+ def __contains__(self, key: str) -> bool:
101
+ return key in self.additional_properties