windmill-api 1.443.0__py3-none-any.whl → 1.445.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.
- windmill_api/api/capture/{update_capture.py → delete_capture.py} +13 -13
- windmill_api/api/capture/get_capture_configs.py +186 -0
- windmill_api/api/capture/list_captures.py +211 -0
- windmill_api/api/capture/ping_capture_config.py +121 -0
- windmill_api/api/capture/set_capture_config.py +107 -0
- windmill_api/api/nats_trigger/__init__.py +0 -0
- windmill_api/api/nats_trigger/create_nats_trigger.py +105 -0
- windmill_api/api/{capture/create_capture.py → nats_trigger/delete_nats_trigger.py} +4 -6
- windmill_api/api/nats_trigger/exists_nats_trigger.py +160 -0
- windmill_api/api/nats_trigger/get_nats_trigger.py +166 -0
- windmill_api/api/nats_trigger/list_nats_triggers.py +237 -0
- windmill_api/api/nats_trigger/set_nats_trigger_enabled.py +113 -0
- windmill_api/api/{capture/get_capture.py → nats_trigger/update_nats_trigger.py} +16 -8
- windmill_api/api/workspace/change_workspace_color.py +105 -0
- windmill_api/models/add_granular_acls_kind.py +1 -0
- windmill_api/models/capture.py +94 -0
- windmill_api/models/capture_config.py +95 -0
- windmill_api/models/capture_config_trigger_kind.py +13 -0
- windmill_api/models/capture_trigger_kind.py +13 -0
- windmill_api/models/change_workspace_color_json_body.py +58 -0
- windmill_api/models/create_nats_trigger_json_body.py +120 -0
- windmill_api/models/create_websocket_trigger_json_body.py +42 -29
- windmill_api/models/create_workspace.py +8 -0
- windmill_api/models/create_workspace_json_body.py +8 -0
- windmill_api/models/edit_nats_trigger.py +112 -0
- windmill_api/models/edit_websocket_trigger.py +35 -21
- windmill_api/models/get_capture_configs_response_200_item.py +95 -0
- windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +13 -0
- windmill_api/models/get_capture_configs_runnable_kind.py +9 -0
- windmill_api/models/get_granular_acls_kind.py +1 -0
- windmill_api/models/get_nats_trigger_response_200.py +196 -0
- windmill_api/models/get_nats_trigger_response_200_extra_perms.py +44 -0
- windmill_api/models/get_settings_response_200.py +8 -0
- windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
- windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
- windmill_api/models/get_used_triggers_response_200.py +7 -0
- windmill_api/models/get_websocket_trigger_response_200.py +54 -41
- windmill_api/models/list_captures_response_200_item.py +94 -0
- windmill_api/models/list_captures_response_200_item_trigger_kind.py +13 -0
- windmill_api/models/list_captures_runnable_kind.py +9 -0
- windmill_api/models/list_captures_trigger_kind.py +13 -0
- windmill_api/models/list_nats_triggers_response_200_item.py +196 -0
- windmill_api/models/list_nats_triggers_response_200_item_extra_perms.py +44 -0
- windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +7 -0
- windmill_api/models/list_websocket_triggers_response_200_item.py +54 -41
- windmill_api/models/list_workspaces_as_super_admin_response_200_item.py +8 -0
- windmill_api/models/list_workspaces_response_200_item.py +8 -0
- windmill_api/models/nats_trigger.py +196 -0
- windmill_api/models/nats_trigger_extra_perms.py +44 -0
- windmill_api/models/new_nats_trigger.py +120 -0
- windmill_api/models/new_websocket_trigger.py +36 -26
- windmill_api/models/ping_capture_config_runnable_kind.py +9 -0
- windmill_api/models/ping_capture_config_trigger_kind.py +13 -0
- windmill_api/models/remove_granular_acls_kind.py +1 -0
- windmill_api/models/set_capture_config_json_body.py +97 -0
- windmill_api/models/set_capture_config_json_body_trigger_config.py +44 -0
- windmill_api/models/set_capture_config_json_body_trigger_kind.py +13 -0
- windmill_api/models/set_nats_trigger_enabled_json_body.py +58 -0
- windmill_api/models/triggers_count.py +8 -0
- windmill_api/models/update_nats_trigger_json_body.py +112 -0
- windmill_api/models/update_websocket_trigger_json_body.py +40 -24
- windmill_api/models/user_workspace_list_workspaces_item.py +7 -0
- windmill_api/models/websocket_trigger.py +48 -38
- windmill_api/models/workspace.py +8 -0
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/METADATA +1 -1
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/RECORD +68 -29
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
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.get_nats_trigger_response_200_extra_perms import GetNatsTriggerResponse200ExtraPerms
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="GetNatsTriggerResponse200")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class GetNatsTriggerResponse200:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
path (str):
|
|
22
|
+
edited_by (str):
|
|
23
|
+
edited_at (datetime.datetime):
|
|
24
|
+
script_path (str):
|
|
25
|
+
nats_resource_path (str):
|
|
26
|
+
use_jetstream (bool):
|
|
27
|
+
subjects (List[str]):
|
|
28
|
+
is_flow (bool):
|
|
29
|
+
extra_perms (GetNatsTriggerResponse200ExtraPerms):
|
|
30
|
+
email (str):
|
|
31
|
+
workspace_id (str):
|
|
32
|
+
enabled (bool):
|
|
33
|
+
stream_name (Union[Unset, str]):
|
|
34
|
+
consumer_name (Union[Unset, str]):
|
|
35
|
+
server_id (Union[Unset, str]):
|
|
36
|
+
last_server_ping (Union[Unset, datetime.datetime]):
|
|
37
|
+
error (Union[Unset, str]):
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
path: str
|
|
41
|
+
edited_by: str
|
|
42
|
+
edited_at: datetime.datetime
|
|
43
|
+
script_path: str
|
|
44
|
+
nats_resource_path: str
|
|
45
|
+
use_jetstream: bool
|
|
46
|
+
subjects: List[str]
|
|
47
|
+
is_flow: bool
|
|
48
|
+
extra_perms: "GetNatsTriggerResponse200ExtraPerms"
|
|
49
|
+
email: str
|
|
50
|
+
workspace_id: str
|
|
51
|
+
enabled: bool
|
|
52
|
+
stream_name: Union[Unset, str] = UNSET
|
|
53
|
+
consumer_name: Union[Unset, str] = UNSET
|
|
54
|
+
server_id: Union[Unset, str] = UNSET
|
|
55
|
+
last_server_ping: Union[Unset, datetime.datetime] = UNSET
|
|
56
|
+
error: Union[Unset, str] = UNSET
|
|
57
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
path = self.path
|
|
61
|
+
edited_by = self.edited_by
|
|
62
|
+
edited_at = self.edited_at.isoformat()
|
|
63
|
+
|
|
64
|
+
script_path = self.script_path
|
|
65
|
+
nats_resource_path = self.nats_resource_path
|
|
66
|
+
use_jetstream = self.use_jetstream
|
|
67
|
+
subjects = self.subjects
|
|
68
|
+
|
|
69
|
+
is_flow = self.is_flow
|
|
70
|
+
extra_perms = self.extra_perms.to_dict()
|
|
71
|
+
|
|
72
|
+
email = self.email
|
|
73
|
+
workspace_id = self.workspace_id
|
|
74
|
+
enabled = self.enabled
|
|
75
|
+
stream_name = self.stream_name
|
|
76
|
+
consumer_name = self.consumer_name
|
|
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
|
+
"nats_resource_path": nats_resource_path,
|
|
93
|
+
"use_jetstream": use_jetstream,
|
|
94
|
+
"subjects": subjects,
|
|
95
|
+
"is_flow": is_flow,
|
|
96
|
+
"extra_perms": extra_perms,
|
|
97
|
+
"email": email,
|
|
98
|
+
"workspace_id": workspace_id,
|
|
99
|
+
"enabled": enabled,
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
if stream_name is not UNSET:
|
|
103
|
+
field_dict["stream_name"] = stream_name
|
|
104
|
+
if consumer_name is not UNSET:
|
|
105
|
+
field_dict["consumer_name"] = consumer_name
|
|
106
|
+
if server_id is not UNSET:
|
|
107
|
+
field_dict["server_id"] = server_id
|
|
108
|
+
if last_server_ping is not UNSET:
|
|
109
|
+
field_dict["last_server_ping"] = last_server_ping
|
|
110
|
+
if error is not UNSET:
|
|
111
|
+
field_dict["error"] = error
|
|
112
|
+
|
|
113
|
+
return field_dict
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
117
|
+
from ..models.get_nats_trigger_response_200_extra_perms import GetNatsTriggerResponse200ExtraPerms
|
|
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
|
+
nats_resource_path = d.pop("nats_resource_path")
|
|
129
|
+
|
|
130
|
+
use_jetstream = d.pop("use_jetstream")
|
|
131
|
+
|
|
132
|
+
subjects = cast(List[str], d.pop("subjects"))
|
|
133
|
+
|
|
134
|
+
is_flow = d.pop("is_flow")
|
|
135
|
+
|
|
136
|
+
extra_perms = GetNatsTriggerResponse200ExtraPerms.from_dict(d.pop("extra_perms"))
|
|
137
|
+
|
|
138
|
+
email = d.pop("email")
|
|
139
|
+
|
|
140
|
+
workspace_id = d.pop("workspace_id")
|
|
141
|
+
|
|
142
|
+
enabled = d.pop("enabled")
|
|
143
|
+
|
|
144
|
+
stream_name = d.pop("stream_name", UNSET)
|
|
145
|
+
|
|
146
|
+
consumer_name = d.pop("consumer_name", UNSET)
|
|
147
|
+
|
|
148
|
+
server_id = d.pop("server_id", UNSET)
|
|
149
|
+
|
|
150
|
+
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
151
|
+
last_server_ping: Union[Unset, datetime.datetime]
|
|
152
|
+
if isinstance(_last_server_ping, Unset):
|
|
153
|
+
last_server_ping = UNSET
|
|
154
|
+
else:
|
|
155
|
+
last_server_ping = isoparse(_last_server_ping)
|
|
156
|
+
|
|
157
|
+
error = d.pop("error", UNSET)
|
|
158
|
+
|
|
159
|
+
get_nats_trigger_response_200 = cls(
|
|
160
|
+
path=path,
|
|
161
|
+
edited_by=edited_by,
|
|
162
|
+
edited_at=edited_at,
|
|
163
|
+
script_path=script_path,
|
|
164
|
+
nats_resource_path=nats_resource_path,
|
|
165
|
+
use_jetstream=use_jetstream,
|
|
166
|
+
subjects=subjects,
|
|
167
|
+
is_flow=is_flow,
|
|
168
|
+
extra_perms=extra_perms,
|
|
169
|
+
email=email,
|
|
170
|
+
workspace_id=workspace_id,
|
|
171
|
+
enabled=enabled,
|
|
172
|
+
stream_name=stream_name,
|
|
173
|
+
consumer_name=consumer_name,
|
|
174
|
+
server_id=server_id,
|
|
175
|
+
last_server_ping=last_server_ping,
|
|
176
|
+
error=error,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
get_nats_trigger_response_200.additional_properties = d
|
|
180
|
+
return get_nats_trigger_response_200
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def additional_keys(self) -> List[str]:
|
|
184
|
+
return list(self.additional_properties.keys())
|
|
185
|
+
|
|
186
|
+
def __getitem__(self, key: str) -> Any:
|
|
187
|
+
return self.additional_properties[key]
|
|
188
|
+
|
|
189
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
190
|
+
self.additional_properties[key] = value
|
|
191
|
+
|
|
192
|
+
def __delitem__(self, key: str) -> None:
|
|
193
|
+
del self.additional_properties[key]
|
|
194
|
+
|
|
195
|
+
def __contains__(self, key: str) -> bool:
|
|
196
|
+
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="GetNatsTriggerResponse200ExtraPerms")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class GetNatsTriggerResponse200ExtraPerms:
|
|
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
|
+
get_nats_trigger_response_200_extra_perms = cls()
|
|
26
|
+
|
|
27
|
+
get_nats_trigger_response_200_extra_perms.additional_properties = d
|
|
28
|
+
return get_nats_trigger_response_200_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
|
|
@@ -44,6 +44,7 @@ class GetSettingsResponse200:
|
|
|
44
44
|
default_app (Union[Unset, str]):
|
|
45
45
|
default_scripts (Union[Unset, GetSettingsResponse200DefaultScripts]):
|
|
46
46
|
mute_critical_alerts (Union[Unset, bool]):
|
|
47
|
+
color (Union[Unset, str]):
|
|
47
48
|
"""
|
|
48
49
|
|
|
49
50
|
automatic_billing: bool
|
|
@@ -69,6 +70,7 @@ class GetSettingsResponse200:
|
|
|
69
70
|
default_app: Union[Unset, str] = UNSET
|
|
70
71
|
default_scripts: Union[Unset, "GetSettingsResponse200DefaultScripts"] = UNSET
|
|
71
72
|
mute_critical_alerts: Union[Unset, bool] = UNSET
|
|
73
|
+
color: Union[Unset, str] = UNSET
|
|
72
74
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
73
75
|
|
|
74
76
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -113,6 +115,7 @@ class GetSettingsResponse200:
|
|
|
113
115
|
default_scripts = self.default_scripts.to_dict()
|
|
114
116
|
|
|
115
117
|
mute_critical_alerts = self.mute_critical_alerts
|
|
118
|
+
color = self.color
|
|
116
119
|
|
|
117
120
|
field_dict: Dict[str, Any] = {}
|
|
118
121
|
field_dict.update(self.additional_properties)
|
|
@@ -163,6 +166,8 @@ class GetSettingsResponse200:
|
|
|
163
166
|
field_dict["default_scripts"] = default_scripts
|
|
164
167
|
if mute_critical_alerts is not UNSET:
|
|
165
168
|
field_dict["mute_critical_alerts"] = mute_critical_alerts
|
|
169
|
+
if color is not UNSET:
|
|
170
|
+
field_dict["color"] = color
|
|
166
171
|
|
|
167
172
|
return field_dict
|
|
168
173
|
|
|
@@ -254,6 +259,8 @@ class GetSettingsResponse200:
|
|
|
254
259
|
|
|
255
260
|
mute_critical_alerts = d.pop("mute_critical_alerts", UNSET)
|
|
256
261
|
|
|
262
|
+
color = d.pop("color", UNSET)
|
|
263
|
+
|
|
257
264
|
get_settings_response_200 = cls(
|
|
258
265
|
automatic_billing=automatic_billing,
|
|
259
266
|
code_completion_enabled=code_completion_enabled,
|
|
@@ -278,6 +285,7 @@ class GetSettingsResponse200:
|
|
|
278
285
|
default_app=default_app,
|
|
279
286
|
default_scripts=default_scripts,
|
|
280
287
|
mute_critical_alerts=mute_critical_alerts,
|
|
288
|
+
color=color,
|
|
281
289
|
)
|
|
282
290
|
|
|
283
291
|
get_settings_response_200.additional_properties = d
|
|
@@ -25,6 +25,7 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
25
25
|
email_count (Union[Unset, float]):
|
|
26
26
|
websocket_count (Union[Unset, float]):
|
|
27
27
|
kafka_count (Union[Unset, float]):
|
|
28
|
+
nats_count (Union[Unset, float]):
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
primary_schedule: Union[Unset, "GetTriggersCountOfFlowResponse200PrimarySchedule"] = UNSET
|
|
@@ -34,6 +35,7 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
34
35
|
email_count: Union[Unset, float] = UNSET
|
|
35
36
|
websocket_count: Union[Unset, float] = UNSET
|
|
36
37
|
kafka_count: Union[Unset, float] = UNSET
|
|
38
|
+
nats_count: Union[Unset, float] = UNSET
|
|
37
39
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
40
|
|
|
39
41
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -47,6 +49,7 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
47
49
|
email_count = self.email_count
|
|
48
50
|
websocket_count = self.websocket_count
|
|
49
51
|
kafka_count = self.kafka_count
|
|
52
|
+
nats_count = self.nats_count
|
|
50
53
|
|
|
51
54
|
field_dict: Dict[str, Any] = {}
|
|
52
55
|
field_dict.update(self.additional_properties)
|
|
@@ -65,6 +68,8 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
65
68
|
field_dict["websocket_count"] = websocket_count
|
|
66
69
|
if kafka_count is not UNSET:
|
|
67
70
|
field_dict["kafka_count"] = kafka_count
|
|
71
|
+
if nats_count is not UNSET:
|
|
72
|
+
field_dict["nats_count"] = nats_count
|
|
68
73
|
|
|
69
74
|
return field_dict
|
|
70
75
|
|
|
@@ -94,6 +99,8 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
94
99
|
|
|
95
100
|
kafka_count = d.pop("kafka_count", UNSET)
|
|
96
101
|
|
|
102
|
+
nats_count = d.pop("nats_count", UNSET)
|
|
103
|
+
|
|
97
104
|
get_triggers_count_of_flow_response_200 = cls(
|
|
98
105
|
primary_schedule=primary_schedule,
|
|
99
106
|
schedule_count=schedule_count,
|
|
@@ -102,6 +109,7 @@ class GetTriggersCountOfFlowResponse200:
|
|
|
102
109
|
email_count=email_count,
|
|
103
110
|
websocket_count=websocket_count,
|
|
104
111
|
kafka_count=kafka_count,
|
|
112
|
+
nats_count=nats_count,
|
|
105
113
|
)
|
|
106
114
|
|
|
107
115
|
get_triggers_count_of_flow_response_200.additional_properties = d
|
|
@@ -25,6 +25,7 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
25
25
|
email_count (Union[Unset, float]):
|
|
26
26
|
websocket_count (Union[Unset, float]):
|
|
27
27
|
kafka_count (Union[Unset, float]):
|
|
28
|
+
nats_count (Union[Unset, float]):
|
|
28
29
|
"""
|
|
29
30
|
|
|
30
31
|
primary_schedule: Union[Unset, "GetTriggersCountOfScriptResponse200PrimarySchedule"] = UNSET
|
|
@@ -34,6 +35,7 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
34
35
|
email_count: Union[Unset, float] = UNSET
|
|
35
36
|
websocket_count: Union[Unset, float] = UNSET
|
|
36
37
|
kafka_count: Union[Unset, float] = UNSET
|
|
38
|
+
nats_count: Union[Unset, float] = UNSET
|
|
37
39
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
40
|
|
|
39
41
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -47,6 +49,7 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
47
49
|
email_count = self.email_count
|
|
48
50
|
websocket_count = self.websocket_count
|
|
49
51
|
kafka_count = self.kafka_count
|
|
52
|
+
nats_count = self.nats_count
|
|
50
53
|
|
|
51
54
|
field_dict: Dict[str, Any] = {}
|
|
52
55
|
field_dict.update(self.additional_properties)
|
|
@@ -65,6 +68,8 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
65
68
|
field_dict["websocket_count"] = websocket_count
|
|
66
69
|
if kafka_count is not UNSET:
|
|
67
70
|
field_dict["kafka_count"] = kafka_count
|
|
71
|
+
if nats_count is not UNSET:
|
|
72
|
+
field_dict["nats_count"] = nats_count
|
|
68
73
|
|
|
69
74
|
return field_dict
|
|
70
75
|
|
|
@@ -94,6 +99,8 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
94
99
|
|
|
95
100
|
kafka_count = d.pop("kafka_count", UNSET)
|
|
96
101
|
|
|
102
|
+
nats_count = d.pop("nats_count", UNSET)
|
|
103
|
+
|
|
97
104
|
get_triggers_count_of_script_response_200 = cls(
|
|
98
105
|
primary_schedule=primary_schedule,
|
|
99
106
|
schedule_count=schedule_count,
|
|
@@ -102,6 +109,7 @@ class GetTriggersCountOfScriptResponse200:
|
|
|
102
109
|
email_count=email_count,
|
|
103
110
|
websocket_count=websocket_count,
|
|
104
111
|
kafka_count=kafka_count,
|
|
112
|
+
nats_count=nats_count,
|
|
105
113
|
)
|
|
106
114
|
|
|
107
115
|
get_triggers_count_of_script_response_200.additional_properties = d
|
|
@@ -13,17 +13,20 @@ class GetUsedTriggersResponse200:
|
|
|
13
13
|
http_routes_used (bool):
|
|
14
14
|
websocket_used (bool):
|
|
15
15
|
kafka_used (bool):
|
|
16
|
+
nats_used (bool):
|
|
16
17
|
"""
|
|
17
18
|
|
|
18
19
|
http_routes_used: bool
|
|
19
20
|
websocket_used: bool
|
|
20
21
|
kafka_used: bool
|
|
22
|
+
nats_used: bool
|
|
21
23
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
24
|
|
|
23
25
|
def to_dict(self) -> Dict[str, Any]:
|
|
24
26
|
http_routes_used = self.http_routes_used
|
|
25
27
|
websocket_used = self.websocket_used
|
|
26
28
|
kafka_used = self.kafka_used
|
|
29
|
+
nats_used = self.nats_used
|
|
27
30
|
|
|
28
31
|
field_dict: Dict[str, Any] = {}
|
|
29
32
|
field_dict.update(self.additional_properties)
|
|
@@ -32,6 +35,7 @@ class GetUsedTriggersResponse200:
|
|
|
32
35
|
"http_routes_used": http_routes_used,
|
|
33
36
|
"websocket_used": websocket_used,
|
|
34
37
|
"kafka_used": kafka_used,
|
|
38
|
+
"nats_used": nats_used,
|
|
35
39
|
}
|
|
36
40
|
)
|
|
37
41
|
|
|
@@ -46,10 +50,13 @@ class GetUsedTriggersResponse200:
|
|
|
46
50
|
|
|
47
51
|
kafka_used = d.pop("kafka_used")
|
|
48
52
|
|
|
53
|
+
nats_used = d.pop("nats_used")
|
|
54
|
+
|
|
49
55
|
get_used_triggers_response_200 = cls(
|
|
50
56
|
http_routes_used=http_routes_used,
|
|
51
57
|
websocket_used=websocket_used,
|
|
52
58
|
kafka_used=kafka_used,
|
|
59
|
+
nats_used=nats_used,
|
|
53
60
|
)
|
|
54
61
|
|
|
55
62
|
get_used_triggers_response_200.additional_properties = d
|
|
@@ -39,12 +39,12 @@ class GetWebsocketTriggerResponse200:
|
|
|
39
39
|
workspace_id (str):
|
|
40
40
|
enabled (bool):
|
|
41
41
|
filters (List['GetWebsocketTriggerResponse200FiltersItem']):
|
|
42
|
-
initial_messages (List[Union['GetWebsocketTriggerResponse200InitialMessagesItemType0',
|
|
43
|
-
'GetWebsocketTriggerResponse200InitialMessagesItemType1']]):
|
|
44
|
-
url_runnable_args (GetWebsocketTriggerResponse200UrlRunnableArgs):
|
|
45
42
|
server_id (Union[Unset, str]):
|
|
46
43
|
last_server_ping (Union[Unset, datetime.datetime]):
|
|
47
44
|
error (Union[Unset, str]):
|
|
45
|
+
initial_messages (Union[Unset, List[Union['GetWebsocketTriggerResponse200InitialMessagesItemType0',
|
|
46
|
+
'GetWebsocketTriggerResponse200InitialMessagesItemType1']]]):
|
|
47
|
+
url_runnable_args (Union[Unset, GetWebsocketTriggerResponse200UrlRunnableArgs]):
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
path: str
|
|
@@ -58,16 +58,19 @@ class GetWebsocketTriggerResponse200:
|
|
|
58
58
|
workspace_id: str
|
|
59
59
|
enabled: bool
|
|
60
60
|
filters: List["GetWebsocketTriggerResponse200FiltersItem"]
|
|
61
|
-
initial_messages: List[
|
|
62
|
-
Union[
|
|
63
|
-
"GetWebsocketTriggerResponse200InitialMessagesItemType0",
|
|
64
|
-
"GetWebsocketTriggerResponse200InitialMessagesItemType1",
|
|
65
|
-
]
|
|
66
|
-
]
|
|
67
|
-
url_runnable_args: "GetWebsocketTriggerResponse200UrlRunnableArgs"
|
|
68
61
|
server_id: Union[Unset, str] = UNSET
|
|
69
62
|
last_server_ping: Union[Unset, datetime.datetime] = UNSET
|
|
70
63
|
error: Union[Unset, str] = UNSET
|
|
64
|
+
initial_messages: Union[
|
|
65
|
+
Unset,
|
|
66
|
+
List[
|
|
67
|
+
Union[
|
|
68
|
+
"GetWebsocketTriggerResponse200InitialMessagesItemType0",
|
|
69
|
+
"GetWebsocketTriggerResponse200InitialMessagesItemType1",
|
|
70
|
+
]
|
|
71
|
+
],
|
|
72
|
+
] = UNSET
|
|
73
|
+
url_runnable_args: Union[Unset, "GetWebsocketTriggerResponse200UrlRunnableArgs"] = UNSET
|
|
71
74
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
72
75
|
|
|
73
76
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -93,26 +96,29 @@ class GetWebsocketTriggerResponse200:
|
|
|
93
96
|
|
|
94
97
|
filters.append(filters_item)
|
|
95
98
|
|
|
96
|
-
initial_messages = []
|
|
97
|
-
for initial_messages_item_data in self.initial_messages:
|
|
98
|
-
initial_messages_item: Dict[str, Any]
|
|
99
|
-
|
|
100
|
-
if isinstance(initial_messages_item_data, GetWebsocketTriggerResponse200InitialMessagesItemType0):
|
|
101
|
-
initial_messages_item = initial_messages_item_data.to_dict()
|
|
102
|
-
|
|
103
|
-
else:
|
|
104
|
-
initial_messages_item = initial_messages_item_data.to_dict()
|
|
105
|
-
|
|
106
|
-
initial_messages.append(initial_messages_item)
|
|
107
|
-
|
|
108
|
-
url_runnable_args = self.url_runnable_args.to_dict()
|
|
109
|
-
|
|
110
99
|
server_id = self.server_id
|
|
111
100
|
last_server_ping: Union[Unset, str] = UNSET
|
|
112
101
|
if not isinstance(self.last_server_ping, Unset):
|
|
113
102
|
last_server_ping = self.last_server_ping.isoformat()
|
|
114
103
|
|
|
115
104
|
error = self.error
|
|
105
|
+
initial_messages: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
106
|
+
if not isinstance(self.initial_messages, Unset):
|
|
107
|
+
initial_messages = []
|
|
108
|
+
for initial_messages_item_data in self.initial_messages:
|
|
109
|
+
initial_messages_item: Dict[str, Any]
|
|
110
|
+
|
|
111
|
+
if isinstance(initial_messages_item_data, GetWebsocketTriggerResponse200InitialMessagesItemType0):
|
|
112
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
113
|
+
|
|
114
|
+
else:
|
|
115
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
116
|
+
|
|
117
|
+
initial_messages.append(initial_messages_item)
|
|
118
|
+
|
|
119
|
+
url_runnable_args: Union[Unset, Dict[str, Any]] = UNSET
|
|
120
|
+
if not isinstance(self.url_runnable_args, Unset):
|
|
121
|
+
url_runnable_args = self.url_runnable_args.to_dict()
|
|
116
122
|
|
|
117
123
|
field_dict: Dict[str, Any] = {}
|
|
118
124
|
field_dict.update(self.additional_properties)
|
|
@@ -129,8 +135,6 @@ class GetWebsocketTriggerResponse200:
|
|
|
129
135
|
"workspace_id": workspace_id,
|
|
130
136
|
"enabled": enabled,
|
|
131
137
|
"filters": filters,
|
|
132
|
-
"initial_messages": initial_messages,
|
|
133
|
-
"url_runnable_args": url_runnable_args,
|
|
134
138
|
}
|
|
135
139
|
)
|
|
136
140
|
if server_id is not UNSET:
|
|
@@ -139,6 +143,10 @@ class GetWebsocketTriggerResponse200:
|
|
|
139
143
|
field_dict["last_server_ping"] = last_server_ping
|
|
140
144
|
if error is not UNSET:
|
|
141
145
|
field_dict["error"] = error
|
|
146
|
+
if initial_messages is not UNSET:
|
|
147
|
+
field_dict["initial_messages"] = initial_messages
|
|
148
|
+
if url_runnable_args is not UNSET:
|
|
149
|
+
field_dict["url_runnable_args"] = url_runnable_args
|
|
142
150
|
|
|
143
151
|
return field_dict
|
|
144
152
|
|
|
@@ -184,9 +192,20 @@ class GetWebsocketTriggerResponse200:
|
|
|
184
192
|
|
|
185
193
|
filters.append(filters_item)
|
|
186
194
|
|
|
195
|
+
server_id = d.pop("server_id", UNSET)
|
|
196
|
+
|
|
197
|
+
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
198
|
+
last_server_ping: Union[Unset, datetime.datetime]
|
|
199
|
+
if isinstance(_last_server_ping, Unset):
|
|
200
|
+
last_server_ping = UNSET
|
|
201
|
+
else:
|
|
202
|
+
last_server_ping = isoparse(_last_server_ping)
|
|
203
|
+
|
|
204
|
+
error = d.pop("error", UNSET)
|
|
205
|
+
|
|
187
206
|
initial_messages = []
|
|
188
|
-
_initial_messages = d.pop("initial_messages")
|
|
189
|
-
for initial_messages_item_data in _initial_messages:
|
|
207
|
+
_initial_messages = d.pop("initial_messages", UNSET)
|
|
208
|
+
for initial_messages_item_data in _initial_messages or []:
|
|
190
209
|
|
|
191
210
|
def _parse_initial_messages_item(
|
|
192
211
|
data: object,
|
|
@@ -214,18 +233,12 @@ class GetWebsocketTriggerResponse200:
|
|
|
214
233
|
|
|
215
234
|
initial_messages.append(initial_messages_item)
|
|
216
235
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
222
|
-
last_server_ping: Union[Unset, datetime.datetime]
|
|
223
|
-
if isinstance(_last_server_ping, Unset):
|
|
224
|
-
last_server_ping = UNSET
|
|
236
|
+
_url_runnable_args = d.pop("url_runnable_args", UNSET)
|
|
237
|
+
url_runnable_args: Union[Unset, GetWebsocketTriggerResponse200UrlRunnableArgs]
|
|
238
|
+
if isinstance(_url_runnable_args, Unset):
|
|
239
|
+
url_runnable_args = UNSET
|
|
225
240
|
else:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
error = d.pop("error", UNSET)
|
|
241
|
+
url_runnable_args = GetWebsocketTriggerResponse200UrlRunnableArgs.from_dict(_url_runnable_args)
|
|
229
242
|
|
|
230
243
|
get_websocket_trigger_response_200 = cls(
|
|
231
244
|
path=path,
|
|
@@ -239,11 +252,11 @@ class GetWebsocketTriggerResponse200:
|
|
|
239
252
|
workspace_id=workspace_id,
|
|
240
253
|
enabled=enabled,
|
|
241
254
|
filters=filters,
|
|
242
|
-
initial_messages=initial_messages,
|
|
243
|
-
url_runnable_args=url_runnable_args,
|
|
244
255
|
server_id=server_id,
|
|
245
256
|
last_server_ping=last_server_ping,
|
|
246
257
|
error=error,
|
|
258
|
+
initial_messages=initial_messages,
|
|
259
|
+
url_runnable_args=url_runnable_args,
|
|
247
260
|
)
|
|
248
261
|
|
|
249
262
|
get_websocket_trigger_response_200.additional_properties = d
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from typing import 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 ..models.list_captures_response_200_item_trigger_kind import ListCapturesResponse200ItemTriggerKind
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="ListCapturesResponse200Item")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ListCapturesResponse200Item:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
trigger_kind (ListCapturesResponse200ItemTriggerKind):
|
|
19
|
+
payload (Any):
|
|
20
|
+
id (int):
|
|
21
|
+
created_at (datetime.datetime):
|
|
22
|
+
trigger_extra (Union[Unset, Any]):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
trigger_kind: ListCapturesResponse200ItemTriggerKind
|
|
26
|
+
payload: Any
|
|
27
|
+
id: int
|
|
28
|
+
created_at: datetime.datetime
|
|
29
|
+
trigger_extra: Union[Unset, Any] = UNSET
|
|
30
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
33
|
+
trigger_kind = self.trigger_kind.value
|
|
34
|
+
|
|
35
|
+
payload = self.payload
|
|
36
|
+
id = self.id
|
|
37
|
+
created_at = self.created_at.isoformat()
|
|
38
|
+
|
|
39
|
+
trigger_extra = self.trigger_extra
|
|
40
|
+
|
|
41
|
+
field_dict: Dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"trigger_kind": trigger_kind,
|
|
46
|
+
"payload": payload,
|
|
47
|
+
"id": id,
|
|
48
|
+
"created_at": created_at,
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
if trigger_extra is not UNSET:
|
|
52
|
+
field_dict["trigger_extra"] = trigger_extra
|
|
53
|
+
|
|
54
|
+
return field_dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
58
|
+
d = src_dict.copy()
|
|
59
|
+
trigger_kind = ListCapturesResponse200ItemTriggerKind(d.pop("trigger_kind"))
|
|
60
|
+
|
|
61
|
+
payload = d.pop("payload")
|
|
62
|
+
|
|
63
|
+
id = d.pop("id")
|
|
64
|
+
|
|
65
|
+
created_at = isoparse(d.pop("created_at"))
|
|
66
|
+
|
|
67
|
+
trigger_extra = d.pop("trigger_extra", UNSET)
|
|
68
|
+
|
|
69
|
+
list_captures_response_200_item = cls(
|
|
70
|
+
trigger_kind=trigger_kind,
|
|
71
|
+
payload=payload,
|
|
72
|
+
id=id,
|
|
73
|
+
created_at=created_at,
|
|
74
|
+
trigger_extra=trigger_extra,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
list_captures_response_200_item.additional_properties = d
|
|
78
|
+
return list_captures_response_200_item
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def additional_keys(self) -> List[str]:
|
|
82
|
+
return list(self.additional_properties.keys())
|
|
83
|
+
|
|
84
|
+
def __getitem__(self, key: str) -> Any:
|
|
85
|
+
return self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
88
|
+
self.additional_properties[key] = value
|
|
89
|
+
|
|
90
|
+
def __delitem__(self, key: str) -> None:
|
|
91
|
+
del self.additional_properties[key]
|
|
92
|
+
|
|
93
|
+
def __contains__(self, key: str) -> bool:
|
|
94
|
+
return key in self.additional_properties
|