qi-compute-api-client 0.56.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.
Files changed (205) hide show
  1. compute_api_client/__init__.py +219 -0
  2. compute_api_client/api/__init__.py +23 -0
  3. compute_api_client/api/algorithms_api.py +1603 -0
  4. compute_api_client/api/auth_config_api.py +278 -0
  5. compute_api_client/api/backend_api.py +1540 -0
  6. compute_api_client/api/backend_types_api.py +1178 -0
  7. compute_api_client/api/batch_jobs_api.py +2224 -0
  8. compute_api_client/api/commits_api.py +1565 -0
  9. compute_api_client/api/files_api.py +1307 -0
  10. compute_api_client/api/final_results_api.py +847 -0
  11. compute_api_client/api/health_api.py +281 -0
  12. compute_api_client/api/jobs_api.py +1787 -0
  13. compute_api_client/api/languages_api.py +692 -0
  14. compute_api_client/api/members_api.py +1238 -0
  15. compute_api_client/api/metadata_api.py +930 -0
  16. compute_api_client/api/permissions_api.py +1295 -0
  17. compute_api_client/api/projects_api.py +1889 -0
  18. compute_api_client/api/reservations_api.py +1324 -0
  19. compute_api_client/api/results_api.py +1702 -0
  20. compute_api_client/api/teams_api.py +692 -0
  21. compute_api_client/api/transactions_api.py +805 -0
  22. compute_api_client/api/users_api.py +1305 -0
  23. compute_api_client/api_client.py +804 -0
  24. compute_api_client/api_response.py +21 -0
  25. compute_api_client/configuration.py +606 -0
  26. compute_api_client/docs/Algorithm.md +34 -0
  27. compute_api_client/docs/AlgorithmIn.md +33 -0
  28. compute_api_client/docs/AlgorithmType.md +12 -0
  29. compute_api_client/docs/AlgorithmsApi.md +428 -0
  30. compute_api_client/docs/AuthConfig.md +31 -0
  31. compute_api_client/docs/AuthConfigApi.md +71 -0
  32. compute_api_client/docs/Backend.md +35 -0
  33. compute_api_client/docs/BackendApi.md +418 -0
  34. compute_api_client/docs/BackendIn.md +34 -0
  35. compute_api_client/docs/BackendMessage.md +29 -0
  36. compute_api_client/docs/BackendPatch.md +31 -0
  37. compute_api_client/docs/BackendStatus.md +16 -0
  38. compute_api_client/docs/BackendType.md +48 -0
  39. compute_api_client/docs/BackendTypePatch.md +45 -0
  40. compute_api_client/docs/BackendTypesApi.md +289 -0
  41. compute_api_client/docs/BackendWithAuthentication.md +36 -0
  42. compute_api_client/docs/BatchJob.md +39 -0
  43. compute_api_client/docs/BatchJobIn.md +29 -0
  44. compute_api_client/docs/BatchJobStatus.md +18 -0
  45. compute_api_client/docs/BatchJobsApi.md +600 -0
  46. compute_api_client/docs/Commit.md +33 -0
  47. compute_api_client/docs/CommitIn.md +30 -0
  48. compute_api_client/docs/CommitsApi.md +425 -0
  49. compute_api_client/docs/CompilePayload.md +30 -0
  50. compute_api_client/docs/CompileStage.md +18 -0
  51. compute_api_client/docs/Domain.md +14 -0
  52. compute_api_client/docs/File.md +36 -0
  53. compute_api_client/docs/FileIn.md +35 -0
  54. compute_api_client/docs/FilesApi.md +346 -0
  55. compute_api_client/docs/FinalResult.md +32 -0
  56. compute_api_client/docs/FinalResultIn.md +30 -0
  57. compute_api_client/docs/FinalResultsApi.md +248 -0
  58. compute_api_client/docs/HTTPBadRequestError.md +29 -0
  59. compute_api_client/docs/HTTPNotFoundError.md +29 -0
  60. compute_api_client/docs/HTTPValidationError.md +29 -0
  61. compute_api_client/docs/HealthApi.md +72 -0
  62. compute_api_client/docs/Job.md +42 -0
  63. compute_api_client/docs/JobIn.md +32 -0
  64. compute_api_client/docs/JobPatch.md +34 -0
  65. compute_api_client/docs/JobStatus.md +18 -0
  66. compute_api_client/docs/JobsApi.md +460 -0
  67. compute_api_client/docs/Language.md +31 -0
  68. compute_api_client/docs/LanguagesApi.md +177 -0
  69. compute_api_client/docs/LocationInner.md +27 -0
  70. compute_api_client/docs/Member.md +33 -0
  71. compute_api_client/docs/MemberId.md +28 -0
  72. compute_api_client/docs/MemberIn.md +32 -0
  73. compute_api_client/docs/MembersApi.md +331 -0
  74. compute_api_client/docs/PageAlgorithm.md +33 -0
  75. compute_api_client/docs/PageBackend.md +33 -0
  76. compute_api_client/docs/PageBackendType.md +33 -0
  77. compute_api_client/docs/PageBatchJob.md +33 -0
  78. compute_api_client/docs/PageCommit.md +33 -0
  79. compute_api_client/docs/PageFile.md +33 -0
  80. compute_api_client/docs/PageJob.md +33 -0
  81. compute_api_client/docs/PageLanguage.md +33 -0
  82. compute_api_client/docs/PageMember.md +33 -0
  83. compute_api_client/docs/PageMetadata.md +32 -0
  84. compute_api_client/docs/PagePermission.md +33 -0
  85. compute_api_client/docs/PagePermissionGroup.md +33 -0
  86. compute_api_client/docs/PageProject.md +33 -0
  87. compute_api_client/docs/PageReservation.md +33 -0
  88. compute_api_client/docs/PageResult.md +33 -0
  89. compute_api_client/docs/PageTeam.md +33 -0
  90. compute_api_client/docs/PageTransaction.md +33 -0
  91. compute_api_client/docs/PageUser.md +33 -0
  92. compute_api_client/docs/Permission.md +31 -0
  93. compute_api_client/docs/PermissionGroup.md +30 -0
  94. compute_api_client/docs/PermissionsApi.md +340 -0
  95. compute_api_client/docs/Project.md +34 -0
  96. compute_api_client/docs/ProjectIn.md +32 -0
  97. compute_api_client/docs/ProjectPatch.md +32 -0
  98. compute_api_client/docs/ProjectsApi.md +502 -0
  99. compute_api_client/docs/Reservation.md +35 -0
  100. compute_api_client/docs/ReservationIn.md +32 -0
  101. compute_api_client/docs/ReservationsApi.md +341 -0
  102. compute_api_client/docs/Result.md +36 -0
  103. compute_api_client/docs/ResultIn.md +34 -0
  104. compute_api_client/docs/ResultsApi.md +439 -0
  105. compute_api_client/docs/Role.md +12 -0
  106. compute_api_client/docs/ShareType.md +14 -0
  107. compute_api_client/docs/Team.md +32 -0
  108. compute_api_client/docs/TeamsApi.md +177 -0
  109. compute_api_client/docs/Transaction.md +35 -0
  110. compute_api_client/docs/TransactionDomain.md +28 -0
  111. compute_api_client/docs/TransactionsApi.md +190 -0
  112. compute_api_client/docs/User.md +36 -0
  113. compute_api_client/docs/UserIn.md +35 -0
  114. compute_api_client/docs/UsersApi.md +338 -0
  115. compute_api_client/docs/ValidationError.md +31 -0
  116. compute_api_client/docs/ValidationErrorLocInner.md +28 -0
  117. compute_api_client/exceptions.py +216 -0
  118. compute_api_client/models/__init__.py +84 -0
  119. compute_api_client/models/algorithm.py +105 -0
  120. compute_api_client/models/algorithm_in.py +103 -0
  121. compute_api_client/models/algorithm_type.py +37 -0
  122. compute_api_client/models/auth_config.py +91 -0
  123. compute_api_client/models/backend.py +106 -0
  124. compute_api_client/models/backend_in.py +104 -0
  125. compute_api_client/models/backend_message.py +87 -0
  126. compute_api_client/models/backend_patch.py +112 -0
  127. compute_api_client/models/backend_status.py +39 -0
  128. compute_api_client/models/backend_type.py +145 -0
  129. compute_api_client/models/backend_type_patch.py +205 -0
  130. compute_api_client/models/backend_with_authentication.py +108 -0
  131. compute_api_client/models/batch_job.py +130 -0
  132. compute_api_client/models/batch_job_in.py +87 -0
  133. compute_api_client/models/batch_job_status.py +40 -0
  134. compute_api_client/models/commit.py +97 -0
  135. compute_api_client/models/commit_in.py +89 -0
  136. compute_api_client/models/compile_payload.py +95 -0
  137. compute_api_client/models/compile_stage.py +40 -0
  138. compute_api_client/models/domain.py +38 -0
  139. compute_api_client/models/file.py +108 -0
  140. compute_api_client/models/file_in.py +106 -0
  141. compute_api_client/models/final_result.py +94 -0
  142. compute_api_client/models/final_result_in.py +89 -0
  143. compute_api_client/models/http_bad_request_error.py +87 -0
  144. compute_api_client/models/http_not_found_error.py +87 -0
  145. compute_api_client/models/http_validation_error.py +95 -0
  146. compute_api_client/models/job.py +131 -0
  147. compute_api_client/models/job_in.py +98 -0
  148. compute_api_client/models/job_patch.py +99 -0
  149. compute_api_client/models/job_status.py +40 -0
  150. compute_api_client/models/language.py +92 -0
  151. compute_api_client/models/location_inner.py +144 -0
  152. compute_api_client/models/member.py +96 -0
  153. compute_api_client/models/member_id.py +144 -0
  154. compute_api_client/models/member_in.py +94 -0
  155. compute_api_client/models/metadata.py +93 -0
  156. compute_api_client/models/metadata_in.py +94 -0
  157. compute_api_client/models/page_algorithm.py +104 -0
  158. compute_api_client/models/page_backend.py +104 -0
  159. compute_api_client/models/page_backend_type.py +104 -0
  160. compute_api_client/models/page_batch_job.py +104 -0
  161. compute_api_client/models/page_commit.py +104 -0
  162. compute_api_client/models/page_file.py +104 -0
  163. compute_api_client/models/page_job.py +104 -0
  164. compute_api_client/models/page_language.py +104 -0
  165. compute_api_client/models/page_member.py +104 -0
  166. compute_api_client/models/page_metadata.py +125 -0
  167. compute_api_client/models/page_permission.py +104 -0
  168. compute_api_client/models/page_permission_group.py +104 -0
  169. compute_api_client/models/page_project.py +104 -0
  170. compute_api_client/models/page_reservation.py +104 -0
  171. compute_api_client/models/page_result.py +104 -0
  172. compute_api_client/models/page_team.py +104 -0
  173. compute_api_client/models/page_transaction.py +104 -0
  174. compute_api_client/models/page_user.py +104 -0
  175. compute_api_client/models/permission.py +92 -0
  176. compute_api_client/models/permission_group.py +90 -0
  177. compute_api_client/models/project.py +99 -0
  178. compute_api_client/models/project_in.py +94 -0
  179. compute_api_client/models/project_patch.py +114 -0
  180. compute_api_client/models/reservation.py +105 -0
  181. compute_api_client/models/reservation_in.py +94 -0
  182. compute_api_client/models/result.py +122 -0
  183. compute_api_client/models/result_in.py +117 -0
  184. compute_api_client/models/role.py +37 -0
  185. compute_api_client/models/share_type.py +38 -0
  186. compute_api_client/models/team.py +94 -0
  187. compute_api_client/models/transaction.py +117 -0
  188. compute_api_client/models/transaction_domain.py +142 -0
  189. compute_api_client/models/user.py +102 -0
  190. compute_api_client/models/user_in.py +100 -0
  191. compute_api_client/models/validation_error.py +99 -0
  192. compute_api_client/models/validation_error_loc_inner.py +138 -0
  193. compute_api_client/rest.py +213 -0
  194. qi2_shared/__init__.py +0 -0
  195. qi2_shared/authentication.py +66 -0
  196. qi2_shared/client.py +52 -0
  197. qi2_shared/hybrid/__init__.py +0 -0
  198. qi2_shared/hybrid/quantum_interface.py +45 -0
  199. qi2_shared/pagination.py +44 -0
  200. qi2_shared/settings.py +68 -0
  201. qi2_shared/utils.py +13 -0
  202. qi_compute_api_client-0.56.0.dist-info/METADATA +266 -0
  203. qi_compute_api_client-0.56.0.dist-info/RECORD +205 -0
  204. qi_compute_api_client-0.56.0.dist-info/WHEEL +4 -0
  205. qi_compute_api_client-0.56.0.dist-info/licenses/LICENSE.md +142 -0
@@ -0,0 +1,805 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from datetime import datetime
20
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from compute_api_client.models.domain import Domain
24
+ from compute_api_client.models.page_transaction import PageTransaction
25
+ from compute_api_client.models.transaction import Transaction
26
+
27
+ from compute_api_client.api_client import ApiClient, RequestSerialized
28
+ from compute_api_client.api_response import ApiResponse
29
+ from compute_api_client.rest import RESTResponseType
30
+
31
+
32
+ class TransactionsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def read_transaction_transactions_id_get(
47
+ self,
48
+ id: StrictInt,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> Transaction:
62
+ """Retrieve transactions
63
+
64
+ Get transaction by ID.
65
+
66
+ :param id: (required)
67
+ :type id: int
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._read_transaction_transactions_id_get_serialize(
91
+ id=id,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "Transaction",
100
+ '404': "HTTPNotFoundError",
101
+ '422': "HTTPValidationError",
102
+ }
103
+ response_data = await self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ await response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ async def read_transaction_transactions_id_get_with_http_info(
116
+ self,
117
+ id: StrictInt,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[Transaction]:
131
+ """Retrieve transactions
132
+
133
+ Get transaction by ID.
134
+
135
+ :param id: (required)
136
+ :type id: int
137
+ :param _request_timeout: timeout setting for this request. If one
138
+ number provided, it will be total request
139
+ timeout. It can also be a pair (tuple) of
140
+ (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._read_transaction_transactions_id_get_serialize(
160
+ id=id,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
166
+
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '200': "Transaction",
169
+ '404': "HTTPNotFoundError",
170
+ '422': "HTTPValidationError",
171
+ }
172
+ response_data = await self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ await response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
181
+
182
+
183
+ @validate_call
184
+ async def read_transaction_transactions_id_get_without_preload_content(
185
+ self,
186
+ id: StrictInt,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Annotated[StrictFloat, Field(gt=0)]
193
+ ]
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> RESTResponseType:
200
+ """Retrieve transactions
201
+
202
+ Get transaction by ID.
203
+
204
+ :param id: (required)
205
+ :type id: int
206
+ :param _request_timeout: timeout setting for this request. If one
207
+ number provided, it will be total request
208
+ timeout. It can also be a pair (tuple) of
209
+ (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
211
+ :param _request_auth: set to override the auth_settings for an a single
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
214
+ :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
225
+ :return: Returns the result object.
226
+ """ # noqa: E501
227
+
228
+ _param = self._read_transaction_transactions_id_get_serialize(
229
+ id=id,
230
+ _request_auth=_request_auth,
231
+ _content_type=_content_type,
232
+ _headers=_headers,
233
+ _host_index=_host_index
234
+ )
235
+
236
+ _response_types_map: Dict[str, Optional[str]] = {
237
+ '200': "Transaction",
238
+ '404': "HTTPNotFoundError",
239
+ '422': "HTTPValidationError",
240
+ }
241
+ response_data = await self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _read_transaction_transactions_id_get_serialize(
249
+ self,
250
+ id,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {
260
+ }
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if id is not None:
273
+ _path_params['id'] = id
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'user_bearer'
292
+ ]
293
+
294
+ return self.api_client.param_serialize(
295
+ method='GET',
296
+ resource_path='/transactions/{id}',
297
+ path_params=_path_params,
298
+ query_params=_query_params,
299
+ header_params=_header_params,
300
+ body=_body_params,
301
+ post_params=_form_params,
302
+ files=_files,
303
+ auth_settings=_auth_settings,
304
+ collection_formats=_collection_formats,
305
+ _host=_host,
306
+ _request_auth=_request_auth
307
+ )
308
+
309
+
310
+
311
+
312
+ @validate_call
313
+ async def read_transactions_transactions_get(
314
+ self,
315
+ id: Optional[StrictInt] = None,
316
+ domain__isnull: Optional[StrictBool] = None,
317
+ domain: Optional[Domain] = None,
318
+ job__isnull: Optional[StrictBool] = None,
319
+ job: Optional[StrictInt] = None,
320
+ team_id: Optional[StrictInt] = None,
321
+ member_id__isnull: Optional[StrictBool] = None,
322
+ member_id: Optional[StrictInt] = None,
323
+ change: Optional[StrictInt] = None,
324
+ timestamp: Optional[datetime] = None,
325
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
326
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
327
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
328
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
329
+ _request_timeout: Union[
330
+ None,
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Tuple[
333
+ Annotated[StrictFloat, Field(gt=0)],
334
+ Annotated[StrictFloat, Field(gt=0)]
335
+ ]
336
+ ] = None,
337
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
338
+ _content_type: Optional[StrictStr] = None,
339
+ _headers: Optional[Dict[StrictStr, Any]] = None,
340
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
341
+ ) -> PageTransaction:
342
+ """List transactions
343
+
344
+ Read transactions.
345
+
346
+ :param id:
347
+ :type id: int
348
+ :param domain__isnull:
349
+ :type domain__isnull: bool
350
+ :param domain:
351
+ :type domain: Domain
352
+ :param job__isnull:
353
+ :type job__isnull: bool
354
+ :param job:
355
+ :type job: int
356
+ :param team_id:
357
+ :type team_id: int
358
+ :param member_id__isnull:
359
+ :type member_id__isnull: bool
360
+ :param member_id:
361
+ :type member_id: int
362
+ :param change:
363
+ :type change: int
364
+ :param timestamp:
365
+ :type timestamp: datetime
366
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
367
+ :type sort_by: str
368
+ :param latest: If True gets the most recently created object.
369
+ :type latest: bool
370
+ :param page: Page number
371
+ :type page: int
372
+ :param size: Page size
373
+ :type size: int
374
+ :param _request_timeout: timeout setting for this request. If one
375
+ number provided, it will be total request
376
+ timeout. It can also be a pair (tuple) of
377
+ (connection, read) timeouts.
378
+ :type _request_timeout: int, tuple(int, int), optional
379
+ :param _request_auth: set to override the auth_settings for an a single
380
+ request; this effectively ignores the
381
+ authentication in the spec for a single request.
382
+ :type _request_auth: dict, optional
383
+ :param _content_type: force content-type for the request.
384
+ :type _content_type: str, Optional
385
+ :param _headers: set to override the headers for a single
386
+ request; this effectively ignores the headers
387
+ in the spec for a single request.
388
+ :type _headers: dict, optional
389
+ :param _host_index: set to override the host_index for a single
390
+ request; this effectively ignores the host_index
391
+ in the spec for a single request.
392
+ :type _host_index: int, optional
393
+ :return: Returns the result object.
394
+ """ # noqa: E501
395
+
396
+ _param = self._read_transactions_transactions_get_serialize(
397
+ id=id,
398
+ domain__isnull=domain__isnull,
399
+ domain=domain,
400
+ job__isnull=job__isnull,
401
+ job=job,
402
+ team_id=team_id,
403
+ member_id__isnull=member_id__isnull,
404
+ member_id=member_id,
405
+ change=change,
406
+ timestamp=timestamp,
407
+ sort_by=sort_by,
408
+ latest=latest,
409
+ page=page,
410
+ size=size,
411
+ _request_auth=_request_auth,
412
+ _content_type=_content_type,
413
+ _headers=_headers,
414
+ _host_index=_host_index
415
+ )
416
+
417
+ _response_types_map: Dict[str, Optional[str]] = {
418
+ '200': "PageTransaction",
419
+ '422': "HTTPValidationError",
420
+ }
421
+ response_data = await self.api_client.call_api(
422
+ *_param,
423
+ _request_timeout=_request_timeout
424
+ )
425
+ await response_data.read()
426
+ return self.api_client.response_deserialize(
427
+ response_data=response_data,
428
+ response_types_map=_response_types_map,
429
+ ).data
430
+
431
+
432
+ @validate_call
433
+ async def read_transactions_transactions_get_with_http_info(
434
+ self,
435
+ id: Optional[StrictInt] = None,
436
+ domain__isnull: Optional[StrictBool] = None,
437
+ domain: Optional[Domain] = None,
438
+ job__isnull: Optional[StrictBool] = None,
439
+ job: Optional[StrictInt] = None,
440
+ team_id: Optional[StrictInt] = None,
441
+ member_id__isnull: Optional[StrictBool] = None,
442
+ member_id: Optional[StrictInt] = None,
443
+ change: Optional[StrictInt] = None,
444
+ timestamp: Optional[datetime] = None,
445
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
446
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
447
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
448
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
449
+ _request_timeout: Union[
450
+ None,
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Tuple[
453
+ Annotated[StrictFloat, Field(gt=0)],
454
+ Annotated[StrictFloat, Field(gt=0)]
455
+ ]
456
+ ] = None,
457
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
458
+ _content_type: Optional[StrictStr] = None,
459
+ _headers: Optional[Dict[StrictStr, Any]] = None,
460
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
461
+ ) -> ApiResponse[PageTransaction]:
462
+ """List transactions
463
+
464
+ Read transactions.
465
+
466
+ :param id:
467
+ :type id: int
468
+ :param domain__isnull:
469
+ :type domain__isnull: bool
470
+ :param domain:
471
+ :type domain: Domain
472
+ :param job__isnull:
473
+ :type job__isnull: bool
474
+ :param job:
475
+ :type job: int
476
+ :param team_id:
477
+ :type team_id: int
478
+ :param member_id__isnull:
479
+ :type member_id__isnull: bool
480
+ :param member_id:
481
+ :type member_id: int
482
+ :param change:
483
+ :type change: int
484
+ :param timestamp:
485
+ :type timestamp: datetime
486
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
487
+ :type sort_by: str
488
+ :param latest: If True gets the most recently created object.
489
+ :type latest: bool
490
+ :param page: Page number
491
+ :type page: int
492
+ :param size: Page size
493
+ :type size: int
494
+ :param _request_timeout: timeout setting for this request. If one
495
+ number provided, it will be total request
496
+ timeout. It can also be a pair (tuple) of
497
+ (connection, read) timeouts.
498
+ :type _request_timeout: int, tuple(int, int), optional
499
+ :param _request_auth: set to override the auth_settings for an a single
500
+ request; this effectively ignores the
501
+ authentication in the spec for a single request.
502
+ :type _request_auth: dict, optional
503
+ :param _content_type: force content-type for the request.
504
+ :type _content_type: str, Optional
505
+ :param _headers: set to override the headers for a single
506
+ request; this effectively ignores the headers
507
+ in the spec for a single request.
508
+ :type _headers: dict, optional
509
+ :param _host_index: set to override the host_index for a single
510
+ request; this effectively ignores the host_index
511
+ in the spec for a single request.
512
+ :type _host_index: int, optional
513
+ :return: Returns the result object.
514
+ """ # noqa: E501
515
+
516
+ _param = self._read_transactions_transactions_get_serialize(
517
+ id=id,
518
+ domain__isnull=domain__isnull,
519
+ domain=domain,
520
+ job__isnull=job__isnull,
521
+ job=job,
522
+ team_id=team_id,
523
+ member_id__isnull=member_id__isnull,
524
+ member_id=member_id,
525
+ change=change,
526
+ timestamp=timestamp,
527
+ sort_by=sort_by,
528
+ latest=latest,
529
+ page=page,
530
+ size=size,
531
+ _request_auth=_request_auth,
532
+ _content_type=_content_type,
533
+ _headers=_headers,
534
+ _host_index=_host_index
535
+ )
536
+
537
+ _response_types_map: Dict[str, Optional[str]] = {
538
+ '200': "PageTransaction",
539
+ '422': "HTTPValidationError",
540
+ }
541
+ response_data = await self.api_client.call_api(
542
+ *_param,
543
+ _request_timeout=_request_timeout
544
+ )
545
+ await response_data.read()
546
+ return self.api_client.response_deserialize(
547
+ response_data=response_data,
548
+ response_types_map=_response_types_map,
549
+ )
550
+
551
+
552
+ @validate_call
553
+ async def read_transactions_transactions_get_without_preload_content(
554
+ self,
555
+ id: Optional[StrictInt] = None,
556
+ domain__isnull: Optional[StrictBool] = None,
557
+ domain: Optional[Domain] = None,
558
+ job__isnull: Optional[StrictBool] = None,
559
+ job: Optional[StrictInt] = None,
560
+ team_id: Optional[StrictInt] = None,
561
+ member_id__isnull: Optional[StrictBool] = None,
562
+ member_id: Optional[StrictInt] = None,
563
+ change: Optional[StrictInt] = None,
564
+ timestamp: Optional[datetime] = None,
565
+ sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
566
+ latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
567
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
568
+ size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
569
+ _request_timeout: Union[
570
+ None,
571
+ Annotated[StrictFloat, Field(gt=0)],
572
+ Tuple[
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Annotated[StrictFloat, Field(gt=0)]
575
+ ]
576
+ ] = None,
577
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
578
+ _content_type: Optional[StrictStr] = None,
579
+ _headers: Optional[Dict[StrictStr, Any]] = None,
580
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
581
+ ) -> RESTResponseType:
582
+ """List transactions
583
+
584
+ Read transactions.
585
+
586
+ :param id:
587
+ :type id: int
588
+ :param domain__isnull:
589
+ :type domain__isnull: bool
590
+ :param domain:
591
+ :type domain: Domain
592
+ :param job__isnull:
593
+ :type job__isnull: bool
594
+ :param job:
595
+ :type job: int
596
+ :param team_id:
597
+ :type team_id: int
598
+ :param member_id__isnull:
599
+ :type member_id__isnull: bool
600
+ :param member_id:
601
+ :type member_id: int
602
+ :param change:
603
+ :type change: int
604
+ :param timestamp:
605
+ :type timestamp: datetime
606
+ :param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
607
+ :type sort_by: str
608
+ :param latest: If True gets the most recently created object.
609
+ :type latest: bool
610
+ :param page: Page number
611
+ :type page: int
612
+ :param size: Page size
613
+ :type size: int
614
+ :param _request_timeout: timeout setting for this request. If one
615
+ number provided, it will be total request
616
+ timeout. It can also be a pair (tuple) of
617
+ (connection, read) timeouts.
618
+ :type _request_timeout: int, tuple(int, int), optional
619
+ :param _request_auth: set to override the auth_settings for an a single
620
+ request; this effectively ignores the
621
+ authentication in the spec for a single request.
622
+ :type _request_auth: dict, optional
623
+ :param _content_type: force content-type for the request.
624
+ :type _content_type: str, Optional
625
+ :param _headers: set to override the headers for a single
626
+ request; this effectively ignores the headers
627
+ in the spec for a single request.
628
+ :type _headers: dict, optional
629
+ :param _host_index: set to override the host_index for a single
630
+ request; this effectively ignores the host_index
631
+ in the spec for a single request.
632
+ :type _host_index: int, optional
633
+ :return: Returns the result object.
634
+ """ # noqa: E501
635
+
636
+ _param = self._read_transactions_transactions_get_serialize(
637
+ id=id,
638
+ domain__isnull=domain__isnull,
639
+ domain=domain,
640
+ job__isnull=job__isnull,
641
+ job=job,
642
+ team_id=team_id,
643
+ member_id__isnull=member_id__isnull,
644
+ member_id=member_id,
645
+ change=change,
646
+ timestamp=timestamp,
647
+ sort_by=sort_by,
648
+ latest=latest,
649
+ page=page,
650
+ size=size,
651
+ _request_auth=_request_auth,
652
+ _content_type=_content_type,
653
+ _headers=_headers,
654
+ _host_index=_host_index
655
+ )
656
+
657
+ _response_types_map: Dict[str, Optional[str]] = {
658
+ '200': "PageTransaction",
659
+ '422': "HTTPValidationError",
660
+ }
661
+ response_data = await self.api_client.call_api(
662
+ *_param,
663
+ _request_timeout=_request_timeout
664
+ )
665
+ return response_data.response
666
+
667
+
668
+ def _read_transactions_transactions_get_serialize(
669
+ self,
670
+ id,
671
+ domain__isnull,
672
+ domain,
673
+ job__isnull,
674
+ job,
675
+ team_id,
676
+ member_id__isnull,
677
+ member_id,
678
+ change,
679
+ timestamp,
680
+ sort_by,
681
+ latest,
682
+ page,
683
+ size,
684
+ _request_auth,
685
+ _content_type,
686
+ _headers,
687
+ _host_index,
688
+ ) -> RequestSerialized:
689
+
690
+ _host = None
691
+
692
+ _collection_formats: Dict[str, str] = {
693
+ }
694
+
695
+ _path_params: Dict[str, str] = {}
696
+ _query_params: List[Tuple[str, str]] = []
697
+ _header_params: Dict[str, Optional[str]] = _headers or {}
698
+ _form_params: List[Tuple[str, str]] = []
699
+ _files: Dict[
700
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
701
+ ] = {}
702
+ _body_params: Optional[bytes] = None
703
+
704
+ # process the path parameters
705
+ # process the query parameters
706
+ if id is not None:
707
+
708
+ _query_params.append(('id', id))
709
+
710
+ if domain__isnull is not None:
711
+
712
+ _query_params.append(('domain__isnull', domain__isnull))
713
+
714
+ if domain is not None:
715
+
716
+ _query_params.append(('domain', domain.value))
717
+
718
+ if job__isnull is not None:
719
+
720
+ _query_params.append(('job__isnull', job__isnull))
721
+
722
+ if job is not None:
723
+
724
+ _query_params.append(('job', job))
725
+
726
+ if team_id is not None:
727
+
728
+ _query_params.append(('team_id', team_id))
729
+
730
+ if member_id__isnull is not None:
731
+
732
+ _query_params.append(('member_id__isnull', member_id__isnull))
733
+
734
+ if member_id is not None:
735
+
736
+ _query_params.append(('member_id', member_id))
737
+
738
+ if change is not None:
739
+
740
+ _query_params.append(('change', change))
741
+
742
+ if timestamp is not None:
743
+ if isinstance(timestamp, datetime):
744
+ _query_params.append(
745
+ (
746
+ 'timestamp',
747
+ timestamp.strftime(
748
+ self.api_client.configuration.datetime_format
749
+ )
750
+ )
751
+ )
752
+ else:
753
+ _query_params.append(('timestamp', timestamp))
754
+
755
+ if sort_by is not None:
756
+
757
+ _query_params.append(('sort_by', sort_by))
758
+
759
+ if latest is not None:
760
+
761
+ _query_params.append(('latest', latest))
762
+
763
+ if page is not None:
764
+
765
+ _query_params.append(('page', page))
766
+
767
+ if size is not None:
768
+
769
+ _query_params.append(('size', size))
770
+
771
+ # process the header parameters
772
+ # process the form parameters
773
+ # process the body parameter
774
+
775
+
776
+ # set the HTTP header `Accept`
777
+ if 'Accept' not in _header_params:
778
+ _header_params['Accept'] = self.api_client.select_header_accept(
779
+ [
780
+ 'application/json'
781
+ ]
782
+ )
783
+
784
+
785
+ # authentication setting
786
+ _auth_settings: List[str] = [
787
+ 'user_bearer'
788
+ ]
789
+
790
+ return self.api_client.param_serialize(
791
+ method='GET',
792
+ resource_path='/transactions/',
793
+ path_params=_path_params,
794
+ query_params=_query_params,
795
+ header_params=_header_params,
796
+ body=_body_params,
797
+ post_params=_form_params,
798
+ files=_files,
799
+ auth_settings=_auth_settings,
800
+ collection_formats=_collection_formats,
801
+ _host=_host,
802
+ _request_auth=_request_auth
803
+ )
804
+
805
+