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,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="SetNatsTriggerEnabledJsonBody")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class SetNatsTriggerEnabledJsonBody:
|
|
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_nats_trigger_enabled_json_body = cls(
|
|
38
|
+
enabled=enabled,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
set_nats_trigger_enabled_json_body.additional_properties = d
|
|
42
|
+
return set_nats_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
|
|
@@ -23,6 +23,7 @@ class TriggersCount:
|
|
|
23
23
|
email_count (Union[Unset, float]):
|
|
24
24
|
websocket_count (Union[Unset, float]):
|
|
25
25
|
kafka_count (Union[Unset, float]):
|
|
26
|
+
nats_count (Union[Unset, float]):
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
29
|
primary_schedule: Union[Unset, "TriggersCountPrimarySchedule"] = UNSET
|
|
@@ -32,6 +33,7 @@ class TriggersCount:
|
|
|
32
33
|
email_count: Union[Unset, float] = UNSET
|
|
33
34
|
websocket_count: Union[Unset, float] = UNSET
|
|
34
35
|
kafka_count: Union[Unset, float] = UNSET
|
|
36
|
+
nats_count: Union[Unset, float] = UNSET
|
|
35
37
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
38
|
|
|
37
39
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -45,6 +47,7 @@ class TriggersCount:
|
|
|
45
47
|
email_count = self.email_count
|
|
46
48
|
websocket_count = self.websocket_count
|
|
47
49
|
kafka_count = self.kafka_count
|
|
50
|
+
nats_count = self.nats_count
|
|
48
51
|
|
|
49
52
|
field_dict: Dict[str, Any] = {}
|
|
50
53
|
field_dict.update(self.additional_properties)
|
|
@@ -63,6 +66,8 @@ class TriggersCount:
|
|
|
63
66
|
field_dict["websocket_count"] = websocket_count
|
|
64
67
|
if kafka_count is not UNSET:
|
|
65
68
|
field_dict["kafka_count"] = kafka_count
|
|
69
|
+
if nats_count is not UNSET:
|
|
70
|
+
field_dict["nats_count"] = nats_count
|
|
66
71
|
|
|
67
72
|
return field_dict
|
|
68
73
|
|
|
@@ -90,6 +95,8 @@ class TriggersCount:
|
|
|
90
95
|
|
|
91
96
|
kafka_count = d.pop("kafka_count", UNSET)
|
|
92
97
|
|
|
98
|
+
nats_count = d.pop("nats_count", UNSET)
|
|
99
|
+
|
|
93
100
|
triggers_count = cls(
|
|
94
101
|
primary_schedule=primary_schedule,
|
|
95
102
|
schedule_count=schedule_count,
|
|
@@ -98,6 +105,7 @@ class TriggersCount:
|
|
|
98
105
|
email_count=email_count,
|
|
99
106
|
websocket_count=websocket_count,
|
|
100
107
|
kafka_count=kafka_count,
|
|
108
|
+
nats_count=nats_count,
|
|
101
109
|
)
|
|
102
110
|
|
|
103
111
|
triggers_count.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="UpdateNatsTriggerJsonBody")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class UpdateNatsTriggerJsonBody:
|
|
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
|
+
update_nats_trigger_json_body = 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
|
+
update_nats_trigger_json_body.additional_properties = d
|
|
96
|
+
return update_nats_trigger_json_body
|
|
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
|
|
@@ -3,6 +3,8 @@ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
6
8
|
if TYPE_CHECKING:
|
|
7
9
|
from ..models.update_websocket_trigger_json_body_filters_item import UpdateWebsocketTriggerJsonBodyFiltersItem
|
|
8
10
|
from ..models.update_websocket_trigger_json_body_initial_messages_item_type_0 import (
|
|
@@ -28,9 +30,9 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
28
30
|
script_path (str):
|
|
29
31
|
is_flow (bool):
|
|
30
32
|
filters (List['UpdateWebsocketTriggerJsonBodyFiltersItem']):
|
|
31
|
-
initial_messages (List[Union['UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0',
|
|
32
|
-
'UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1']]):
|
|
33
|
-
url_runnable_args (UpdateWebsocketTriggerJsonBodyUrlRunnableArgs):
|
|
33
|
+
initial_messages (Union[Unset, List[Union['UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0',
|
|
34
|
+
'UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1']]]):
|
|
35
|
+
url_runnable_args (Union[Unset, UpdateWebsocketTriggerJsonBodyUrlRunnableArgs]):
|
|
34
36
|
"""
|
|
35
37
|
|
|
36
38
|
url: str
|
|
@@ -38,13 +40,16 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
38
40
|
script_path: str
|
|
39
41
|
is_flow: bool
|
|
40
42
|
filters: List["UpdateWebsocketTriggerJsonBodyFiltersItem"]
|
|
41
|
-
initial_messages:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
initial_messages: Union[
|
|
44
|
+
Unset,
|
|
45
|
+
List[
|
|
46
|
+
Union[
|
|
47
|
+
"UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0",
|
|
48
|
+
"UpdateWebsocketTriggerJsonBodyInitialMessagesItemType1",
|
|
49
|
+
]
|
|
50
|
+
],
|
|
51
|
+
] = UNSET
|
|
52
|
+
url_runnable_args: Union[Unset, "UpdateWebsocketTriggerJsonBodyUrlRunnableArgs"] = UNSET
|
|
48
53
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
49
54
|
|
|
50
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -62,19 +67,23 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
62
67
|
|
|
63
68
|
filters.append(filters_item)
|
|
64
69
|
|
|
65
|
-
initial_messages
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
initial_messages: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
71
|
+
if not isinstance(self.initial_messages, Unset):
|
|
72
|
+
initial_messages = []
|
|
73
|
+
for initial_messages_item_data in self.initial_messages:
|
|
74
|
+
initial_messages_item: Dict[str, Any]
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
if isinstance(initial_messages_item_data, UpdateWebsocketTriggerJsonBodyInitialMessagesItemType0):
|
|
77
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
71
78
|
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
else:
|
|
80
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
74
81
|
|
|
75
|
-
|
|
82
|
+
initial_messages.append(initial_messages_item)
|
|
76
83
|
|
|
77
|
-
url_runnable_args =
|
|
84
|
+
url_runnable_args: Union[Unset, Dict[str, Any]] = UNSET
|
|
85
|
+
if not isinstance(self.url_runnable_args, Unset):
|
|
86
|
+
url_runnable_args = self.url_runnable_args.to_dict()
|
|
78
87
|
|
|
79
88
|
field_dict: Dict[str, Any] = {}
|
|
80
89
|
field_dict.update(self.additional_properties)
|
|
@@ -85,10 +94,12 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
85
94
|
"script_path": script_path,
|
|
86
95
|
"is_flow": is_flow,
|
|
87
96
|
"filters": filters,
|
|
88
|
-
"initial_messages": initial_messages,
|
|
89
|
-
"url_runnable_args": url_runnable_args,
|
|
90
97
|
}
|
|
91
98
|
)
|
|
99
|
+
if initial_messages is not UNSET:
|
|
100
|
+
field_dict["initial_messages"] = initial_messages
|
|
101
|
+
if url_runnable_args is not UNSET:
|
|
102
|
+
field_dict["url_runnable_args"] = url_runnable_args
|
|
92
103
|
|
|
93
104
|
return field_dict
|
|
94
105
|
|
|
@@ -122,8 +133,8 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
122
133
|
filters.append(filters_item)
|
|
123
134
|
|
|
124
135
|
initial_messages = []
|
|
125
|
-
_initial_messages = d.pop("initial_messages")
|
|
126
|
-
for initial_messages_item_data in _initial_messages:
|
|
136
|
+
_initial_messages = d.pop("initial_messages", UNSET)
|
|
137
|
+
for initial_messages_item_data in _initial_messages or []:
|
|
127
138
|
|
|
128
139
|
def _parse_initial_messages_item(
|
|
129
140
|
data: object,
|
|
@@ -151,7 +162,12 @@ class UpdateWebsocketTriggerJsonBody:
|
|
|
151
162
|
|
|
152
163
|
initial_messages.append(initial_messages_item)
|
|
153
164
|
|
|
154
|
-
|
|
165
|
+
_url_runnable_args = d.pop("url_runnable_args", UNSET)
|
|
166
|
+
url_runnable_args: Union[Unset, UpdateWebsocketTriggerJsonBodyUrlRunnableArgs]
|
|
167
|
+
if isinstance(_url_runnable_args, Unset):
|
|
168
|
+
url_runnable_args = UNSET
|
|
169
|
+
else:
|
|
170
|
+
url_runnable_args = UpdateWebsocketTriggerJsonBodyUrlRunnableArgs.from_dict(_url_runnable_args)
|
|
155
171
|
|
|
156
172
|
update_websocket_trigger_json_body = cls(
|
|
157
173
|
url=url,
|
|
@@ -13,17 +13,20 @@ class UserWorkspaceListWorkspacesItem:
|
|
|
13
13
|
id (str):
|
|
14
14
|
name (str):
|
|
15
15
|
username (str):
|
|
16
|
+
color (str):
|
|
16
17
|
"""
|
|
17
18
|
|
|
18
19
|
id: str
|
|
19
20
|
name: str
|
|
20
21
|
username: str
|
|
22
|
+
color: str
|
|
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
|
id = self.id
|
|
25
27
|
name = self.name
|
|
26
28
|
username = self.username
|
|
29
|
+
color = self.color
|
|
27
30
|
|
|
28
31
|
field_dict: Dict[str, Any] = {}
|
|
29
32
|
field_dict.update(self.additional_properties)
|
|
@@ -32,6 +35,7 @@ class UserWorkspaceListWorkspacesItem:
|
|
|
32
35
|
"id": id,
|
|
33
36
|
"name": name,
|
|
34
37
|
"username": username,
|
|
38
|
+
"color": color,
|
|
35
39
|
}
|
|
36
40
|
)
|
|
37
41
|
|
|
@@ -46,10 +50,13 @@ class UserWorkspaceListWorkspacesItem:
|
|
|
46
50
|
|
|
47
51
|
username = d.pop("username")
|
|
48
52
|
|
|
53
|
+
color = d.pop("color")
|
|
54
|
+
|
|
49
55
|
user_workspace_list_workspaces_item = cls(
|
|
50
56
|
id=id,
|
|
51
57
|
name=name,
|
|
52
58
|
username=username,
|
|
59
|
+
color=color,
|
|
53
60
|
)
|
|
54
61
|
|
|
55
62
|
user_workspace_list_workspaces_item.additional_properties = d
|
|
@@ -33,12 +33,12 @@ class WebsocketTrigger:
|
|
|
33
33
|
workspace_id (str):
|
|
34
34
|
enabled (bool):
|
|
35
35
|
filters (List['WebsocketTriggerFiltersItem']):
|
|
36
|
-
initial_messages (List[Union['WebsocketTriggerInitialMessagesItemType0',
|
|
37
|
-
'WebsocketTriggerInitialMessagesItemType1']]):
|
|
38
|
-
url_runnable_args (WebsocketTriggerUrlRunnableArgs):
|
|
39
36
|
server_id (Union[Unset, str]):
|
|
40
37
|
last_server_ping (Union[Unset, datetime.datetime]):
|
|
41
38
|
error (Union[Unset, str]):
|
|
39
|
+
initial_messages (Union[Unset, List[Union['WebsocketTriggerInitialMessagesItemType0',
|
|
40
|
+
'WebsocketTriggerInitialMessagesItemType1']]]):
|
|
41
|
+
url_runnable_args (Union[Unset, WebsocketTriggerUrlRunnableArgs]):
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
44
|
path: str
|
|
@@ -52,13 +52,13 @@ class WebsocketTrigger:
|
|
|
52
52
|
workspace_id: str
|
|
53
53
|
enabled: bool
|
|
54
54
|
filters: List["WebsocketTriggerFiltersItem"]
|
|
55
|
-
initial_messages: List[
|
|
56
|
-
Union["WebsocketTriggerInitialMessagesItemType0", "WebsocketTriggerInitialMessagesItemType1"]
|
|
57
|
-
]
|
|
58
|
-
url_runnable_args: "WebsocketTriggerUrlRunnableArgs"
|
|
59
55
|
server_id: Union[Unset, str] = UNSET
|
|
60
56
|
last_server_ping: Union[Unset, datetime.datetime] = UNSET
|
|
61
57
|
error: Union[Unset, str] = UNSET
|
|
58
|
+
initial_messages: Union[
|
|
59
|
+
Unset, List[Union["WebsocketTriggerInitialMessagesItemType0", "WebsocketTriggerInitialMessagesItemType1"]]
|
|
60
|
+
] = UNSET
|
|
61
|
+
url_runnable_args: Union[Unset, "WebsocketTriggerUrlRunnableArgs"] = UNSET
|
|
62
62
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
63
63
|
|
|
64
64
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -82,26 +82,29 @@ class WebsocketTrigger:
|
|
|
82
82
|
|
|
83
83
|
filters.append(filters_item)
|
|
84
84
|
|
|
85
|
-
initial_messages = []
|
|
86
|
-
for initial_messages_item_data in self.initial_messages:
|
|
87
|
-
initial_messages_item: Dict[str, Any]
|
|
88
|
-
|
|
89
|
-
if isinstance(initial_messages_item_data, WebsocketTriggerInitialMessagesItemType0):
|
|
90
|
-
initial_messages_item = initial_messages_item_data.to_dict()
|
|
91
|
-
|
|
92
|
-
else:
|
|
93
|
-
initial_messages_item = initial_messages_item_data.to_dict()
|
|
94
|
-
|
|
95
|
-
initial_messages.append(initial_messages_item)
|
|
96
|
-
|
|
97
|
-
url_runnable_args = self.url_runnable_args.to_dict()
|
|
98
|
-
|
|
99
85
|
server_id = self.server_id
|
|
100
86
|
last_server_ping: Union[Unset, str] = UNSET
|
|
101
87
|
if not isinstance(self.last_server_ping, Unset):
|
|
102
88
|
last_server_ping = self.last_server_ping.isoformat()
|
|
103
89
|
|
|
104
90
|
error = self.error
|
|
91
|
+
initial_messages: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
92
|
+
if not isinstance(self.initial_messages, Unset):
|
|
93
|
+
initial_messages = []
|
|
94
|
+
for initial_messages_item_data in self.initial_messages:
|
|
95
|
+
initial_messages_item: Dict[str, Any]
|
|
96
|
+
|
|
97
|
+
if isinstance(initial_messages_item_data, WebsocketTriggerInitialMessagesItemType0):
|
|
98
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
99
|
+
|
|
100
|
+
else:
|
|
101
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
102
|
+
|
|
103
|
+
initial_messages.append(initial_messages_item)
|
|
104
|
+
|
|
105
|
+
url_runnable_args: Union[Unset, Dict[str, Any]] = UNSET
|
|
106
|
+
if not isinstance(self.url_runnable_args, Unset):
|
|
107
|
+
url_runnable_args = self.url_runnable_args.to_dict()
|
|
105
108
|
|
|
106
109
|
field_dict: Dict[str, Any] = {}
|
|
107
110
|
field_dict.update(self.additional_properties)
|
|
@@ -118,8 +121,6 @@ class WebsocketTrigger:
|
|
|
118
121
|
"workspace_id": workspace_id,
|
|
119
122
|
"enabled": enabled,
|
|
120
123
|
"filters": filters,
|
|
121
|
-
"initial_messages": initial_messages,
|
|
122
|
-
"url_runnable_args": url_runnable_args,
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
if server_id is not UNSET:
|
|
@@ -128,6 +129,10 @@ class WebsocketTrigger:
|
|
|
128
129
|
field_dict["last_server_ping"] = last_server_ping
|
|
129
130
|
if error is not UNSET:
|
|
130
131
|
field_dict["error"] = error
|
|
132
|
+
if initial_messages is not UNSET:
|
|
133
|
+
field_dict["initial_messages"] = initial_messages
|
|
134
|
+
if url_runnable_args is not UNSET:
|
|
135
|
+
field_dict["url_runnable_args"] = url_runnable_args
|
|
131
136
|
|
|
132
137
|
return field_dict
|
|
133
138
|
|
|
@@ -167,9 +172,20 @@ class WebsocketTrigger:
|
|
|
167
172
|
|
|
168
173
|
filters.append(filters_item)
|
|
169
174
|
|
|
175
|
+
server_id = d.pop("server_id", UNSET)
|
|
176
|
+
|
|
177
|
+
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
178
|
+
last_server_ping: Union[Unset, datetime.datetime]
|
|
179
|
+
if isinstance(_last_server_ping, Unset):
|
|
180
|
+
last_server_ping = UNSET
|
|
181
|
+
else:
|
|
182
|
+
last_server_ping = isoparse(_last_server_ping)
|
|
183
|
+
|
|
184
|
+
error = d.pop("error", UNSET)
|
|
185
|
+
|
|
170
186
|
initial_messages = []
|
|
171
|
-
_initial_messages = d.pop("initial_messages")
|
|
172
|
-
for initial_messages_item_data in _initial_messages:
|
|
187
|
+
_initial_messages = d.pop("initial_messages", UNSET)
|
|
188
|
+
for initial_messages_item_data in _initial_messages or []:
|
|
173
189
|
|
|
174
190
|
def _parse_initial_messages_item(
|
|
175
191
|
data: object,
|
|
@@ -192,18 +208,12 @@ class WebsocketTrigger:
|
|
|
192
208
|
|
|
193
209
|
initial_messages.append(initial_messages_item)
|
|
194
210
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
_last_server_ping = d.pop("last_server_ping", UNSET)
|
|
200
|
-
last_server_ping: Union[Unset, datetime.datetime]
|
|
201
|
-
if isinstance(_last_server_ping, Unset):
|
|
202
|
-
last_server_ping = UNSET
|
|
211
|
+
_url_runnable_args = d.pop("url_runnable_args", UNSET)
|
|
212
|
+
url_runnable_args: Union[Unset, WebsocketTriggerUrlRunnableArgs]
|
|
213
|
+
if isinstance(_url_runnable_args, Unset):
|
|
214
|
+
url_runnable_args = UNSET
|
|
203
215
|
else:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
error = d.pop("error", UNSET)
|
|
216
|
+
url_runnable_args = WebsocketTriggerUrlRunnableArgs.from_dict(_url_runnable_args)
|
|
207
217
|
|
|
208
218
|
websocket_trigger = cls(
|
|
209
219
|
path=path,
|
|
@@ -217,11 +227,11 @@ class WebsocketTrigger:
|
|
|
217
227
|
workspace_id=workspace_id,
|
|
218
228
|
enabled=enabled,
|
|
219
229
|
filters=filters,
|
|
220
|
-
initial_messages=initial_messages,
|
|
221
|
-
url_runnable_args=url_runnable_args,
|
|
222
230
|
server_id=server_id,
|
|
223
231
|
last_server_ping=last_server_ping,
|
|
224
232
|
error=error,
|
|
233
|
+
initial_messages=initial_messages,
|
|
234
|
+
url_runnable_args=url_runnable_args,
|
|
225
235
|
)
|
|
226
236
|
|
|
227
237
|
websocket_trigger.additional_properties = d
|
windmill_api/models/workspace.py
CHANGED
|
@@ -16,12 +16,14 @@ class Workspace:
|
|
|
16
16
|
name (str):
|
|
17
17
|
owner (str):
|
|
18
18
|
domain (Union[Unset, str]):
|
|
19
|
+
color (Union[Unset, str]):
|
|
19
20
|
"""
|
|
20
21
|
|
|
21
22
|
id: str
|
|
22
23
|
name: str
|
|
23
24
|
owner: str
|
|
24
25
|
domain: Union[Unset, str] = UNSET
|
|
26
|
+
color: Union[Unset, str] = UNSET
|
|
25
27
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
28
|
|
|
27
29
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -29,6 +31,7 @@ class Workspace:
|
|
|
29
31
|
name = self.name
|
|
30
32
|
owner = self.owner
|
|
31
33
|
domain = self.domain
|
|
34
|
+
color = self.color
|
|
32
35
|
|
|
33
36
|
field_dict: Dict[str, Any] = {}
|
|
34
37
|
field_dict.update(self.additional_properties)
|
|
@@ -41,6 +44,8 @@ class Workspace:
|
|
|
41
44
|
)
|
|
42
45
|
if domain is not UNSET:
|
|
43
46
|
field_dict["domain"] = domain
|
|
47
|
+
if color is not UNSET:
|
|
48
|
+
field_dict["color"] = color
|
|
44
49
|
|
|
45
50
|
return field_dict
|
|
46
51
|
|
|
@@ -55,11 +60,14 @@ class Workspace:
|
|
|
55
60
|
|
|
56
61
|
domain = d.pop("domain", UNSET)
|
|
57
62
|
|
|
63
|
+
color = d.pop("color", UNSET)
|
|
64
|
+
|
|
58
65
|
workspace = cls(
|
|
59
66
|
id=id,
|
|
60
67
|
name=name,
|
|
61
68
|
owner=owner,
|
|
62
69
|
domain=domain,
|
|
70
|
+
color=color,
|
|
63
71
|
)
|
|
64
72
|
|
|
65
73
|
workspace.additional_properties = d
|