windmill-api 1.543.0__py3-none-any.whl → 1.544.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 (46) hide show
  1. windmill_api/api/job/{openai_sync_flow_by_path.py → run_dynamic_select.py} +10 -51
  2. windmill_api/api/job/run_wait_result_flow_by_path.py +9 -0
  3. windmill_api/api/job/run_wait_result_script_by_path.py +9 -0
  4. windmill_api/api/job/run_wait_result_script_by_path_get.py +9 -0
  5. windmill_api/models/ai_config.py +18 -0
  6. windmill_api/models/ai_config_max_tokens_per_model.py +44 -0
  7. windmill_api/models/create_gcp_trigger_json_body.py +9 -0
  8. windmill_api/models/dynamic_input_data.py +118 -0
  9. windmill_api/models/{openai_sync_flow_by_path_json_body.py → dynamic_input_data_args.py} +6 -6
  10. windmill_api/models/dynamic_input_data_runnable_ref_type_0.py +76 -0
  11. windmill_api/models/dynamic_input_data_runnable_ref_type_0_runnable_kind.py +9 -0
  12. windmill_api/models/dynamic_input_data_runnable_ref_type_0_source.py +8 -0
  13. windmill_api/models/dynamic_input_data_runnable_ref_type_1.py +85 -0
  14. windmill_api/models/dynamic_input_data_runnable_ref_type_1_language.py +29 -0
  15. windmill_api/models/dynamic_input_data_runnable_ref_type_1_source.py +8 -0
  16. windmill_api/models/edit_copilot_config_json_body.py +20 -0
  17. windmill_api/models/edit_copilot_config_json_body_max_tokens_per_model.py +44 -0
  18. windmill_api/models/edit_large_file_storage_config_json_body_large_file_storage.py +33 -0
  19. windmill_api/models/edit_large_file_storage_config_json_body_large_file_storage_advanced_permissions_item.py +65 -0
  20. windmill_api/models/gcp_trigger_data.py +9 -0
  21. windmill_api/models/get_copilot_info_response_200.py +20 -0
  22. windmill_api/models/get_copilot_info_response_200_max_tokens_per_model.py +44 -0
  23. windmill_api/models/get_large_file_storage_config_response_200.py +28 -0
  24. windmill_api/models/get_large_file_storage_config_response_200_advanced_permissions_item.py +65 -0
  25. windmill_api/models/get_runnable_response_200.py +0 -7
  26. windmill_api/models/get_settings_response_200_ai_config.py +22 -0
  27. windmill_api/models/get_settings_response_200_ai_config_max_tokens_per_model.py +44 -0
  28. windmill_api/models/get_settings_response_200_large_file_storage.py +28 -0
  29. windmill_api/models/get_settings_response_200_large_file_storage_advanced_permissions_item.py +65 -0
  30. windmill_api/models/large_file_storage.py +24 -0
  31. windmill_api/models/large_file_storage_advanced_permissions_item.py +65 -0
  32. windmill_api/models/run_dynamic_select_json_body.py +118 -0
  33. windmill_api/models/{openai_sync_script_by_path_json_body.py → run_dynamic_select_json_body_args.py} +6 -6
  34. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_0.py +80 -0
  35. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_0_runnable_kind.py +9 -0
  36. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_0_source.py +8 -0
  37. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_1.py +89 -0
  38. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_1_language.py +29 -0
  39. windmill_api/models/run_dynamic_select_json_body_runnable_ref_type_1_source.py +8 -0
  40. windmill_api/models/s3_permission_rule.py +65 -0
  41. windmill_api/models/update_gcp_trigger_json_body.py +9 -0
  42. {windmill_api-1.543.0.dist-info → windmill_api-1.544.1.dist-info}/METADATA +1 -1
  43. {windmill_api-1.543.0.dist-info → windmill_api-1.544.1.dist-info}/RECORD +45 -23
  44. windmill_api/api/job/openai_sync_script_by_path.py +0 -155
  45. {windmill_api-1.543.0.dist-info → windmill_api-1.544.1.dist-info}/LICENSE +0 -0
  46. {windmill_api-1.543.0.dist-info → windmill_api-1.544.1.dist-info}/WHEEL +0 -0
@@ -5,46 +5,29 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.openai_sync_flow_by_path_json_body import OpenaiSyncFlowByPathJsonBody
9
- from ...types import UNSET, Response, Unset
8
+ from ...models.run_dynamic_select_json_body import RunDynamicSelectJsonBody
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  workspace: str,
14
- path: str,
15
14
  *,
16
- json_body: OpenaiSyncFlowByPathJsonBody,
17
- include_header: Union[Unset, None, str] = UNSET,
18
- queue_limit: Union[Unset, None, str] = UNSET,
19
- job_id: Union[Unset, None, str] = UNSET,
15
+ json_body: RunDynamicSelectJsonBody,
20
16
  ) -> Dict[str, Any]:
21
17
  pass
22
18
 
23
- params: Dict[str, Any] = {}
24
- params["include_header"] = include_header
25
-
26
- params["queue_limit"] = queue_limit
27
-
28
- params["job_id"] = job_id
29
-
30
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
31
-
32
19
  json_json_body = json_body.to_dict()
33
20
 
34
21
  return {
35
22
  "method": "post",
36
- "url": "/w/{workspace}/jobs/openai_sync/f/{path}".format(
23
+ "url": "/w/{workspace}/jobs/run/dynamic_select".format(
37
24
  workspace=workspace,
38
- path=path,
39
25
  ),
40
26
  "json": json_json_body,
41
- "params": params,
42
27
  }
43
28
 
44
29
 
45
30
  def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
46
- if response.status_code == HTTPStatus.OK:
47
- return None
48
31
  if client.raise_on_unexpected_status:
49
32
  raise errors.UnexpectedStatus(response.status_code, response.content)
50
33
  else:
@@ -62,23 +45,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
62
45
 
63
46
  def sync_detailed(
64
47
  workspace: str,
65
- path: str,
66
48
  *,
67
49
  client: Union[AuthenticatedClient, Client],
68
- json_body: OpenaiSyncFlowByPathJsonBody,
69
- include_header: Union[Unset, None, str] = UNSET,
70
- queue_limit: Union[Unset, None, str] = UNSET,
71
- job_id: Union[Unset, None, str] = UNSET,
50
+ json_body: RunDynamicSelectJsonBody,
72
51
  ) -> Response[Any]:
73
- """run flow by path and wait until completion in openai format
52
+ """run dynamic select helper function
74
53
 
75
54
  Args:
76
55
  workspace (str):
77
- path (str):
78
- include_header (Union[Unset, None, str]):
79
- queue_limit (Union[Unset, None, str]):
80
- job_id (Union[Unset, None, str]):
81
- json_body (OpenaiSyncFlowByPathJsonBody): The arguments to pass to the script or flow
56
+ json_body (RunDynamicSelectJsonBody):
82
57
 
83
58
  Raises:
84
59
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -90,11 +65,7 @@ def sync_detailed(
90
65
 
91
66
  kwargs = _get_kwargs(
92
67
  workspace=workspace,
93
- path=path,
94
68
  json_body=json_body,
95
- include_header=include_header,
96
- queue_limit=queue_limit,
97
- job_id=job_id,
98
69
  )
99
70
 
100
71
  response = client.get_httpx_client().request(
@@ -106,23 +77,15 @@ def sync_detailed(
106
77
 
107
78
  async def asyncio_detailed(
108
79
  workspace: str,
109
- path: str,
110
80
  *,
111
81
  client: Union[AuthenticatedClient, Client],
112
- json_body: OpenaiSyncFlowByPathJsonBody,
113
- include_header: Union[Unset, None, str] = UNSET,
114
- queue_limit: Union[Unset, None, str] = UNSET,
115
- job_id: Union[Unset, None, str] = UNSET,
82
+ json_body: RunDynamicSelectJsonBody,
116
83
  ) -> Response[Any]:
117
- """run flow by path and wait until completion in openai format
84
+ """run dynamic select helper function
118
85
 
119
86
  Args:
120
87
  workspace (str):
121
- path (str):
122
- include_header (Union[Unset, None, str]):
123
- queue_limit (Union[Unset, None, str]):
124
- job_id (Union[Unset, None, str]):
125
- json_body (OpenaiSyncFlowByPathJsonBody): The arguments to pass to the script or flow
88
+ json_body (RunDynamicSelectJsonBody):
126
89
 
127
90
  Raises:
128
91
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -134,11 +97,7 @@ async def asyncio_detailed(
134
97
 
135
98
  kwargs = _get_kwargs(
136
99
  workspace=workspace,
137
- path=path,
138
100
  json_body=json_body,
139
- include_header=include_header,
140
- queue_limit=queue_limit,
141
- job_id=job_id,
142
101
  )
143
102
 
144
103
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -17,6 +17,7 @@ def _get_kwargs(
17
17
  include_header: Union[Unset, None, str] = UNSET,
18
18
  queue_limit: Union[Unset, None, str] = UNSET,
19
19
  job_id: Union[Unset, None, str] = UNSET,
20
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
20
21
  ) -> Dict[str, Any]:
21
22
  pass
22
23
 
@@ -27,6 +28,8 @@ def _get_kwargs(
27
28
 
28
29
  params["job_id"] = job_id
29
30
 
31
+ params["skip_preprocessor"] = skip_preprocessor
32
+
30
33
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
31
34
 
32
35
  json_json_body = json_body.to_dict()
@@ -69,6 +72,7 @@ def sync_detailed(
69
72
  include_header: Union[Unset, None, str] = UNSET,
70
73
  queue_limit: Union[Unset, None, str] = UNSET,
71
74
  job_id: Union[Unset, None, str] = UNSET,
75
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
72
76
  ) -> Response[Any]:
73
77
  """run flow by path and wait until completion
74
78
 
@@ -78,6 +82,7 @@ def sync_detailed(
78
82
  include_header (Union[Unset, None, str]):
79
83
  queue_limit (Union[Unset, None, str]):
80
84
  job_id (Union[Unset, None, str]):
85
+ skip_preprocessor (Union[Unset, None, bool]):
81
86
  json_body (RunWaitResultFlowByPathJsonBody): The arguments to pass to the script or flow
82
87
 
83
88
  Raises:
@@ -95,6 +100,7 @@ def sync_detailed(
95
100
  include_header=include_header,
96
101
  queue_limit=queue_limit,
97
102
  job_id=job_id,
103
+ skip_preprocessor=skip_preprocessor,
98
104
  )
99
105
 
100
106
  response = client.get_httpx_client().request(
@@ -113,6 +119,7 @@ async def asyncio_detailed(
113
119
  include_header: Union[Unset, None, str] = UNSET,
114
120
  queue_limit: Union[Unset, None, str] = UNSET,
115
121
  job_id: Union[Unset, None, str] = UNSET,
122
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
116
123
  ) -> Response[Any]:
117
124
  """run flow by path and wait until completion
118
125
 
@@ -122,6 +129,7 @@ async def asyncio_detailed(
122
129
  include_header (Union[Unset, None, str]):
123
130
  queue_limit (Union[Unset, None, str]):
124
131
  job_id (Union[Unset, None, str]):
132
+ skip_preprocessor (Union[Unset, None, bool]):
125
133
  json_body (RunWaitResultFlowByPathJsonBody): The arguments to pass to the script or flow
126
134
 
127
135
  Raises:
@@ -139,6 +147,7 @@ async def asyncio_detailed(
139
147
  include_header=include_header,
140
148
  queue_limit=queue_limit,
141
149
  job_id=job_id,
150
+ skip_preprocessor=skip_preprocessor,
142
151
  )
143
152
 
144
153
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -20,6 +20,7 @@ def _get_kwargs(
20
20
  job_id: Union[Unset, None, str] = UNSET,
21
21
  include_header: Union[Unset, None, str] = UNSET,
22
22
  queue_limit: Union[Unset, None, str] = UNSET,
23
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
23
24
  ) -> Dict[str, Any]:
24
25
  pass
25
26
 
@@ -36,6 +37,8 @@ def _get_kwargs(
36
37
 
37
38
  params["queue_limit"] = queue_limit
38
39
 
40
+ params["skip_preprocessor"] = skip_preprocessor
41
+
39
42
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
40
43
 
41
44
  json_json_body = json_body.to_dict()
@@ -81,6 +84,7 @@ def sync_detailed(
81
84
  job_id: Union[Unset, None, str] = UNSET,
82
85
  include_header: Union[Unset, None, str] = UNSET,
83
86
  queue_limit: Union[Unset, None, str] = UNSET,
87
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
84
88
  ) -> Response[Any]:
85
89
  """run script by path
86
90
 
@@ -93,6 +97,7 @@ def sync_detailed(
93
97
  job_id (Union[Unset, None, str]):
94
98
  include_header (Union[Unset, None, str]):
95
99
  queue_limit (Union[Unset, None, str]):
100
+ skip_preprocessor (Union[Unset, None, bool]):
96
101
  json_body (RunWaitResultScriptByPathJsonBody): The arguments to pass to the script or flow
97
102
 
98
103
  Raises:
@@ -113,6 +118,7 @@ def sync_detailed(
113
118
  job_id=job_id,
114
119
  include_header=include_header,
115
120
  queue_limit=queue_limit,
121
+ skip_preprocessor=skip_preprocessor,
116
122
  )
117
123
 
118
124
  response = client.get_httpx_client().request(
@@ -134,6 +140,7 @@ async def asyncio_detailed(
134
140
  job_id: Union[Unset, None, str] = UNSET,
135
141
  include_header: Union[Unset, None, str] = UNSET,
136
142
  queue_limit: Union[Unset, None, str] = UNSET,
143
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
137
144
  ) -> Response[Any]:
138
145
  """run script by path
139
146
 
@@ -146,6 +153,7 @@ async def asyncio_detailed(
146
153
  job_id (Union[Unset, None, str]):
147
154
  include_header (Union[Unset, None, str]):
148
155
  queue_limit (Union[Unset, None, str]):
156
+ skip_preprocessor (Union[Unset, None, bool]):
149
157
  json_body (RunWaitResultScriptByPathJsonBody): The arguments to pass to the script or flow
150
158
 
151
159
  Raises:
@@ -166,6 +174,7 @@ async def asyncio_detailed(
166
174
  job_id=job_id,
167
175
  include_header=include_header,
168
176
  queue_limit=queue_limit,
177
+ skip_preprocessor=skip_preprocessor,
169
178
  )
170
179
 
171
180
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -19,6 +19,7 @@ def _get_kwargs(
19
19
  include_header: Union[Unset, None, str] = UNSET,
20
20
  queue_limit: Union[Unset, None, str] = UNSET,
21
21
  payload: Union[Unset, None, str] = UNSET,
22
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
22
23
  ) -> Dict[str, Any]:
23
24
  pass
24
25
 
@@ -37,6 +38,8 @@ def _get_kwargs(
37
38
 
38
39
  params["payload"] = payload
39
40
 
41
+ params["skip_preprocessor"] = skip_preprocessor
42
+
40
43
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
41
44
 
42
45
  return {
@@ -79,6 +82,7 @@ def sync_detailed(
79
82
  include_header: Union[Unset, None, str] = UNSET,
80
83
  queue_limit: Union[Unset, None, str] = UNSET,
81
84
  payload: Union[Unset, None, str] = UNSET,
85
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
82
86
  ) -> Response[Any]:
83
87
  """run script by path with get
84
88
 
@@ -92,6 +96,7 @@ def sync_detailed(
92
96
  include_header (Union[Unset, None, str]):
93
97
  queue_limit (Union[Unset, None, str]):
94
98
  payload (Union[Unset, None, str]):
99
+ skip_preprocessor (Union[Unset, None, bool]):
95
100
 
96
101
  Raises:
97
102
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -111,6 +116,7 @@ def sync_detailed(
111
116
  include_header=include_header,
112
117
  queue_limit=queue_limit,
113
118
  payload=payload,
119
+ skip_preprocessor=skip_preprocessor,
114
120
  )
115
121
 
116
122
  response = client.get_httpx_client().request(
@@ -132,6 +138,7 @@ async def asyncio_detailed(
132
138
  include_header: Union[Unset, None, str] = UNSET,
133
139
  queue_limit: Union[Unset, None, str] = UNSET,
134
140
  payload: Union[Unset, None, str] = UNSET,
141
+ skip_preprocessor: Union[Unset, None, bool] = UNSET,
135
142
  ) -> Response[Any]:
136
143
  """run script by path with get
137
144
 
@@ -145,6 +152,7 @@ async def asyncio_detailed(
145
152
  include_header (Union[Unset, None, str]):
146
153
  queue_limit (Union[Unset, None, str]):
147
154
  payload (Union[Unset, None, str]):
155
+ skip_preprocessor (Union[Unset, None, bool]):
148
156
 
149
157
  Raises:
150
158
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -164,6 +172,7 @@ async def asyncio_detailed(
164
172
  include_header=include_header,
165
173
  queue_limit=queue_limit,
166
174
  payload=payload,
175
+ skip_preprocessor=skip_preprocessor,
167
176
  )
168
177
 
169
178
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -9,6 +9,7 @@ if TYPE_CHECKING:
9
9
  from ..models.ai_config_code_completion_model import AIConfigCodeCompletionModel
10
10
  from ..models.ai_config_custom_prompts import AIConfigCustomPrompts
11
11
  from ..models.ai_config_default_model import AIConfigDefaultModel
12
+ from ..models.ai_config_max_tokens_per_model import AIConfigMaxTokensPerModel
12
13
  from ..models.ai_config_providers import AIConfigProviders
13
14
 
14
15
 
@@ -23,12 +24,14 @@ class AIConfig:
23
24
  default_model (Union[Unset, AIConfigDefaultModel]):
24
25
  code_completion_model (Union[Unset, AIConfigCodeCompletionModel]):
25
26
  custom_prompts (Union[Unset, AIConfigCustomPrompts]):
27
+ max_tokens_per_model (Union[Unset, AIConfigMaxTokensPerModel]):
26
28
  """
27
29
 
28
30
  providers: Union[Unset, "AIConfigProviders"] = UNSET
29
31
  default_model: Union[Unset, "AIConfigDefaultModel"] = UNSET
30
32
  code_completion_model: Union[Unset, "AIConfigCodeCompletionModel"] = UNSET
31
33
  custom_prompts: Union[Unset, "AIConfigCustomPrompts"] = UNSET
34
+ max_tokens_per_model: Union[Unset, "AIConfigMaxTokensPerModel"] = UNSET
32
35
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
33
36
 
34
37
  def to_dict(self) -> Dict[str, Any]:
@@ -48,6 +51,10 @@ class AIConfig:
48
51
  if not isinstance(self.custom_prompts, Unset):
49
52
  custom_prompts = self.custom_prompts.to_dict()
50
53
 
54
+ max_tokens_per_model: Union[Unset, Dict[str, Any]] = UNSET
55
+ if not isinstance(self.max_tokens_per_model, Unset):
56
+ max_tokens_per_model = self.max_tokens_per_model.to_dict()
57
+
51
58
  field_dict: Dict[str, Any] = {}
52
59
  field_dict.update(self.additional_properties)
53
60
  field_dict.update({})
@@ -59,6 +66,8 @@ class AIConfig:
59
66
  field_dict["code_completion_model"] = code_completion_model
60
67
  if custom_prompts is not UNSET:
61
68
  field_dict["custom_prompts"] = custom_prompts
69
+ if max_tokens_per_model is not UNSET:
70
+ field_dict["max_tokens_per_model"] = max_tokens_per_model
62
71
 
63
72
  return field_dict
64
73
 
@@ -67,6 +76,7 @@ class AIConfig:
67
76
  from ..models.ai_config_code_completion_model import AIConfigCodeCompletionModel
68
77
  from ..models.ai_config_custom_prompts import AIConfigCustomPrompts
69
78
  from ..models.ai_config_default_model import AIConfigDefaultModel
79
+ from ..models.ai_config_max_tokens_per_model import AIConfigMaxTokensPerModel
70
80
  from ..models.ai_config_providers import AIConfigProviders
71
81
 
72
82
  d = src_dict.copy()
@@ -98,11 +108,19 @@ class AIConfig:
98
108
  else:
99
109
  custom_prompts = AIConfigCustomPrompts.from_dict(_custom_prompts)
100
110
 
111
+ _max_tokens_per_model = d.pop("max_tokens_per_model", UNSET)
112
+ max_tokens_per_model: Union[Unset, AIConfigMaxTokensPerModel]
113
+ if isinstance(_max_tokens_per_model, Unset):
114
+ max_tokens_per_model = UNSET
115
+ else:
116
+ max_tokens_per_model = AIConfigMaxTokensPerModel.from_dict(_max_tokens_per_model)
117
+
101
118
  ai_config = cls(
102
119
  providers=providers,
103
120
  default_model=default_model,
104
121
  code_completion_model=code_completion_model,
105
122
  custom_prompts=custom_prompts,
123
+ max_tokens_per_model=max_tokens_per_model,
106
124
  )
107
125
 
108
126
  ai_config.additional_properties = d
@@ -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="AIConfigMaxTokensPerModel")
7
+
8
+
9
+ @_attrs_define
10
+ class AIConfigMaxTokensPerModel:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, int] = _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
+ ai_config_max_tokens_per_model = cls()
26
+
27
+ ai_config_max_tokens_per_model.additional_properties = d
28
+ return ai_config_max_tokens_per_model
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> int:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: int) -> 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
@@ -33,6 +33,8 @@ class CreateGcpTriggerJsonBody:
33
33
  delivery_config (Union[Unset, CreateGcpTriggerJsonBodyDeliveryConfig]):
34
34
  enabled (Union[Unset, bool]):
35
35
  auto_acknowledge_msg (Union[Unset, bool]):
36
+ ack_deadline (Union[Unset, int]): Time in seconds within which the message must be acknowledged. If not
37
+ provided, defaults to the subscription's acknowledgment deadline (600 seconds).
36
38
  error_handler_path (Union[Unset, str]):
37
39
  error_handler_args (Union[Unset, CreateGcpTriggerJsonBodyErrorHandlerArgs]): The arguments to pass to the script
38
40
  or flow
@@ -51,6 +53,7 @@ class CreateGcpTriggerJsonBody:
51
53
  delivery_config: Union[Unset, "CreateGcpTriggerJsonBodyDeliveryConfig"] = UNSET
52
54
  enabled: Union[Unset, bool] = UNSET
53
55
  auto_acknowledge_msg: Union[Unset, bool] = UNSET
56
+ ack_deadline: Union[Unset, int] = UNSET
54
57
  error_handler_path: Union[Unset, str] = UNSET
55
58
  error_handler_args: Union[Unset, "CreateGcpTriggerJsonBodyErrorHandlerArgs"] = UNSET
56
59
  retry: Union[Unset, "CreateGcpTriggerJsonBodyRetry"] = UNSET
@@ -76,6 +79,7 @@ class CreateGcpTriggerJsonBody:
76
79
 
77
80
  enabled = self.enabled
78
81
  auto_acknowledge_msg = self.auto_acknowledge_msg
82
+ ack_deadline = self.ack_deadline
79
83
  error_handler_path = self.error_handler_path
80
84
  error_handler_args: Union[Unset, Dict[str, Any]] = UNSET
81
85
  if not isinstance(self.error_handler_args, Unset):
@@ -109,6 +113,8 @@ class CreateGcpTriggerJsonBody:
109
113
  field_dict["enabled"] = enabled
110
114
  if auto_acknowledge_msg is not UNSET:
111
115
  field_dict["auto_acknowledge_msg"] = auto_acknowledge_msg
116
+ if ack_deadline is not UNSET:
117
+ field_dict["ack_deadline"] = ack_deadline
112
118
  if error_handler_path is not UNSET:
113
119
  field_dict["error_handler_path"] = error_handler_path
114
120
  if error_handler_args is not UNSET:
@@ -159,6 +165,8 @@ class CreateGcpTriggerJsonBody:
159
165
 
160
166
  auto_acknowledge_msg = d.pop("auto_acknowledge_msg", UNSET)
161
167
 
168
+ ack_deadline = d.pop("ack_deadline", UNSET)
169
+
162
170
  error_handler_path = d.pop("error_handler_path", UNSET)
163
171
 
164
172
  _error_handler_args = d.pop("error_handler_args", UNSET)
@@ -188,6 +196,7 @@ class CreateGcpTriggerJsonBody:
188
196
  delivery_config=delivery_config,
189
197
  enabled=enabled,
190
198
  auto_acknowledge_msg=auto_acknowledge_msg,
199
+ ack_deadline=ack_deadline,
191
200
  error_handler_path=error_handler_path,
192
201
  error_handler_args=error_handler_args,
193
202
  retry=retry,
@@ -0,0 +1,118 @@
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.dynamic_input_data_args import DynamicInputDataArgs
10
+ from ..models.dynamic_input_data_runnable_ref_type_0 import DynamicInputDataRunnableRefType0
11
+ from ..models.dynamic_input_data_runnable_ref_type_1 import DynamicInputDataRunnableRefType1
12
+
13
+
14
+ T = TypeVar("T", bound="DynamicInputData")
15
+
16
+
17
+ @_attrs_define
18
+ class DynamicInputData:
19
+ """
20
+ Attributes:
21
+ entrypoint_function (str): Name of the function to execute for dynamic select
22
+ runnable_ref (Union['DynamicInputDataRunnableRefType0', 'DynamicInputDataRunnableRefType1']):
23
+ args (Union[Unset, DynamicInputDataArgs]): Arguments to pass to the function
24
+ """
25
+
26
+ entrypoint_function: str
27
+ runnable_ref: Union["DynamicInputDataRunnableRefType0", "DynamicInputDataRunnableRefType1"]
28
+ args: Union[Unset, "DynamicInputDataArgs"] = UNSET
29
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> Dict[str, Any]:
32
+ from ..models.dynamic_input_data_runnable_ref_type_0 import DynamicInputDataRunnableRefType0
33
+
34
+ entrypoint_function = self.entrypoint_function
35
+ runnable_ref: Dict[str, Any]
36
+
37
+ if isinstance(self.runnable_ref, DynamicInputDataRunnableRefType0):
38
+ runnable_ref = self.runnable_ref.to_dict()
39
+
40
+ else:
41
+ runnable_ref = self.runnable_ref.to_dict()
42
+
43
+ args: Union[Unset, Dict[str, Any]] = UNSET
44
+ if not isinstance(self.args, Unset):
45
+ args = self.args.to_dict()
46
+
47
+ field_dict: Dict[str, Any] = {}
48
+ field_dict.update(self.additional_properties)
49
+ field_dict.update(
50
+ {
51
+ "entrypoint_function": entrypoint_function,
52
+ "runnable_ref": runnable_ref,
53
+ }
54
+ )
55
+ if args is not UNSET:
56
+ field_dict["args"] = args
57
+
58
+ return field_dict
59
+
60
+ @classmethod
61
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
62
+ from ..models.dynamic_input_data_args import DynamicInputDataArgs
63
+ from ..models.dynamic_input_data_runnable_ref_type_0 import DynamicInputDataRunnableRefType0
64
+ from ..models.dynamic_input_data_runnable_ref_type_1 import DynamicInputDataRunnableRefType1
65
+
66
+ d = src_dict.copy()
67
+ entrypoint_function = d.pop("entrypoint_function")
68
+
69
+ def _parse_runnable_ref(
70
+ data: object,
71
+ ) -> Union["DynamicInputDataRunnableRefType0", "DynamicInputDataRunnableRefType1"]:
72
+ try:
73
+ if not isinstance(data, dict):
74
+ raise TypeError()
75
+ runnable_ref_type_0 = DynamicInputDataRunnableRefType0.from_dict(data)
76
+
77
+ return runnable_ref_type_0
78
+ except: # noqa: E722
79
+ pass
80
+ if not isinstance(data, dict):
81
+ raise TypeError()
82
+ runnable_ref_type_1 = DynamicInputDataRunnableRefType1.from_dict(data)
83
+
84
+ return runnable_ref_type_1
85
+
86
+ runnable_ref = _parse_runnable_ref(d.pop("runnable_ref"))
87
+
88
+ _args = d.pop("args", UNSET)
89
+ args: Union[Unset, DynamicInputDataArgs]
90
+ if isinstance(_args, Unset):
91
+ args = UNSET
92
+ else:
93
+ args = DynamicInputDataArgs.from_dict(_args)
94
+
95
+ dynamic_input_data = cls(
96
+ entrypoint_function=entrypoint_function,
97
+ runnable_ref=runnable_ref,
98
+ args=args,
99
+ )
100
+
101
+ dynamic_input_data.additional_properties = d
102
+ return dynamic_input_data
103
+
104
+ @property
105
+ def additional_keys(self) -> List[str]:
106
+ return list(self.additional_properties.keys())
107
+
108
+ def __getitem__(self, key: str) -> Any:
109
+ return self.additional_properties[key]
110
+
111
+ def __setitem__(self, key: str, value: Any) -> None:
112
+ self.additional_properties[key] = value
113
+
114
+ def __delitem__(self, key: str) -> None:
115
+ del self.additional_properties[key]
116
+
117
+ def __contains__(self, key: str) -> bool:
118
+ return key in self.additional_properties
@@ -3,12 +3,12 @@ from typing import Any, Dict, List, Type, TypeVar
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
- T = TypeVar("T", bound="OpenaiSyncFlowByPathJsonBody")
6
+ T = TypeVar("T", bound="DynamicInputDataArgs")
7
7
 
8
8
 
9
9
  @_attrs_define
10
- class OpenaiSyncFlowByPathJsonBody:
11
- """The arguments to pass to the script or flow"""
10
+ class DynamicInputDataArgs:
11
+ """Arguments to pass to the function"""
12
12
 
13
13
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
14
14
 
@@ -22,10 +22,10 @@ class OpenaiSyncFlowByPathJsonBody:
22
22
  @classmethod
23
23
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
24
24
  d = src_dict.copy()
25
- openai_sync_flow_by_path_json_body = cls()
25
+ dynamic_input_data_args = cls()
26
26
 
27
- openai_sync_flow_by_path_json_body.additional_properties = d
28
- return openai_sync_flow_by_path_json_body
27
+ dynamic_input_data_args.additional_properties = d
28
+ return dynamic_input_data_args
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> List[str]: