windmill-api 1.423.2__py3-none-any.whl → 1.425.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.

Files changed (27) hide show
  1. windmill_api/api/job/count_completed_jobs.py +211 -0
  2. windmill_api/api/setting/workspace_acknowledge_all_critical_alerts.py +146 -0
  3. windmill_api/api/setting/workspace_acknowledge_critical_alert.py +160 -0
  4. windmill_api/api/setting/workspace_get_critical_alerts.py +219 -0
  5. windmill_api/api/setting/workspace_mute_critical_alerts_ui.py +164 -0
  6. windmill_api/api/user/set_login_type_for_user.py +105 -0
  7. windmill_api/api/user/set_password_for_user.py +105 -0
  8. windmill_api/api/worker/get_counts_of_jobs_waiting_per_tag.py +126 -0
  9. windmill_api/models/ai_resource.py +65 -0
  10. windmill_api/models/audit_log_operation.py +1 -1
  11. windmill_api/models/critical_alert.py +8 -0
  12. windmill_api/models/edit_copilot_config_json_body.py +21 -8
  13. windmill_api/models/edit_copilot_config_json_body_ai_resource.py +65 -0
  14. windmill_api/models/get_audit_log_response_200_operation.py +1 -1
  15. windmill_api/models/get_counts_of_jobs_waiting_per_tag_response_200.py +44 -0
  16. windmill_api/models/get_critical_alerts_response_200_item.py +8 -0
  17. windmill_api/models/get_settings_response_200.py +26 -7
  18. windmill_api/models/get_settings_response_200_ai_resource.py +65 -0
  19. windmill_api/models/list_audit_logs_response_200_item_operation.py +1 -1
  20. windmill_api/models/set_login_type_for_user_json_body.py +58 -0
  21. windmill_api/models/set_password_for_user_json_body.py +58 -0
  22. windmill_api/models/workspace_get_critical_alerts_response_200_item.py +109 -0
  23. windmill_api/models/workspace_mute_critical_alerts_ui_json_body.py +58 -0
  24. {windmill_api-1.423.2.dist-info → windmill_api-1.425.0.dist-info}/METADATA +1 -1
  25. {windmill_api-1.423.2.dist-info → windmill_api-1.425.0.dist-info}/RECORD +27 -11
  26. {windmill_api-1.423.2.dist-info → windmill_api-1.425.0.dist-info}/LICENSE +0 -0
  27. {windmill_api-1.423.2.dist-info → windmill_api-1.425.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,126 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.get_counts_of_jobs_waiting_per_tag_response_200 import GetCountsOfJobsWaitingPerTagResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> Dict[str, Any]:
13
+ pass
14
+
15
+ return {
16
+ "method": "get",
17
+ "url": "/workers/queue_counts",
18
+ }
19
+
20
+
21
+ def _parse_response(
22
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
+ ) -> Optional[GetCountsOfJobsWaitingPerTagResponse200]:
24
+ if response.status_code == HTTPStatus.OK:
25
+ response_200 = GetCountsOfJobsWaitingPerTagResponse200.from_dict(response.json())
26
+
27
+ return response_200
28
+ if client.raise_on_unexpected_status:
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+ else:
31
+ return None
32
+
33
+
34
+ def _build_response(
35
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
+ ) -> Response[GetCountsOfJobsWaitingPerTagResponse200]:
37
+ return Response(
38
+ status_code=HTTPStatus(response.status_code),
39
+ content=response.content,
40
+ headers=response.headers,
41
+ parsed=_parse_response(client=client, response=response),
42
+ )
43
+
44
+
45
+ def sync_detailed(
46
+ *,
47
+ client: Union[AuthenticatedClient, Client],
48
+ ) -> Response[GetCountsOfJobsWaitingPerTagResponse200]:
49
+ """get counts of jobs waiting for an executor per tag
50
+
51
+ Raises:
52
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
53
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
54
+
55
+ Returns:
56
+ Response[GetCountsOfJobsWaitingPerTagResponse200]
57
+ """
58
+
59
+ kwargs = _get_kwargs()
60
+
61
+ response = client.get_httpx_client().request(
62
+ **kwargs,
63
+ )
64
+
65
+ return _build_response(client=client, response=response)
66
+
67
+
68
+ def sync(
69
+ *,
70
+ client: Union[AuthenticatedClient, Client],
71
+ ) -> Optional[GetCountsOfJobsWaitingPerTagResponse200]:
72
+ """get counts of jobs waiting for an executor per tag
73
+
74
+ Raises:
75
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
76
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
77
+
78
+ Returns:
79
+ GetCountsOfJobsWaitingPerTagResponse200
80
+ """
81
+
82
+ return sync_detailed(
83
+ client=client,
84
+ ).parsed
85
+
86
+
87
+ async def asyncio_detailed(
88
+ *,
89
+ client: Union[AuthenticatedClient, Client],
90
+ ) -> Response[GetCountsOfJobsWaitingPerTagResponse200]:
91
+ """get counts of jobs waiting for an executor per tag
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ Response[GetCountsOfJobsWaitingPerTagResponse200]
99
+ """
100
+
101
+ kwargs = _get_kwargs()
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
106
+
107
+
108
+ async def asyncio(
109
+ *,
110
+ client: Union[AuthenticatedClient, Client],
111
+ ) -> Optional[GetCountsOfJobsWaitingPerTagResponse200]:
112
+ """get counts of jobs waiting for an executor per tag
113
+
114
+ Raises:
115
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
116
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
117
+
118
+ Returns:
119
+ GetCountsOfJobsWaitingPerTagResponse200
120
+ """
121
+
122
+ return (
123
+ await asyncio_detailed(
124
+ client=client,
125
+ )
126
+ ).parsed
@@ -0,0 +1,65 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="AiResource")
7
+
8
+
9
+ @_attrs_define
10
+ class AiResource:
11
+ """
12
+ Attributes:
13
+ path (str):
14
+ provider (str):
15
+ """
16
+
17
+ path: str
18
+ provider: str
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ path = self.path
23
+ provider = self.provider
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "path": path,
30
+ "provider": provider,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ path = d.pop("path")
40
+
41
+ provider = d.pop("provider")
42
+
43
+ ai_resource = cls(
44
+ path=path,
45
+ provider=provider,
46
+ )
47
+
48
+ ai_resource.additional_properties = d
49
+ return ai_resource
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties
@@ -3,6 +3,7 @@ from enum import Enum
3
3
 
4
4
  class AuditLogOperation(str, Enum):
5
5
  ACCOUNT_DELETE = "account.delete"
6
+ AI_REQUEST = "ai.request"
6
7
  APPS_CREATE = "apps.create"
7
8
  APPS_DELETE = "apps.delete"
8
9
  APPS_UPDATE = "apps.update"
@@ -42,7 +43,6 @@ class AuditLogOperation(str, Enum):
42
43
  OAUTH_LOGIN = "oauth.login"
43
44
  OAUTH_LOGIN_FAILURE = "oauth.login_failure"
44
45
  OAUTH_SIGNUP = "oauth.signup"
45
- OPENAI_REQUEST = "openai.request"
46
46
  RESOURCES_CREATE = "resources.create"
47
47
  RESOURCES_DELETE = "resources.delete"
48
48
  RESOURCES_UPDATE = "resources.update"
@@ -20,6 +20,7 @@ class CriticalAlert:
20
20
  created_at (Union[Unset, datetime.datetime]): Time when the alert was created
21
21
  acknowledged (Union[Unset, None, bool]): Acknowledgment status of the alert, can be true, false, or null if not
22
22
  set
23
+ workspace_id (Union[Unset, None, str]): Workspace id if the alert is in the scope of a workspace
23
24
  """
24
25
 
25
26
  id: Union[Unset, int] = UNSET
@@ -27,6 +28,7 @@ class CriticalAlert:
27
28
  message: Union[Unset, str] = UNSET
28
29
  created_at: Union[Unset, datetime.datetime] = UNSET
29
30
  acknowledged: Union[Unset, None, bool] = UNSET
31
+ workspace_id: Union[Unset, None, str] = UNSET
30
32
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
31
33
 
32
34
  def to_dict(self) -> Dict[str, Any]:
@@ -38,6 +40,7 @@ class CriticalAlert:
38
40
  created_at = self.created_at.isoformat()
39
41
 
40
42
  acknowledged = self.acknowledged
43
+ workspace_id = self.workspace_id
41
44
 
42
45
  field_dict: Dict[str, Any] = {}
43
46
  field_dict.update(self.additional_properties)
@@ -52,6 +55,8 @@ class CriticalAlert:
52
55
  field_dict["created_at"] = created_at
53
56
  if acknowledged is not UNSET:
54
57
  field_dict["acknowledged"] = acknowledged
58
+ if workspace_id is not UNSET:
59
+ field_dict["workspace_id"] = workspace_id
55
60
 
56
61
  return field_dict
57
62
 
@@ -73,12 +78,15 @@ class CriticalAlert:
73
78
 
74
79
  acknowledged = d.pop("acknowledged", UNSET)
75
80
 
81
+ workspace_id = d.pop("workspace_id", UNSET)
82
+
76
83
  critical_alert = cls(
77
84
  id=id,
78
85
  alert_type=alert_type,
79
86
  message=message,
80
87
  created_at=created_at,
81
88
  acknowledged=acknowledged,
89
+ workspace_id=workspace_id,
82
90
  )
83
91
 
84
92
  critical_alert.additional_properties = d
@@ -1,10 +1,14 @@
1
- from typing import Any, Dict, List, Type, TypeVar, Union
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
  from ..types import UNSET, Unset
7
7
 
8
+ if TYPE_CHECKING:
9
+ from ..models.edit_copilot_config_json_body_ai_resource import EditCopilotConfigJsonBodyAiResource
10
+
11
+
8
12
  T = TypeVar("T", bound="EditCopilotConfigJsonBody")
9
13
 
10
14
 
@@ -13,16 +17,18 @@ class EditCopilotConfigJsonBody:
13
17
  """
14
18
  Attributes:
15
19
  code_completion_enabled (bool):
16
- openai_resource_path (Union[Unset, str]):
20
+ ai_resource (Union[Unset, EditCopilotConfigJsonBodyAiResource]):
17
21
  """
18
22
 
19
23
  code_completion_enabled: bool
20
- openai_resource_path: Union[Unset, str] = UNSET
24
+ ai_resource: Union[Unset, "EditCopilotConfigJsonBodyAiResource"] = UNSET
21
25
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
22
26
 
23
27
  def to_dict(self) -> Dict[str, Any]:
24
28
  code_completion_enabled = self.code_completion_enabled
25
- openai_resource_path = self.openai_resource_path
29
+ ai_resource: Union[Unset, Dict[str, Any]] = UNSET
30
+ if not isinstance(self.ai_resource, Unset):
31
+ ai_resource = self.ai_resource.to_dict()
26
32
 
27
33
  field_dict: Dict[str, Any] = {}
28
34
  field_dict.update(self.additional_properties)
@@ -31,21 +37,28 @@ class EditCopilotConfigJsonBody:
31
37
  "code_completion_enabled": code_completion_enabled,
32
38
  }
33
39
  )
34
- if openai_resource_path is not UNSET:
35
- field_dict["openai_resource_path"] = openai_resource_path
40
+ if ai_resource is not UNSET:
41
+ field_dict["ai_resource"] = ai_resource
36
42
 
37
43
  return field_dict
38
44
 
39
45
  @classmethod
40
46
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
47
+ from ..models.edit_copilot_config_json_body_ai_resource import EditCopilotConfigJsonBodyAiResource
48
+
41
49
  d = src_dict.copy()
42
50
  code_completion_enabled = d.pop("code_completion_enabled")
43
51
 
44
- openai_resource_path = d.pop("openai_resource_path", UNSET)
52
+ _ai_resource = d.pop("ai_resource", UNSET)
53
+ ai_resource: Union[Unset, EditCopilotConfigJsonBodyAiResource]
54
+ if isinstance(_ai_resource, Unset):
55
+ ai_resource = UNSET
56
+ else:
57
+ ai_resource = EditCopilotConfigJsonBodyAiResource.from_dict(_ai_resource)
45
58
 
46
59
  edit_copilot_config_json_body = cls(
47
60
  code_completion_enabled=code_completion_enabled,
48
- openai_resource_path=openai_resource_path,
61
+ ai_resource=ai_resource,
49
62
  )
50
63
 
51
64
  edit_copilot_config_json_body.additional_properties = d
@@ -0,0 +1,65 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="EditCopilotConfigJsonBodyAiResource")
7
+
8
+
9
+ @_attrs_define
10
+ class EditCopilotConfigJsonBodyAiResource:
11
+ """
12
+ Attributes:
13
+ path (str):
14
+ provider (str):
15
+ """
16
+
17
+ path: str
18
+ provider: str
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ path = self.path
23
+ provider = self.provider
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "path": path,
30
+ "provider": provider,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ path = d.pop("path")
40
+
41
+ provider = d.pop("provider")
42
+
43
+ edit_copilot_config_json_body_ai_resource = cls(
44
+ path=path,
45
+ provider=provider,
46
+ )
47
+
48
+ edit_copilot_config_json_body_ai_resource.additional_properties = d
49
+ return edit_copilot_config_json_body_ai_resource
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties
@@ -3,6 +3,7 @@ from enum import Enum
3
3
 
4
4
  class GetAuditLogResponse200Operation(str, Enum):
5
5
  ACCOUNT_DELETE = "account.delete"
6
+ AI_REQUEST = "ai.request"
6
7
  APPS_CREATE = "apps.create"
7
8
  APPS_DELETE = "apps.delete"
8
9
  APPS_UPDATE = "apps.update"
@@ -42,7 +43,6 @@ class GetAuditLogResponse200Operation(str, Enum):
42
43
  OAUTH_LOGIN = "oauth.login"
43
44
  OAUTH_LOGIN_FAILURE = "oauth.login_failure"
44
45
  OAUTH_SIGNUP = "oauth.signup"
45
- OPENAI_REQUEST = "openai.request"
46
46
  RESOURCES_CREATE = "resources.create"
47
47
  RESOURCES_DELETE = "resources.delete"
48
48
  RESOURCES_UPDATE = "resources.update"
@@ -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="GetCountsOfJobsWaitingPerTagResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class GetCountsOfJobsWaitingPerTagResponse200:
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
+ get_counts_of_jobs_waiting_per_tag_response_200 = cls()
26
+
27
+ get_counts_of_jobs_waiting_per_tag_response_200.additional_properties = d
28
+ return get_counts_of_jobs_waiting_per_tag_response_200
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
@@ -20,6 +20,7 @@ class GetCriticalAlertsResponse200Item:
20
20
  created_at (Union[Unset, datetime.datetime]): Time when the alert was created
21
21
  acknowledged (Union[Unset, None, bool]): Acknowledgment status of the alert, can be true, false, or null if not
22
22
  set
23
+ workspace_id (Union[Unset, None, str]): Workspace id if the alert is in the scope of a workspace
23
24
  """
24
25
 
25
26
  id: Union[Unset, int] = UNSET
@@ -27,6 +28,7 @@ class GetCriticalAlertsResponse200Item:
27
28
  message: Union[Unset, str] = UNSET
28
29
  created_at: Union[Unset, datetime.datetime] = UNSET
29
30
  acknowledged: Union[Unset, None, bool] = UNSET
31
+ workspace_id: Union[Unset, None, str] = UNSET
30
32
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
31
33
 
32
34
  def to_dict(self) -> Dict[str, Any]:
@@ -38,6 +40,7 @@ class GetCriticalAlertsResponse200Item:
38
40
  created_at = self.created_at.isoformat()
39
41
 
40
42
  acknowledged = self.acknowledged
43
+ workspace_id = self.workspace_id
41
44
 
42
45
  field_dict: Dict[str, Any] = {}
43
46
  field_dict.update(self.additional_properties)
@@ -52,6 +55,8 @@ class GetCriticalAlertsResponse200Item:
52
55
  field_dict["created_at"] = created_at
53
56
  if acknowledged is not UNSET:
54
57
  field_dict["acknowledged"] = acknowledged
58
+ if workspace_id is not UNSET:
59
+ field_dict["workspace_id"] = workspace_id
55
60
 
56
61
  return field_dict
57
62
 
@@ -73,12 +78,15 @@ class GetCriticalAlertsResponse200Item:
73
78
 
74
79
  acknowledged = d.pop("acknowledged", UNSET)
75
80
 
81
+ workspace_id = d.pop("workspace_id", UNSET)
82
+
76
83
  get_critical_alerts_response_200_item = cls(
77
84
  id=id,
78
85
  alert_type=alert_type,
79
86
  message=message,
80
87
  created_at=created_at,
81
88
  acknowledged=acknowledged,
89
+ workspace_id=workspace_id,
82
90
  )
83
91
 
84
92
  get_critical_alerts_response_200_item.additional_properties = d
@@ -6,6 +6,7 @@ from attrs import field as _attrs_field
6
6
  from ..types import UNSET, Unset
7
7
 
8
8
  if TYPE_CHECKING:
9
+ from ..models.get_settings_response_200_ai_resource import GetSettingsResponse200AiResource
9
10
  from ..models.get_settings_response_200_default_scripts import GetSettingsResponse200DefaultScripts
10
11
  from ..models.get_settings_response_200_deploy_ui import GetSettingsResponse200DeployUi
11
12
  from ..models.get_settings_response_200_error_handler_extra_args import GetSettingsResponse200ErrorHandlerExtraArgs
@@ -34,7 +35,7 @@ class GetSettingsResponse200:
34
35
  customer_id (Union[Unset, str]):
35
36
  webhook (Union[Unset, str]):
36
37
  deploy_to (Union[Unset, str]):
37
- openai_resource_path (Union[Unset, str]):
38
+ ai_resource (Union[Unset, GetSettingsResponse200AiResource]):
38
39
  error_handler (Union[Unset, str]):
39
40
  error_handler_extra_args (Union[Unset, GetSettingsResponse200ErrorHandlerExtraArgs]):
40
41
  large_file_storage (Union[Unset, GetSettingsResponse200LargeFileStorage]):
@@ -42,6 +43,7 @@ class GetSettingsResponse200:
42
43
  deploy_ui (Union[Unset, GetSettingsResponse200DeployUi]):
43
44
  default_app (Union[Unset, str]):
44
45
  default_scripts (Union[Unset, GetSettingsResponse200DefaultScripts]):
46
+ mute_critical_alerts (Union[Unset, bool]):
45
47
  """
46
48
 
47
49
  automatic_billing: bool
@@ -58,7 +60,7 @@ class GetSettingsResponse200:
58
60
  customer_id: Union[Unset, str] = UNSET
59
61
  webhook: Union[Unset, str] = UNSET
60
62
  deploy_to: Union[Unset, str] = UNSET
61
- openai_resource_path: Union[Unset, str] = UNSET
63
+ ai_resource: Union[Unset, "GetSettingsResponse200AiResource"] = UNSET
62
64
  error_handler: Union[Unset, str] = UNSET
63
65
  error_handler_extra_args: Union[Unset, "GetSettingsResponse200ErrorHandlerExtraArgs"] = UNSET
64
66
  large_file_storage: Union[Unset, "GetSettingsResponse200LargeFileStorage"] = UNSET
@@ -66,6 +68,7 @@ class GetSettingsResponse200:
66
68
  deploy_ui: Union[Unset, "GetSettingsResponse200DeployUi"] = UNSET
67
69
  default_app: Union[Unset, str] = UNSET
68
70
  default_scripts: Union[Unset, "GetSettingsResponse200DefaultScripts"] = UNSET
71
+ mute_critical_alerts: Union[Unset, bool] = UNSET
69
72
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
70
73
 
71
74
  def to_dict(self) -> Dict[str, Any]:
@@ -83,7 +86,10 @@ class GetSettingsResponse200:
83
86
  customer_id = self.customer_id
84
87
  webhook = self.webhook
85
88
  deploy_to = self.deploy_to
86
- openai_resource_path = self.openai_resource_path
89
+ ai_resource: Union[Unset, Dict[str, Any]] = UNSET
90
+ if not isinstance(self.ai_resource, Unset):
91
+ ai_resource = self.ai_resource.to_dict()
92
+
87
93
  error_handler = self.error_handler
88
94
  error_handler_extra_args: Union[Unset, Dict[str, Any]] = UNSET
89
95
  if not isinstance(self.error_handler_extra_args, Unset):
@@ -106,6 +112,8 @@ class GetSettingsResponse200:
106
112
  if not isinstance(self.default_scripts, Unset):
107
113
  default_scripts = self.default_scripts.to_dict()
108
114
 
115
+ mute_critical_alerts = self.mute_critical_alerts
116
+
109
117
  field_dict: Dict[str, Any] = {}
110
118
  field_dict.update(self.additional_properties)
111
119
  field_dict.update(
@@ -137,8 +145,8 @@ class GetSettingsResponse200:
137
145
  field_dict["webhook"] = webhook
138
146
  if deploy_to is not UNSET:
139
147
  field_dict["deploy_to"] = deploy_to
140
- if openai_resource_path is not UNSET:
141
- field_dict["openai_resource_path"] = openai_resource_path
148
+ if ai_resource is not UNSET:
149
+ field_dict["ai_resource"] = ai_resource
142
150
  if error_handler is not UNSET:
143
151
  field_dict["error_handler"] = error_handler
144
152
  if error_handler_extra_args is not UNSET:
@@ -153,11 +161,14 @@ class GetSettingsResponse200:
153
161
  field_dict["default_app"] = default_app
154
162
  if default_scripts is not UNSET:
155
163
  field_dict["default_scripts"] = default_scripts
164
+ if mute_critical_alerts is not UNSET:
165
+ field_dict["mute_critical_alerts"] = mute_critical_alerts
156
166
 
157
167
  return field_dict
158
168
 
159
169
  @classmethod
160
170
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
171
+ from ..models.get_settings_response_200_ai_resource import GetSettingsResponse200AiResource
161
172
  from ..models.get_settings_response_200_default_scripts import GetSettingsResponse200DefaultScripts
162
173
  from ..models.get_settings_response_200_deploy_ui import GetSettingsResponse200DeployUi
163
174
  from ..models.get_settings_response_200_error_handler_extra_args import (
@@ -195,7 +206,12 @@ class GetSettingsResponse200:
195
206
 
196
207
  deploy_to = d.pop("deploy_to", UNSET)
197
208
 
198
- openai_resource_path = d.pop("openai_resource_path", UNSET)
209
+ _ai_resource = d.pop("ai_resource", UNSET)
210
+ ai_resource: Union[Unset, GetSettingsResponse200AiResource]
211
+ if isinstance(_ai_resource, Unset):
212
+ ai_resource = UNSET
213
+ else:
214
+ ai_resource = GetSettingsResponse200AiResource.from_dict(_ai_resource)
199
215
 
200
216
  error_handler = d.pop("error_handler", UNSET)
201
217
 
@@ -236,6 +252,8 @@ class GetSettingsResponse200:
236
252
  else:
237
253
  default_scripts = GetSettingsResponse200DefaultScripts.from_dict(_default_scripts)
238
254
 
255
+ mute_critical_alerts = d.pop("mute_critical_alerts", UNSET)
256
+
239
257
  get_settings_response_200 = cls(
240
258
  automatic_billing=automatic_billing,
241
259
  code_completion_enabled=code_completion_enabled,
@@ -251,7 +269,7 @@ class GetSettingsResponse200:
251
269
  customer_id=customer_id,
252
270
  webhook=webhook,
253
271
  deploy_to=deploy_to,
254
- openai_resource_path=openai_resource_path,
272
+ ai_resource=ai_resource,
255
273
  error_handler=error_handler,
256
274
  error_handler_extra_args=error_handler_extra_args,
257
275
  large_file_storage=large_file_storage,
@@ -259,6 +277,7 @@ class GetSettingsResponse200:
259
277
  deploy_ui=deploy_ui,
260
278
  default_app=default_app,
261
279
  default_scripts=default_scripts,
280
+ mute_critical_alerts=mute_critical_alerts,
262
281
  )
263
282
 
264
283
  get_settings_response_200.additional_properties = d
@@ -0,0 +1,65 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="GetSettingsResponse200AiResource")
7
+
8
+
9
+ @_attrs_define
10
+ class GetSettingsResponse200AiResource:
11
+ """
12
+ Attributes:
13
+ path (str):
14
+ provider (str):
15
+ """
16
+
17
+ path: str
18
+ provider: str
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ path = self.path
23
+ provider = self.provider
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "path": path,
30
+ "provider": provider,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ path = d.pop("path")
40
+
41
+ provider = d.pop("provider")
42
+
43
+ get_settings_response_200_ai_resource = cls(
44
+ path=path,
45
+ provider=provider,
46
+ )
47
+
48
+ get_settings_response_200_ai_resource.additional_properties = d
49
+ return get_settings_response_200_ai_resource
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties