windmill-api 1.417.3__py3-none-any.whl → 1.419.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.
- windmill_api/api/index_search/count_search_logs_index.py +211 -0
- windmill_api/api/index_search/search_logs_index.py +241 -0
- windmill_api/models/count_search_logs_index_response_200.py +85 -0
- windmill_api/models/count_search_logs_index_response_200_count_per_host.py +44 -0
- windmill_api/models/create_websocket_trigger_json_body.py +82 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/create_websocket_trigger_json_body_url_runnable_args.py +44 -0
- windmill_api/models/edit_websocket_trigger.py +71 -1
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/edit_websocket_trigger_url_runnable_args.py +44 -0
- windmill_api/models/get_websocket_trigger_response_200.py +82 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_0.py +58 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1.py +70 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/get_websocket_trigger_response_200_url_runnable_args.py +44 -0
- windmill_api/models/list_websocket_triggers_response_200_item.py +84 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_0.py +58 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1.py +70 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result_args.py +46 -0
- windmill_api/models/list_websocket_triggers_response_200_item_url_runnable_args.py +44 -0
- windmill_api/models/log_search_hit.py +58 -0
- windmill_api/models/new_websocket_trigger.py +66 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/new_websocket_trigger_url_runnable_args.py +44 -0
- windmill_api/models/path_script.py +8 -0
- windmill_api/models/raw_script.py +8 -0
- windmill_api/models/search_logs_index_response_200.py +86 -0
- windmill_api/models/search_logs_index_response_200_hits_item.py +58 -0
- windmill_api/models/test_smtp_json_body_smtp.py +7 -0
- windmill_api/models/update_websocket_trigger_json_body.py +83 -1
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/update_websocket_trigger_json_body_url_runnable_args.py +44 -0
- windmill_api/models/websocket_trigger.py +60 -0
- windmill_api/models/websocket_trigger_initial_message_type_0.py +58 -0
- windmill_api/models/websocket_trigger_initial_message_type_1_runnable_result_args.py +44 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/websocket_trigger_url_runnable_args.py +44 -0
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/METADATA +1 -1
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/RECORD +58 -14
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/WHEEL +0 -0
|
@@ -7,6 +7,15 @@ from ..types import UNSET, Unset
|
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
9
|
from ..models.create_websocket_trigger_json_body_filters_item import CreateWebsocketTriggerJsonBodyFiltersItem
|
|
10
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_0 import (
|
|
11
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType0,
|
|
12
|
+
)
|
|
13
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_1 import (
|
|
14
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1,
|
|
15
|
+
)
|
|
16
|
+
from ..models.create_websocket_trigger_json_body_url_runnable_args import (
|
|
17
|
+
CreateWebsocketTriggerJsonBodyUrlRunnableArgs,
|
|
18
|
+
)
|
|
10
19
|
|
|
11
20
|
|
|
12
21
|
T = TypeVar("T", bound="CreateWebsocketTriggerJsonBody")
|
|
@@ -21,6 +30,9 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
21
30
|
is_flow (bool):
|
|
22
31
|
url (str):
|
|
23
32
|
filters (List['CreateWebsocketTriggerJsonBodyFiltersItem']):
|
|
33
|
+
initial_messages (List[Union['CreateWebsocketTriggerJsonBodyInitialMessagesItemType0',
|
|
34
|
+
'CreateWebsocketTriggerJsonBodyInitialMessagesItemType1']]):
|
|
35
|
+
url_runnable_args (CreateWebsocketTriggerJsonBodyUrlRunnableArgs):
|
|
24
36
|
enabled (Union[Unset, bool]):
|
|
25
37
|
"""
|
|
26
38
|
|
|
@@ -29,10 +41,21 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
29
41
|
is_flow: bool
|
|
30
42
|
url: str
|
|
31
43
|
filters: List["CreateWebsocketTriggerJsonBodyFiltersItem"]
|
|
44
|
+
initial_messages: List[
|
|
45
|
+
Union[
|
|
46
|
+
"CreateWebsocketTriggerJsonBodyInitialMessagesItemType0",
|
|
47
|
+
"CreateWebsocketTriggerJsonBodyInitialMessagesItemType1",
|
|
48
|
+
]
|
|
49
|
+
]
|
|
50
|
+
url_runnable_args: "CreateWebsocketTriggerJsonBodyUrlRunnableArgs"
|
|
32
51
|
enabled: Union[Unset, bool] = UNSET
|
|
33
52
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
53
|
|
|
35
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_0 import (
|
|
56
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType0,
|
|
57
|
+
)
|
|
58
|
+
|
|
36
59
|
path = self.path
|
|
37
60
|
script_path = self.script_path
|
|
38
61
|
is_flow = self.is_flow
|
|
@@ -43,6 +66,20 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
43
66
|
|
|
44
67
|
filters.append(filters_item)
|
|
45
68
|
|
|
69
|
+
initial_messages = []
|
|
70
|
+
for initial_messages_item_data in self.initial_messages:
|
|
71
|
+
initial_messages_item: Dict[str, Any]
|
|
72
|
+
|
|
73
|
+
if isinstance(initial_messages_item_data, CreateWebsocketTriggerJsonBodyInitialMessagesItemType0):
|
|
74
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
75
|
+
|
|
76
|
+
else:
|
|
77
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
78
|
+
|
|
79
|
+
initial_messages.append(initial_messages_item)
|
|
80
|
+
|
|
81
|
+
url_runnable_args = self.url_runnable_args.to_dict()
|
|
82
|
+
|
|
46
83
|
enabled = self.enabled
|
|
47
84
|
|
|
48
85
|
field_dict: Dict[str, Any] = {}
|
|
@@ -54,6 +91,8 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
54
91
|
"is_flow": is_flow,
|
|
55
92
|
"url": url,
|
|
56
93
|
"filters": filters,
|
|
94
|
+
"initial_messages": initial_messages,
|
|
95
|
+
"url_runnable_args": url_runnable_args,
|
|
57
96
|
}
|
|
58
97
|
)
|
|
59
98
|
if enabled is not UNSET:
|
|
@@ -64,6 +103,15 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
64
103
|
@classmethod
|
|
65
104
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
66
105
|
from ..models.create_websocket_trigger_json_body_filters_item import CreateWebsocketTriggerJsonBodyFiltersItem
|
|
106
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_0 import (
|
|
107
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType0,
|
|
108
|
+
)
|
|
109
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_1 import (
|
|
110
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1,
|
|
111
|
+
)
|
|
112
|
+
from ..models.create_websocket_trigger_json_body_url_runnable_args import (
|
|
113
|
+
CreateWebsocketTriggerJsonBodyUrlRunnableArgs,
|
|
114
|
+
)
|
|
67
115
|
|
|
68
116
|
d = src_dict.copy()
|
|
69
117
|
path = d.pop("path")
|
|
@@ -81,6 +129,38 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
81
129
|
|
|
82
130
|
filters.append(filters_item)
|
|
83
131
|
|
|
132
|
+
initial_messages = []
|
|
133
|
+
_initial_messages = d.pop("initial_messages")
|
|
134
|
+
for initial_messages_item_data in _initial_messages:
|
|
135
|
+
|
|
136
|
+
def _parse_initial_messages_item(
|
|
137
|
+
data: object,
|
|
138
|
+
) -> Union[
|
|
139
|
+
"CreateWebsocketTriggerJsonBodyInitialMessagesItemType0",
|
|
140
|
+
"CreateWebsocketTriggerJsonBodyInitialMessagesItemType1",
|
|
141
|
+
]:
|
|
142
|
+
try:
|
|
143
|
+
if not isinstance(data, dict):
|
|
144
|
+
raise TypeError()
|
|
145
|
+
initial_messages_item_type_0 = CreateWebsocketTriggerJsonBodyInitialMessagesItemType0.from_dict(
|
|
146
|
+
data
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
return initial_messages_item_type_0
|
|
150
|
+
except: # noqa: E722
|
|
151
|
+
pass
|
|
152
|
+
if not isinstance(data, dict):
|
|
153
|
+
raise TypeError()
|
|
154
|
+
initial_messages_item_type_1 = CreateWebsocketTriggerJsonBodyInitialMessagesItemType1.from_dict(data)
|
|
155
|
+
|
|
156
|
+
return initial_messages_item_type_1
|
|
157
|
+
|
|
158
|
+
initial_messages_item = _parse_initial_messages_item(initial_messages_item_data)
|
|
159
|
+
|
|
160
|
+
initial_messages.append(initial_messages_item)
|
|
161
|
+
|
|
162
|
+
url_runnable_args = CreateWebsocketTriggerJsonBodyUrlRunnableArgs.from_dict(d.pop("url_runnable_args"))
|
|
163
|
+
|
|
84
164
|
enabled = d.pop("enabled", UNSET)
|
|
85
165
|
|
|
86
166
|
create_websocket_trigger_json_body = cls(
|
|
@@ -89,6 +169,8 @@ class CreateWebsocketTriggerJsonBody:
|
|
|
89
169
|
is_flow=is_flow,
|
|
90
170
|
url=url,
|
|
91
171
|
filters=filters,
|
|
172
|
+
initial_messages=initial_messages,
|
|
173
|
+
url_runnable_args=url_runnable_args,
|
|
92
174
|
enabled=enabled,
|
|
93
175
|
)
|
|
94
176
|
|
|
@@ -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="CreateWebsocketTriggerJsonBodyInitialMessagesItemType0")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CreateWebsocketTriggerJsonBodyInitialMessagesItemType0:
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
raw_message (str):
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
raw_message: str
|
|
17
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
18
|
+
|
|
19
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
20
|
+
raw_message = self.raw_message
|
|
21
|
+
|
|
22
|
+
field_dict: Dict[str, Any] = {}
|
|
23
|
+
field_dict.update(self.additional_properties)
|
|
24
|
+
field_dict.update(
|
|
25
|
+
{
|
|
26
|
+
"raw_message": raw_message,
|
|
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
|
+
raw_message = d.pop("raw_message")
|
|
36
|
+
|
|
37
|
+
create_websocket_trigger_json_body_initial_messages_item_type_0 = cls(
|
|
38
|
+
raw_message=raw_message,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
create_websocket_trigger_json_body_initial_messages_item_type_0.additional_properties = d
|
|
42
|
+
return create_websocket_trigger_json_body_initial_messages_item_type_0
|
|
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,70 @@
|
|
|
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.create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result import (
|
|
8
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="CreateWebsocketTriggerJsonBodyInitialMessagesItemType1")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class CreateWebsocketTriggerJsonBodyInitialMessagesItemType1:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
runnable_result (CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
runnable_result: "CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult"
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
runnable_result = self.runnable_result.to_dict()
|
|
27
|
+
|
|
28
|
+
field_dict: Dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"runnable_result": runnable_result,
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
return field_dict
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
40
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result import (
|
|
41
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
d = src_dict.copy()
|
|
45
|
+
runnable_result = CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult.from_dict(
|
|
46
|
+
d.pop("runnable_result")
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1 = cls(
|
|
50
|
+
runnable_result=runnable_result,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1.additional_properties = d
|
|
54
|
+
return create_websocket_trigger_json_body_initial_messages_item_type_1
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> List[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
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.create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args import (
|
|
8
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResult:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
path (str):
|
|
20
|
+
args (CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs):
|
|
21
|
+
is_flow (bool):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
path: str
|
|
25
|
+
args: "CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs"
|
|
26
|
+
is_flow: bool
|
|
27
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
30
|
+
path = self.path
|
|
31
|
+
args = self.args.to_dict()
|
|
32
|
+
|
|
33
|
+
is_flow = self.is_flow
|
|
34
|
+
|
|
35
|
+
field_dict: Dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"path": path,
|
|
40
|
+
"args": args,
|
|
41
|
+
"is_flow": is_flow,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return field_dict
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
49
|
+
from ..models.create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args import (
|
|
50
|
+
CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
d = src_dict.copy()
|
|
54
|
+
path = d.pop("path")
|
|
55
|
+
|
|
56
|
+
args = CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs.from_dict(d.pop("args"))
|
|
57
|
+
|
|
58
|
+
is_flow = d.pop("is_flow")
|
|
59
|
+
|
|
60
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result = cls(
|
|
61
|
+
path=path,
|
|
62
|
+
args=args,
|
|
63
|
+
is_flow=is_flow,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.additional_properties = d
|
|
67
|
+
return create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> List[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
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="CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CreateWebsocketTriggerJsonBodyInitialMessagesItemType1RunnableResultArgs:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, Any] = _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
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args = cls()
|
|
26
|
+
|
|
27
|
+
create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.additional_properties = d
|
|
28
|
+
return create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> 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,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="CreateWebsocketTriggerJsonBodyUrlRunnableArgs")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CreateWebsocketTriggerJsonBodyUrlRunnableArgs:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, Any] = _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
|
+
create_websocket_trigger_json_body_url_runnable_args = cls()
|
|
26
|
+
|
|
27
|
+
create_websocket_trigger_json_body_url_runnable_args.additional_properties = d
|
|
28
|
+
return create_websocket_trigger_json_body_url_runnable_args
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> 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
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
2
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
6
|
if TYPE_CHECKING:
|
|
7
7
|
from ..models.edit_websocket_trigger_filters_item import EditWebsocketTriggerFiltersItem
|
|
8
|
+
from ..models.edit_websocket_trigger_initial_messages_item_type_0 import (
|
|
9
|
+
EditWebsocketTriggerInitialMessagesItemType0,
|
|
10
|
+
)
|
|
11
|
+
from ..models.edit_websocket_trigger_initial_messages_item_type_1 import (
|
|
12
|
+
EditWebsocketTriggerInitialMessagesItemType1,
|
|
13
|
+
)
|
|
14
|
+
from ..models.edit_websocket_trigger_url_runnable_args import EditWebsocketTriggerUrlRunnableArgs
|
|
8
15
|
|
|
9
16
|
|
|
10
17
|
T = TypeVar("T", bound="EditWebsocketTrigger")
|
|
@@ -19,6 +26,9 @@ class EditWebsocketTrigger:
|
|
|
19
26
|
script_path (str):
|
|
20
27
|
is_flow (bool):
|
|
21
28
|
filters (List['EditWebsocketTriggerFiltersItem']):
|
|
29
|
+
initial_messages (List[Union['EditWebsocketTriggerInitialMessagesItemType0',
|
|
30
|
+
'EditWebsocketTriggerInitialMessagesItemType1']]):
|
|
31
|
+
url_runnable_args (EditWebsocketTriggerUrlRunnableArgs):
|
|
22
32
|
"""
|
|
23
33
|
|
|
24
34
|
url: str
|
|
@@ -26,9 +36,17 @@ class EditWebsocketTrigger:
|
|
|
26
36
|
script_path: str
|
|
27
37
|
is_flow: bool
|
|
28
38
|
filters: List["EditWebsocketTriggerFiltersItem"]
|
|
39
|
+
initial_messages: List[
|
|
40
|
+
Union["EditWebsocketTriggerInitialMessagesItemType0", "EditWebsocketTriggerInitialMessagesItemType1"]
|
|
41
|
+
]
|
|
42
|
+
url_runnable_args: "EditWebsocketTriggerUrlRunnableArgs"
|
|
29
43
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
44
|
|
|
31
45
|
def to_dict(self) -> Dict[str, Any]:
|
|
46
|
+
from ..models.edit_websocket_trigger_initial_messages_item_type_0 import (
|
|
47
|
+
EditWebsocketTriggerInitialMessagesItemType0,
|
|
48
|
+
)
|
|
49
|
+
|
|
32
50
|
url = self.url
|
|
33
51
|
path = self.path
|
|
34
52
|
script_path = self.script_path
|
|
@@ -39,6 +57,20 @@ class EditWebsocketTrigger:
|
|
|
39
57
|
|
|
40
58
|
filters.append(filters_item)
|
|
41
59
|
|
|
60
|
+
initial_messages = []
|
|
61
|
+
for initial_messages_item_data in self.initial_messages:
|
|
62
|
+
initial_messages_item: Dict[str, Any]
|
|
63
|
+
|
|
64
|
+
if isinstance(initial_messages_item_data, EditWebsocketTriggerInitialMessagesItemType0):
|
|
65
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
66
|
+
|
|
67
|
+
else:
|
|
68
|
+
initial_messages_item = initial_messages_item_data.to_dict()
|
|
69
|
+
|
|
70
|
+
initial_messages.append(initial_messages_item)
|
|
71
|
+
|
|
72
|
+
url_runnable_args = self.url_runnable_args.to_dict()
|
|
73
|
+
|
|
42
74
|
field_dict: Dict[str, Any] = {}
|
|
43
75
|
field_dict.update(self.additional_properties)
|
|
44
76
|
field_dict.update(
|
|
@@ -48,6 +80,8 @@ class EditWebsocketTrigger:
|
|
|
48
80
|
"script_path": script_path,
|
|
49
81
|
"is_flow": is_flow,
|
|
50
82
|
"filters": filters,
|
|
83
|
+
"initial_messages": initial_messages,
|
|
84
|
+
"url_runnable_args": url_runnable_args,
|
|
51
85
|
}
|
|
52
86
|
)
|
|
53
87
|
|
|
@@ -56,6 +90,13 @@ class EditWebsocketTrigger:
|
|
|
56
90
|
@classmethod
|
|
57
91
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
58
92
|
from ..models.edit_websocket_trigger_filters_item import EditWebsocketTriggerFiltersItem
|
|
93
|
+
from ..models.edit_websocket_trigger_initial_messages_item_type_0 import (
|
|
94
|
+
EditWebsocketTriggerInitialMessagesItemType0,
|
|
95
|
+
)
|
|
96
|
+
from ..models.edit_websocket_trigger_initial_messages_item_type_1 import (
|
|
97
|
+
EditWebsocketTriggerInitialMessagesItemType1,
|
|
98
|
+
)
|
|
99
|
+
from ..models.edit_websocket_trigger_url_runnable_args import EditWebsocketTriggerUrlRunnableArgs
|
|
59
100
|
|
|
60
101
|
d = src_dict.copy()
|
|
61
102
|
url = d.pop("url")
|
|
@@ -73,12 +114,41 @@ class EditWebsocketTrigger:
|
|
|
73
114
|
|
|
74
115
|
filters.append(filters_item)
|
|
75
116
|
|
|
117
|
+
initial_messages = []
|
|
118
|
+
_initial_messages = d.pop("initial_messages")
|
|
119
|
+
for initial_messages_item_data in _initial_messages:
|
|
120
|
+
|
|
121
|
+
def _parse_initial_messages_item(
|
|
122
|
+
data: object,
|
|
123
|
+
) -> Union["EditWebsocketTriggerInitialMessagesItemType0", "EditWebsocketTriggerInitialMessagesItemType1"]:
|
|
124
|
+
try:
|
|
125
|
+
if not isinstance(data, dict):
|
|
126
|
+
raise TypeError()
|
|
127
|
+
initial_messages_item_type_0 = EditWebsocketTriggerInitialMessagesItemType0.from_dict(data)
|
|
128
|
+
|
|
129
|
+
return initial_messages_item_type_0
|
|
130
|
+
except: # noqa: E722
|
|
131
|
+
pass
|
|
132
|
+
if not isinstance(data, dict):
|
|
133
|
+
raise TypeError()
|
|
134
|
+
initial_messages_item_type_1 = EditWebsocketTriggerInitialMessagesItemType1.from_dict(data)
|
|
135
|
+
|
|
136
|
+
return initial_messages_item_type_1
|
|
137
|
+
|
|
138
|
+
initial_messages_item = _parse_initial_messages_item(initial_messages_item_data)
|
|
139
|
+
|
|
140
|
+
initial_messages.append(initial_messages_item)
|
|
141
|
+
|
|
142
|
+
url_runnable_args = EditWebsocketTriggerUrlRunnableArgs.from_dict(d.pop("url_runnable_args"))
|
|
143
|
+
|
|
76
144
|
edit_websocket_trigger = cls(
|
|
77
145
|
url=url,
|
|
78
146
|
path=path,
|
|
79
147
|
script_path=script_path,
|
|
80
148
|
is_flow=is_flow,
|
|
81
149
|
filters=filters,
|
|
150
|
+
initial_messages=initial_messages,
|
|
151
|
+
url_runnable_args=url_runnable_args,
|
|
82
152
|
)
|
|
83
153
|
|
|
84
154
|
edit_websocket_trigger.additional_properties = d
|
|
@@ -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="EditWebsocketTriggerInitialMessagesItemType0")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class EditWebsocketTriggerInitialMessagesItemType0:
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
raw_message (str):
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
raw_message: str
|
|
17
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
18
|
+
|
|
19
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
20
|
+
raw_message = self.raw_message
|
|
21
|
+
|
|
22
|
+
field_dict: Dict[str, Any] = {}
|
|
23
|
+
field_dict.update(self.additional_properties)
|
|
24
|
+
field_dict.update(
|
|
25
|
+
{
|
|
26
|
+
"raw_message": raw_message,
|
|
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
|
+
raw_message = d.pop("raw_message")
|
|
36
|
+
|
|
37
|
+
edit_websocket_trigger_initial_messages_item_type_0 = cls(
|
|
38
|
+
raw_message=raw_message,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
edit_websocket_trigger_initial_messages_item_type_0.additional_properties = d
|
|
42
|
+
return edit_websocket_trigger_initial_messages_item_type_0
|
|
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
|