daytona_api_client_async 0.0.0.dev0__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.
Files changed (209) hide show
  1. daytona_api_client_async/__init__.py +195 -0
  2. daytona_api_client_async/api/__init__.py +21 -0
  3. daytona_api_client_async/api/api_keys_api.py +1673 -0
  4. daytona_api_client_async/api/audit_api.py +750 -0
  5. daytona_api_client_async/api/config_api.py +279 -0
  6. daytona_api_client_async/api/default_api.py +1884 -0
  7. daytona_api_client_async/api/docker_registry_api.py +1965 -0
  8. daytona_api_client_async/api/health_api.py +282 -0
  9. daytona_api_client_async/api/object_storage_api.py +299 -0
  10. daytona_api_client_async/api/organizations_api.py +7836 -0
  11. daytona_api_client_async/api/preview_api.py +826 -0
  12. daytona_api_client_async/api/regions_api.py +316 -0
  13. daytona_api_client_async/api/runners_api.py +1560 -0
  14. daytona_api_client_async/api/sandbox_api.py +6927 -0
  15. daytona_api_client_async/api/snapshots_api.py +2630 -0
  16. daytona_api_client_async/api/toolbox_api.py +20759 -0
  17. daytona_api_client_async/api/users_api.py +2319 -0
  18. daytona_api_client_async/api/volumes_api.py +1419 -0
  19. daytona_api_client_async/api/webhooks_api.py +1704 -0
  20. daytona_api_client_async/api/workspace_api.py +4036 -0
  21. daytona_api_client_async/api_client.py +801 -0
  22. daytona_api_client_async/api_response.py +21 -0
  23. daytona_api_client_async/configuration.py +579 -0
  24. daytona_api_client_async/exceptions.py +217 -0
  25. daytona_api_client_async/models/__init__.py +162 -0
  26. daytona_api_client_async/models/account_provider.py +103 -0
  27. daytona_api_client_async/models/announcement.py +103 -0
  28. daytona_api_client_async/models/api_key_list.py +132 -0
  29. daytona_api_client_async/models/api_key_response.py +123 -0
  30. daytona_api_client_async/models/audit_log.py +128 -0
  31. daytona_api_client_async/models/build_info.py +108 -0
  32. daytona_api_client_async/models/command.py +105 -0
  33. daytona_api_client_async/models/completion_context.py +103 -0
  34. daytona_api_client_async/models/completion_item.py +113 -0
  35. daytona_api_client_async/models/completion_list.py +111 -0
  36. daytona_api_client_async/models/compressed_screenshot_response.py +105 -0
  37. daytona_api_client_async/models/computer_use_start_response.py +103 -0
  38. daytona_api_client_async/models/computer_use_status_response.py +108 -0
  39. daytona_api_client_async/models/computer_use_stop_response.py +103 -0
  40. daytona_api_client_async/models/configuration.py +145 -0
  41. daytona_api_client_async/models/create_api_key.py +119 -0
  42. daytona_api_client_async/models/create_audit_log.py +128 -0
  43. daytona_api_client_async/models/create_build_info.py +103 -0
  44. daytona_api_client_async/models/create_docker_registry.py +120 -0
  45. daytona_api_client_async/models/create_linked_account.py +103 -0
  46. daytona_api_client_async/models/create_organization.py +103 -0
  47. daytona_api_client_async/models/create_organization_invitation.py +115 -0
  48. daytona_api_client_async/models/create_organization_quota.py +117 -0
  49. daytona_api_client_async/models/create_organization_role.py +113 -0
  50. daytona_api_client_async/models/create_runner.py +130 -0
  51. daytona_api_client_async/models/create_sandbox.py +159 -0
  52. daytona_api_client_async/models/create_session_request.py +101 -0
  53. daytona_api_client_async/models/create_snapshot.py +121 -0
  54. daytona_api_client_async/models/create_user.py +127 -0
  55. daytona_api_client_async/models/create_volume.py +101 -0
  56. daytona_api_client_async/models/create_workspace.py +161 -0
  57. daytona_api_client_async/models/daytona_configuration.py +158 -0
  58. daytona_api_client_async/models/display_info_response.py +101 -0
  59. daytona_api_client_async/models/docker_registry.py +123 -0
  60. daytona_api_client_async/models/download_files.py +101 -0
  61. daytona_api_client_async/models/empty_response.py +101 -0
  62. daytona_api_client_async/models/execute_request.py +105 -0
  63. daytona_api_client_async/models/execute_response.py +103 -0
  64. daytona_api_client_async/models/file_info.py +115 -0
  65. daytona_api_client_async/models/file_status.py +107 -0
  66. daytona_api_client_async/models/git_add_request.py +103 -0
  67. daytona_api_client_async/models/git_branch_request.py +103 -0
  68. daytona_api_client_async/models/git_checkout_request.py +103 -0
  69. daytona_api_client_async/models/git_clone_request.py +111 -0
  70. daytona_api_client_async/models/git_commit_info.py +109 -0
  71. daytona_api_client_async/models/git_commit_request.py +109 -0
  72. daytona_api_client_async/models/git_commit_response.py +101 -0
  73. daytona_api_client_async/models/git_delete_branch_request.py +103 -0
  74. daytona_api_client_async/models/git_repo_request.py +105 -0
  75. daytona_api_client_async/models/git_status.py +117 -0
  76. daytona_api_client_async/models/health_controller_check200_response.py +154 -0
  77. daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
  78. daytona_api_client_async/models/health_controller_check503_response.py +154 -0
  79. daytona_api_client_async/models/keyboard_hotkey_request.py +101 -0
  80. daytona_api_client_async/models/keyboard_hotkey_response.py +103 -0
  81. daytona_api_client_async/models/keyboard_press_request.py +103 -0
  82. daytona_api_client_async/models/keyboard_press_response.py +105 -0
  83. daytona_api_client_async/models/keyboard_type_request.py +103 -0
  84. daytona_api_client_async/models/keyboard_type_response.py +103 -0
  85. daytona_api_client_async/models/list_branch_response.py +101 -0
  86. daytona_api_client_async/models/lsp_completion_params.py +117 -0
  87. daytona_api_client_async/models/lsp_document_request.py +105 -0
  88. daytona_api_client_async/models/lsp_location.py +107 -0
  89. daytona_api_client_async/models/lsp_server_request.py +103 -0
  90. daytona_api_client_async/models/lsp_symbol.py +109 -0
  91. daytona_api_client_async/models/match.py +105 -0
  92. daytona_api_client_async/models/mouse_click_request.py +107 -0
  93. daytona_api_client_async/models/mouse_click_response.py +103 -0
  94. daytona_api_client_async/models/mouse_drag_request.py +109 -0
  95. daytona_api_client_async/models/mouse_drag_response.py +103 -0
  96. daytona_api_client_async/models/mouse_move_request.py +103 -0
  97. daytona_api_client_async/models/mouse_move_response.py +103 -0
  98. daytona_api_client_async/models/mouse_position.py +103 -0
  99. daytona_api_client_async/models/mouse_scroll_request.py +107 -0
  100. daytona_api_client_async/models/mouse_scroll_response.py +101 -0
  101. daytona_api_client_async/models/oidc_config.py +105 -0
  102. daytona_api_client_async/models/organization.py +153 -0
  103. daytona_api_client_async/models/organization_invitation.py +144 -0
  104. daytona_api_client_async/models/organization_role.py +122 -0
  105. daytona_api_client_async/models/organization_sandbox_default_limited_network_egress.py +101 -0
  106. daytona_api_client_async/models/organization_sandbox_default_network_block_all.py +101 -0
  107. daytona_api_client_async/models/organization_suspension.py +106 -0
  108. daytona_api_client_async/models/organization_usage_overview.py +117 -0
  109. daytona_api_client_async/models/organization_user.py +131 -0
  110. daytona_api_client_async/models/paginated_audit_logs.py +117 -0
  111. daytona_api_client_async/models/paginated_sandboxes.py +115 -0
  112. daytona_api_client_async/models/paginated_snapshots.py +115 -0
  113. daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
  114. daytona_api_client_async/models/paginated_workspaces.py +115 -0
  115. daytona_api_client_async/models/port_preview_url.py +105 -0
  116. daytona_api_client_async/models/position.py +103 -0
  117. daytona_api_client_async/models/posthog_config.py +103 -0
  118. daytona_api_client_async/models/process_errors_response.py +103 -0
  119. daytona_api_client_async/models/process_logs_response.py +103 -0
  120. daytona_api_client_async/models/process_restart_response.py +103 -0
  121. daytona_api_client_async/models/process_status_response.py +103 -0
  122. daytona_api_client_async/models/project_dir_response.py +101 -0
  123. daytona_api_client_async/models/pty_create_request.py +111 -0
  124. daytona_api_client_async/models/pty_create_response.py +101 -0
  125. daytona_api_client_async/models/pty_list_response.py +109 -0
  126. daytona_api_client_async/models/pty_resize_request.py +103 -0
  127. daytona_api_client_async/models/pty_session_info.py +115 -0
  128. daytona_api_client_async/models/range.py +110 -0
  129. daytona_api_client_async/models/rate_limit_config.py +120 -0
  130. daytona_api_client_async/models/rate_limit_entry.py +103 -0
  131. daytona_api_client_async/models/region.py +114 -0
  132. daytona_api_client_async/models/region_quota.py +109 -0
  133. daytona_api_client_async/models/region_screenshot_response.py +105 -0
  134. daytona_api_client_async/models/region_usage_overview.py +113 -0
  135. daytona_api_client_async/models/registry_push_access_dto.py +111 -0
  136. daytona_api_client_async/models/replace_request.py +105 -0
  137. daytona_api_client_async/models/replace_result.py +105 -0
  138. daytona_api_client_async/models/runner.py +153 -0
  139. daytona_api_client_async/models/runner_region.py +39 -0
  140. daytona_api_client_async/models/runner_snapshot_dto.py +105 -0
  141. daytona_api_client_async/models/runner_state.py +41 -0
  142. daytona_api_client_async/models/sandbox.py +193 -0
  143. daytona_api_client_async/models/sandbox_class.py +39 -0
  144. daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
  145. daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
  146. daytona_api_client_async/models/sandbox_desired_state.py +41 -0
  147. daytona_api_client_async/models/sandbox_info.py +105 -0
  148. daytona_api_client_async/models/sandbox_labels.py +101 -0
  149. daytona_api_client_async/models/sandbox_state.py +52 -0
  150. daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
  151. daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
  152. daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
  153. daytona_api_client_async/models/sandbox_volume.py +105 -0
  154. daytona_api_client_async/models/screenshot_response.py +105 -0
  155. daytona_api_client_async/models/search_files_response.py +101 -0
  156. daytona_api_client_async/models/send_webhook_dto.py +105 -0
  157. daytona_api_client_async/models/session.py +116 -0
  158. daytona_api_client_async/models/session_command_logs_response.py +103 -0
  159. daytona_api_client_async/models/session_execute_request.py +105 -0
  160. daytona_api_client_async/models/session_execute_response.py +105 -0
  161. daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
  162. daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
  163. daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
  164. daytona_api_client_async/models/snapshot_dto.py +159 -0
  165. daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
  166. daytona_api_client_async/models/snapshot_state.py +44 -0
  167. daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
  168. daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
  169. daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
  170. daytona_api_client_async/models/ssh_access_dto.py +112 -0
  171. daytona_api_client_async/models/ssh_access_validation_dto.py +103 -0
  172. daytona_api_client_async/models/storage_access_dto.py +111 -0
  173. daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
  174. daytona_api_client_async/models/update_docker_registry.py +109 -0
  175. daytona_api_client_async/models/update_organization_default_region.py +101 -0
  176. daytona_api_client_async/models/update_organization_invitation.py +113 -0
  177. daytona_api_client_async/models/update_organization_member_access.py +110 -0
  178. daytona_api_client_async/models/update_organization_member_role.py +108 -0
  179. daytona_api_client_async/models/update_organization_quota.py +162 -0
  180. daytona_api_client_async/models/update_organization_region_quota.py +120 -0
  181. daytona_api_client_async/models/update_organization_role.py +113 -0
  182. daytona_api_client_async/models/update_sandbox_state_dto.py +110 -0
  183. daytona_api_client_async/models/user.py +118 -0
  184. daytona_api_client_async/models/user_home_dir_response.py +101 -0
  185. daytona_api_client_async/models/user_public_key.py +103 -0
  186. daytona_api_client_async/models/volume_created_post_request.py +110 -0
  187. daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
  188. daytona_api_client_async/models/volume_dto.py +126 -0
  189. daytona_api_client_async/models/volume_state.py +43 -0
  190. daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
  191. daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
  192. daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
  193. daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
  194. daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
  195. daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
  196. daytona_api_client_async/models/webhook_controller_get_status200_response.py +101 -0
  197. daytona_api_client_async/models/webhook_initialization_status.py +121 -0
  198. daytona_api_client_async/models/windows_response.py +103 -0
  199. daytona_api_client_async/models/work_dir_response.py +101 -0
  200. daytona_api_client_async/models/workdir_response.py +101 -0
  201. daytona_api_client_async/models/workspace.py +215 -0
  202. daytona_api_client_async/models/workspace_port_preview_url.py +103 -0
  203. daytona_api_client_async/py.typed +0 -0
  204. daytona_api_client_async/rest.py +214 -0
  205. daytona_api_client_async-0.0.0.dev0.dist-info/METADATA +27 -0
  206. daytona_api_client_async-0.0.0.dev0.dist-info/RECORD +209 -0
  207. daytona_api_client_async-0.0.0.dev0.dist-info/WHEEL +5 -0
  208. daytona_api_client_async-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
  209. daytona_api_client_async-0.0.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,750 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Daytona
5
+
6
+ Daytona AI platform API Docs
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: support@daytona.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from datetime import datetime
21
+ from pydantic import Field, StrictStr
22
+ from typing import Optional, Union
23
+ from typing_extensions import Annotated
24
+ from daytona_api_client_async.models.paginated_audit_logs import PaginatedAuditLogs
25
+
26
+ from daytona_api_client_async.api_client import ApiClient, RequestSerialized
27
+ from daytona_api_client_async.api_response import ApiResponse
28
+ from daytona_api_client_async.rest import RESTResponseType
29
+
30
+
31
+ class AuditApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def get_all_audit_logs(
46
+ self,
47
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
48
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
49
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
50
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
51
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> PaginatedAuditLogs:
65
+ """Get all audit logs
66
+
67
+
68
+ :param page: Page number of the results
69
+ :type page: float
70
+ :param limit: Number of results per page
71
+ :type limit: float
72
+ :param var_from: From date (ISO 8601 format)
73
+ :type var_from: datetime
74
+ :param to: To date (ISO 8601 format)
75
+ :type to: datetime
76
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
77
+ :type next_token: str
78
+ :param _request_timeout: timeout setting for this request. If one
79
+ number provided, it will be total request
80
+ timeout. It can also be a pair (tuple) of
81
+ (connection, read) timeouts.
82
+ :type _request_timeout: int, tuple(int, int), optional
83
+ :param _request_auth: set to override the auth_settings for an a single
84
+ request; this effectively ignores the
85
+ authentication in the spec for a single request.
86
+ :type _request_auth: dict, optional
87
+ :param _content_type: force content-type for the request.
88
+ :type _content_type: str, Optional
89
+ :param _headers: set to override the headers for a single
90
+ request; this effectively ignores the headers
91
+ in the spec for a single request.
92
+ :type _headers: dict, optional
93
+ :param _host_index: set to override the host_index for a single
94
+ request; this effectively ignores the host_index
95
+ in the spec for a single request.
96
+ :type _host_index: int, optional
97
+ :return: Returns the result object.
98
+ """ # noqa: E501
99
+
100
+ _param = self._get_all_audit_logs_serialize(
101
+ page=page,
102
+ limit=limit,
103
+ var_from=var_from,
104
+ to=to,
105
+ next_token=next_token,
106
+ _request_auth=_request_auth,
107
+ _content_type=_content_type,
108
+ _headers=_headers,
109
+ _host_index=_host_index
110
+ )
111
+
112
+ _response_types_map: Dict[str, Optional[str]] = {
113
+ '200': "PaginatedAuditLogs",
114
+ }
115
+ response_data = await self.api_client.call_api(
116
+ *_param,
117
+ _request_timeout=_request_timeout
118
+ )
119
+ await response_data.read()
120
+ return self.api_client.response_deserialize(
121
+ response_data=response_data,
122
+ response_types_map=_response_types_map,
123
+ ).data
124
+
125
+
126
+ @validate_call
127
+ async def get_all_audit_logs_with_http_info(
128
+ self,
129
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
130
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
131
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
132
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
133
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
134
+ _request_timeout: Union[
135
+ None,
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Tuple[
138
+ Annotated[StrictFloat, Field(gt=0)],
139
+ Annotated[StrictFloat, Field(gt=0)]
140
+ ]
141
+ ] = None,
142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
143
+ _content_type: Optional[StrictStr] = None,
144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
146
+ ) -> ApiResponse[PaginatedAuditLogs]:
147
+ """Get all audit logs
148
+
149
+
150
+ :param page: Page number of the results
151
+ :type page: float
152
+ :param limit: Number of results per page
153
+ :type limit: float
154
+ :param var_from: From date (ISO 8601 format)
155
+ :type var_from: datetime
156
+ :param to: To date (ISO 8601 format)
157
+ :type to: datetime
158
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
159
+ :type next_token: str
160
+ :param _request_timeout: timeout setting for this request. If one
161
+ number provided, it will be total request
162
+ timeout. It can also be a pair (tuple) of
163
+ (connection, read) timeouts.
164
+ :type _request_timeout: int, tuple(int, int), optional
165
+ :param _request_auth: set to override the auth_settings for an a single
166
+ request; this effectively ignores the
167
+ authentication in the spec for a single request.
168
+ :type _request_auth: dict, optional
169
+ :param _content_type: force content-type for the request.
170
+ :type _content_type: str, Optional
171
+ :param _headers: set to override the headers for a single
172
+ request; this effectively ignores the headers
173
+ in the spec for a single request.
174
+ :type _headers: dict, optional
175
+ :param _host_index: set to override the host_index for a single
176
+ request; this effectively ignores the host_index
177
+ in the spec for a single request.
178
+ :type _host_index: int, optional
179
+ :return: Returns the result object.
180
+ """ # noqa: E501
181
+
182
+ _param = self._get_all_audit_logs_serialize(
183
+ page=page,
184
+ limit=limit,
185
+ var_from=var_from,
186
+ to=to,
187
+ next_token=next_token,
188
+ _request_auth=_request_auth,
189
+ _content_type=_content_type,
190
+ _headers=_headers,
191
+ _host_index=_host_index
192
+ )
193
+
194
+ _response_types_map: Dict[str, Optional[str]] = {
195
+ '200': "PaginatedAuditLogs",
196
+ }
197
+ response_data = await self.api_client.call_api(
198
+ *_param,
199
+ _request_timeout=_request_timeout
200
+ )
201
+ await response_data.read()
202
+ return self.api_client.response_deserialize(
203
+ response_data=response_data,
204
+ response_types_map=_response_types_map,
205
+ )
206
+
207
+
208
+ @validate_call
209
+ async def get_all_audit_logs_without_preload_content(
210
+ self,
211
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
212
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
213
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
214
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
215
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
216
+ _request_timeout: Union[
217
+ None,
218
+ Annotated[StrictFloat, Field(gt=0)],
219
+ Tuple[
220
+ Annotated[StrictFloat, Field(gt=0)],
221
+ Annotated[StrictFloat, Field(gt=0)]
222
+ ]
223
+ ] = None,
224
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
225
+ _content_type: Optional[StrictStr] = None,
226
+ _headers: Optional[Dict[StrictStr, Any]] = None,
227
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
228
+ ) -> RESTResponseType:
229
+ """Get all audit logs
230
+
231
+
232
+ :param page: Page number of the results
233
+ :type page: float
234
+ :param limit: Number of results per page
235
+ :type limit: float
236
+ :param var_from: From date (ISO 8601 format)
237
+ :type var_from: datetime
238
+ :param to: To date (ISO 8601 format)
239
+ :type to: datetime
240
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
241
+ :type next_token: str
242
+ :param _request_timeout: timeout setting for this request. If one
243
+ number provided, it will be total request
244
+ timeout. It can also be a pair (tuple) of
245
+ (connection, read) timeouts.
246
+ :type _request_timeout: int, tuple(int, int), optional
247
+ :param _request_auth: set to override the auth_settings for an a single
248
+ request; this effectively ignores the
249
+ authentication in the spec for a single request.
250
+ :type _request_auth: dict, optional
251
+ :param _content_type: force content-type for the request.
252
+ :type _content_type: str, Optional
253
+ :param _headers: set to override the headers for a single
254
+ request; this effectively ignores the headers
255
+ in the spec for a single request.
256
+ :type _headers: dict, optional
257
+ :param _host_index: set to override the host_index for a single
258
+ request; this effectively ignores the host_index
259
+ in the spec for a single request.
260
+ :type _host_index: int, optional
261
+ :return: Returns the result object.
262
+ """ # noqa: E501
263
+
264
+ _param = self._get_all_audit_logs_serialize(
265
+ page=page,
266
+ limit=limit,
267
+ var_from=var_from,
268
+ to=to,
269
+ next_token=next_token,
270
+ _request_auth=_request_auth,
271
+ _content_type=_content_type,
272
+ _headers=_headers,
273
+ _host_index=_host_index
274
+ )
275
+
276
+ _response_types_map: Dict[str, Optional[str]] = {
277
+ '200': "PaginatedAuditLogs",
278
+ }
279
+ response_data = await self.api_client.call_api(
280
+ *_param,
281
+ _request_timeout=_request_timeout
282
+ )
283
+ return response_data.response
284
+
285
+
286
+ def _get_all_audit_logs_serialize(
287
+ self,
288
+ page,
289
+ limit,
290
+ var_from,
291
+ to,
292
+ next_token,
293
+ _request_auth,
294
+ _content_type,
295
+ _headers,
296
+ _host_index,
297
+ ) -> RequestSerialized:
298
+
299
+ _host = None
300
+
301
+ _collection_formats: Dict[str, str] = {
302
+ }
303
+
304
+ _path_params: Dict[str, str] = {}
305
+ _query_params: List[Tuple[str, str]] = []
306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
307
+ _form_params: List[Tuple[str, str]] = []
308
+ _files: Dict[
309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
310
+ ] = {}
311
+ _body_params: Optional[bytes] = None
312
+
313
+ # process the path parameters
314
+ # process the query parameters
315
+ if page is not None:
316
+
317
+ _query_params.append(('page', page))
318
+
319
+ if limit is not None:
320
+
321
+ _query_params.append(('limit', limit))
322
+
323
+ if var_from is not None:
324
+ if isinstance(var_from, datetime):
325
+ _query_params.append(
326
+ (
327
+ 'from',
328
+ var_from.strftime(
329
+ self.api_client.configuration.datetime_format
330
+ )
331
+ )
332
+ )
333
+ else:
334
+ _query_params.append(('from', var_from))
335
+
336
+ if to is not None:
337
+ if isinstance(to, datetime):
338
+ _query_params.append(
339
+ (
340
+ 'to',
341
+ to.strftime(
342
+ self.api_client.configuration.datetime_format
343
+ )
344
+ )
345
+ )
346
+ else:
347
+ _query_params.append(('to', to))
348
+
349
+ if next_token is not None:
350
+
351
+ _query_params.append(('nextToken', next_token))
352
+
353
+ # process the header parameters
354
+ # process the form parameters
355
+ # process the body parameter
356
+
357
+
358
+ # set the HTTP header `Accept`
359
+ if 'Accept' not in _header_params:
360
+ _header_params['Accept'] = self.api_client.select_header_accept(
361
+ [
362
+ 'application/json'
363
+ ]
364
+ )
365
+
366
+
367
+ # authentication setting
368
+ _auth_settings: List[str] = [
369
+ 'bearer',
370
+ 'oauth2'
371
+ ]
372
+
373
+ return self.api_client.param_serialize(
374
+ method='GET',
375
+ resource_path='/audit',
376
+ path_params=_path_params,
377
+ query_params=_query_params,
378
+ header_params=_header_params,
379
+ body=_body_params,
380
+ post_params=_form_params,
381
+ files=_files,
382
+ auth_settings=_auth_settings,
383
+ collection_formats=_collection_formats,
384
+ _host=_host,
385
+ _request_auth=_request_auth
386
+ )
387
+
388
+
389
+
390
+
391
+ @validate_call
392
+ async def get_organization_audit_logs(
393
+ self,
394
+ organization_id: Annotated[StrictStr, Field(description="Organization ID")],
395
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
396
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
397
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
398
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
399
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
400
+ _request_timeout: Union[
401
+ None,
402
+ Annotated[StrictFloat, Field(gt=0)],
403
+ Tuple[
404
+ Annotated[StrictFloat, Field(gt=0)],
405
+ Annotated[StrictFloat, Field(gt=0)]
406
+ ]
407
+ ] = None,
408
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
409
+ _content_type: Optional[StrictStr] = None,
410
+ _headers: Optional[Dict[StrictStr, Any]] = None,
411
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
412
+ ) -> PaginatedAuditLogs:
413
+ """Get audit logs for organization
414
+
415
+
416
+ :param organization_id: Organization ID (required)
417
+ :type organization_id: str
418
+ :param page: Page number of the results
419
+ :type page: float
420
+ :param limit: Number of results per page
421
+ :type limit: float
422
+ :param var_from: From date (ISO 8601 format)
423
+ :type var_from: datetime
424
+ :param to: To date (ISO 8601 format)
425
+ :type to: datetime
426
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
427
+ :type next_token: str
428
+ :param _request_timeout: timeout setting for this request. If one
429
+ number provided, it will be total request
430
+ timeout. It can also be a pair (tuple) of
431
+ (connection, read) timeouts.
432
+ :type _request_timeout: int, tuple(int, int), optional
433
+ :param _request_auth: set to override the auth_settings for an a single
434
+ request; this effectively ignores the
435
+ authentication in the spec for a single request.
436
+ :type _request_auth: dict, optional
437
+ :param _content_type: force content-type for the request.
438
+ :type _content_type: str, Optional
439
+ :param _headers: set to override the headers for a single
440
+ request; this effectively ignores the headers
441
+ in the spec for a single request.
442
+ :type _headers: dict, optional
443
+ :param _host_index: set to override the host_index for a single
444
+ request; this effectively ignores the host_index
445
+ in the spec for a single request.
446
+ :type _host_index: int, optional
447
+ :return: Returns the result object.
448
+ """ # noqa: E501
449
+
450
+ _param = self._get_organization_audit_logs_serialize(
451
+ organization_id=organization_id,
452
+ page=page,
453
+ limit=limit,
454
+ var_from=var_from,
455
+ to=to,
456
+ next_token=next_token,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ '200': "PaginatedAuditLogs",
465
+ }
466
+ response_data = await self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ await response_data.read()
471
+ return self.api_client.response_deserialize(
472
+ response_data=response_data,
473
+ response_types_map=_response_types_map,
474
+ ).data
475
+
476
+
477
+ @validate_call
478
+ async def get_organization_audit_logs_with_http_info(
479
+ self,
480
+ organization_id: Annotated[StrictStr, Field(description="Organization ID")],
481
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
482
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
483
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
484
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
485
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
486
+ _request_timeout: Union[
487
+ None,
488
+ Annotated[StrictFloat, Field(gt=0)],
489
+ Tuple[
490
+ Annotated[StrictFloat, Field(gt=0)],
491
+ Annotated[StrictFloat, Field(gt=0)]
492
+ ]
493
+ ] = None,
494
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
495
+ _content_type: Optional[StrictStr] = None,
496
+ _headers: Optional[Dict[StrictStr, Any]] = None,
497
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
498
+ ) -> ApiResponse[PaginatedAuditLogs]:
499
+ """Get audit logs for organization
500
+
501
+
502
+ :param organization_id: Organization ID (required)
503
+ :type organization_id: str
504
+ :param page: Page number of the results
505
+ :type page: float
506
+ :param limit: Number of results per page
507
+ :type limit: float
508
+ :param var_from: From date (ISO 8601 format)
509
+ :type var_from: datetime
510
+ :param to: To date (ISO 8601 format)
511
+ :type to: datetime
512
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
513
+ :type next_token: str
514
+ :param _request_timeout: timeout setting for this request. If one
515
+ number provided, it will be total request
516
+ timeout. It can also be a pair (tuple) of
517
+ (connection, read) timeouts.
518
+ :type _request_timeout: int, tuple(int, int), optional
519
+ :param _request_auth: set to override the auth_settings for an a single
520
+ request; this effectively ignores the
521
+ authentication in the spec for a single request.
522
+ :type _request_auth: dict, optional
523
+ :param _content_type: force content-type for the request.
524
+ :type _content_type: str, Optional
525
+ :param _headers: set to override the headers for a single
526
+ request; this effectively ignores the headers
527
+ in the spec for a single request.
528
+ :type _headers: dict, optional
529
+ :param _host_index: set to override the host_index for a single
530
+ request; this effectively ignores the host_index
531
+ in the spec for a single request.
532
+ :type _host_index: int, optional
533
+ :return: Returns the result object.
534
+ """ # noqa: E501
535
+
536
+ _param = self._get_organization_audit_logs_serialize(
537
+ organization_id=organization_id,
538
+ page=page,
539
+ limit=limit,
540
+ var_from=var_from,
541
+ to=to,
542
+ next_token=next_token,
543
+ _request_auth=_request_auth,
544
+ _content_type=_content_type,
545
+ _headers=_headers,
546
+ _host_index=_host_index
547
+ )
548
+
549
+ _response_types_map: Dict[str, Optional[str]] = {
550
+ '200': "PaginatedAuditLogs",
551
+ }
552
+ response_data = await self.api_client.call_api(
553
+ *_param,
554
+ _request_timeout=_request_timeout
555
+ )
556
+ await response_data.read()
557
+ return self.api_client.response_deserialize(
558
+ response_data=response_data,
559
+ response_types_map=_response_types_map,
560
+ )
561
+
562
+
563
+ @validate_call
564
+ async def get_organization_audit_logs_without_preload_content(
565
+ self,
566
+ organization_id: Annotated[StrictStr, Field(description="Organization ID")],
567
+ page: Annotated[Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]], Field(description="Page number of the results")] = None,
568
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=200, strict=True, ge=1)], Annotated[int, Field(le=200, strict=True, ge=1)]]], Field(description="Number of results per page")] = None,
569
+ var_from: Annotated[Optional[datetime], Field(description="From date (ISO 8601 format)")] = None,
570
+ to: Annotated[Optional[datetime], Field(description="To date (ISO 8601 format)")] = None,
571
+ next_token: Annotated[Optional[StrictStr], Field(description="Token for cursor-based pagination. When provided, takes precedence over page parameter.")] = None,
572
+ _request_timeout: Union[
573
+ None,
574
+ Annotated[StrictFloat, Field(gt=0)],
575
+ Tuple[
576
+ Annotated[StrictFloat, Field(gt=0)],
577
+ Annotated[StrictFloat, Field(gt=0)]
578
+ ]
579
+ ] = None,
580
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
581
+ _content_type: Optional[StrictStr] = None,
582
+ _headers: Optional[Dict[StrictStr, Any]] = None,
583
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
584
+ ) -> RESTResponseType:
585
+ """Get audit logs for organization
586
+
587
+
588
+ :param organization_id: Organization ID (required)
589
+ :type organization_id: str
590
+ :param page: Page number of the results
591
+ :type page: float
592
+ :param limit: Number of results per page
593
+ :type limit: float
594
+ :param var_from: From date (ISO 8601 format)
595
+ :type var_from: datetime
596
+ :param to: To date (ISO 8601 format)
597
+ :type to: datetime
598
+ :param next_token: Token for cursor-based pagination. When provided, takes precedence over page parameter.
599
+ :type next_token: str
600
+ :param _request_timeout: timeout setting for this request. If one
601
+ number provided, it will be total request
602
+ timeout. It can also be a pair (tuple) of
603
+ (connection, read) timeouts.
604
+ :type _request_timeout: int, tuple(int, int), optional
605
+ :param _request_auth: set to override the auth_settings for an a single
606
+ request; this effectively ignores the
607
+ authentication in the spec for a single request.
608
+ :type _request_auth: dict, optional
609
+ :param _content_type: force content-type for the request.
610
+ :type _content_type: str, Optional
611
+ :param _headers: set to override the headers for a single
612
+ request; this effectively ignores the headers
613
+ in the spec for a single request.
614
+ :type _headers: dict, optional
615
+ :param _host_index: set to override the host_index for a single
616
+ request; this effectively ignores the host_index
617
+ in the spec for a single request.
618
+ :type _host_index: int, optional
619
+ :return: Returns the result object.
620
+ """ # noqa: E501
621
+
622
+ _param = self._get_organization_audit_logs_serialize(
623
+ organization_id=organization_id,
624
+ page=page,
625
+ limit=limit,
626
+ var_from=var_from,
627
+ to=to,
628
+ next_token=next_token,
629
+ _request_auth=_request_auth,
630
+ _content_type=_content_type,
631
+ _headers=_headers,
632
+ _host_index=_host_index
633
+ )
634
+
635
+ _response_types_map: Dict[str, Optional[str]] = {
636
+ '200': "PaginatedAuditLogs",
637
+ }
638
+ response_data = await self.api_client.call_api(
639
+ *_param,
640
+ _request_timeout=_request_timeout
641
+ )
642
+ return response_data.response
643
+
644
+
645
+ def _get_organization_audit_logs_serialize(
646
+ self,
647
+ organization_id,
648
+ page,
649
+ limit,
650
+ var_from,
651
+ to,
652
+ next_token,
653
+ _request_auth,
654
+ _content_type,
655
+ _headers,
656
+ _host_index,
657
+ ) -> RequestSerialized:
658
+
659
+ _host = None
660
+
661
+ _collection_formats: Dict[str, str] = {
662
+ }
663
+
664
+ _path_params: Dict[str, str] = {}
665
+ _query_params: List[Tuple[str, str]] = []
666
+ _header_params: Dict[str, Optional[str]] = _headers or {}
667
+ _form_params: List[Tuple[str, str]] = []
668
+ _files: Dict[
669
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
670
+ ] = {}
671
+ _body_params: Optional[bytes] = None
672
+
673
+ # process the path parameters
674
+ if organization_id is not None:
675
+ _path_params['organizationId'] = organization_id
676
+ # process the query parameters
677
+ if page is not None:
678
+
679
+ _query_params.append(('page', page))
680
+
681
+ if limit is not None:
682
+
683
+ _query_params.append(('limit', limit))
684
+
685
+ if var_from is not None:
686
+ if isinstance(var_from, datetime):
687
+ _query_params.append(
688
+ (
689
+ 'from',
690
+ var_from.strftime(
691
+ self.api_client.configuration.datetime_format
692
+ )
693
+ )
694
+ )
695
+ else:
696
+ _query_params.append(('from', var_from))
697
+
698
+ if to is not None:
699
+ if isinstance(to, datetime):
700
+ _query_params.append(
701
+ (
702
+ 'to',
703
+ to.strftime(
704
+ self.api_client.configuration.datetime_format
705
+ )
706
+ )
707
+ )
708
+ else:
709
+ _query_params.append(('to', to))
710
+
711
+ if next_token is not None:
712
+
713
+ _query_params.append(('nextToken', next_token))
714
+
715
+ # process the header parameters
716
+ # process the form parameters
717
+ # process the body parameter
718
+
719
+
720
+ # set the HTTP header `Accept`
721
+ if 'Accept' not in _header_params:
722
+ _header_params['Accept'] = self.api_client.select_header_accept(
723
+ [
724
+ 'application/json'
725
+ ]
726
+ )
727
+
728
+
729
+ # authentication setting
730
+ _auth_settings: List[str] = [
731
+ 'bearer',
732
+ 'oauth2'
733
+ ]
734
+
735
+ return self.api_client.param_serialize(
736
+ method='GET',
737
+ resource_path='/audit/organizations/{organizationId}',
738
+ path_params=_path_params,
739
+ query_params=_query_params,
740
+ header_params=_header_params,
741
+ body=_body_params,
742
+ post_params=_form_params,
743
+ files=_files,
744
+ auth_settings=_auth_settings,
745
+ collection_formats=_collection_formats,
746
+ _host=_host,
747
+ _request_auth=_request_auth
748
+ )
749
+
750
+