zrok2-build-debugging 22.0.2000008__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 (213) hide show
  1. test/__init__.py +0 -0
  2. test/test_access201_response.py +52 -0
  3. test/test_access_request.py +54 -0
  4. test/test_access_summary.py +60 -0
  5. test/test_accesses_list.py +63 -0
  6. test/test_account_api.py +79 -0
  7. test/test_add_frontend_grant_request.py +52 -0
  8. test/test_add_namespace_frontend_mapping_request.py +53 -0
  9. test/test_add_namespace_grant_request.py +52 -0
  10. test/test_add_organization_member_request.py +53 -0
  11. test/test_admin_api.py +199 -0
  12. test/test_agent_api.py +85 -0
  13. test/test_auth_user.py +52 -0
  14. test/test_change_password_request.py +53 -0
  15. test/test_client_version_check_request.py +51 -0
  16. test/test_configuration.py +56 -0
  17. test/test_create_frontend201_response.py +51 -0
  18. test/test_create_frontend_request.py +55 -0
  19. test/test_create_identity201_response.py +52 -0
  20. test/test_create_identity_request.py +51 -0
  21. test/test_create_namespace201_response.py +51 -0
  22. test/test_create_namespace_request.py +54 -0
  23. test/test_create_organization201_response.py +51 -0
  24. test/test_create_organization_request.py +51 -0
  25. test/test_create_share_name_request.py +52 -0
  26. test/test_delete_identity_request.py +51 -0
  27. test/test_disable_request.py +51 -0
  28. test/test_enable_request.py +52 -0
  29. test/test_enroll200_response.py +51 -0
  30. test/test_enroll_request.py +51 -0
  31. test/test_environment.py +63 -0
  32. test/test_environment_and_resources.py +96 -0
  33. test/test_environment_api.py +43 -0
  34. test/test_environment_summary.py +60 -0
  35. test/test_environments_list.py +63 -0
  36. test/test_frontend.py +59 -0
  37. test/test_get_sparklines200_response.py +62 -0
  38. test/test_get_sparklines_request.py +57 -0
  39. test/test_invite_request.py +52 -0
  40. test/test_invite_token_generate_request.py +53 -0
  41. test/test_list_frontend_namespace_mappings200_response_inner.py +54 -0
  42. test/test_list_frontends200_response_inner.py +58 -0
  43. test/test_list_memberships200_response.py +56 -0
  44. test/test_list_memberships200_response_memberships_inner.py +53 -0
  45. test/test_list_namespaces200_response_inner.py +56 -0
  46. test/test_list_organization_members200_response.py +55 -0
  47. test/test_list_organization_members200_response_members_inner.py +52 -0
  48. test/test_list_organizations200_response.py +55 -0
  49. test/test_list_organizations200_response_organizations_inner.py +52 -0
  50. test/test_list_share_namespaces200_response_inner.py +53 -0
  51. test/test_login_request.py +52 -0
  52. test/test_metadata_api.py +145 -0
  53. test/test_metrics.py +59 -0
  54. test/test_metrics_sample.py +53 -0
  55. test/test_name.py +56 -0
  56. test/test_name_selection.py +52 -0
  57. test/test_overview.py +110 -0
  58. test/test_overview_names_inner.py +56 -0
  59. test/test_ping200_response.py +51 -0
  60. test/test_principal.py +55 -0
  61. test/test_regenerate_account_token200_response.py +51 -0
  62. test/test_regenerate_account_token_request.py +51 -0
  63. test/test_register_request.py +52 -0
  64. test/test_remote_access_request.py +60 -0
  65. test/test_remote_share200_response.py +54 -0
  66. test/test_remote_share_request.py +74 -0
  67. test/test_remote_status200_response.py +82 -0
  68. test/test_remote_status200_response_accesses_inner.py +62 -0
  69. test/test_remote_status200_response_shares_inner.py +64 -0
  70. test/test_remote_status200_response_shares_inner_failure.py +54 -0
  71. test/test_remote_unaccess_request.py +52 -0
  72. test/test_remote_unshare_request.py +52 -0
  73. test/test_remove_namespace_frontend_mapping_request.py +52 -0
  74. test/test_remove_organization_member_request.py +52 -0
  75. test/test_reset_password_request.py +52 -0
  76. test/test_share.py +67 -0
  77. test/test_share_api.py +103 -0
  78. test/test_share_http_healthcheck200_response.py +52 -0
  79. test/test_share_http_healthcheck_request.py +56 -0
  80. test/test_share_request.py +75 -0
  81. test/test_share_response.py +54 -0
  82. test/test_share_summary.py +62 -0
  83. test/test_shares_list.py +65 -0
  84. test/test_spark_data_sample.py +52 -0
  85. test/test_unaccess_request.py +53 -0
  86. test/test_unshare_request.py +52 -0
  87. test/test_update_access_request.py +53 -0
  88. test/test_update_frontend_request.py +55 -0
  89. test/test_update_namespace_request.py +55 -0
  90. test/test_update_share_name_request.py +53 -0
  91. test/test_update_share_request.py +57 -0
  92. test/test_verify200_response.py +51 -0
  93. test/test_verify_request.py +51 -0
  94. test/test_version_inventory200_response.py +51 -0
  95. zrok/__init__.py +4 -0
  96. zrok/_version.py +21 -0
  97. zrok/access.py +58 -0
  98. zrok/decor.py +33 -0
  99. zrok/dialer.py +10 -0
  100. zrok/environment/__init__.py +1 -0
  101. zrok/environment/dirs.py +32 -0
  102. zrok/environment/root.py +182 -0
  103. zrok/listener.py +29 -0
  104. zrok/model.py +75 -0
  105. zrok/overview.py +77 -0
  106. zrok/proxy.py +203 -0
  107. zrok/share.py +199 -0
  108. zrok2_build_debugging-22.0.2000008.dist-info/METADATA +24 -0
  109. zrok2_build_debugging-22.0.2000008.dist-info/RECORD +213 -0
  110. zrok2_build_debugging-22.0.2000008.dist-info/WHEEL +5 -0
  111. zrok2_build_debugging-22.0.2000008.dist-info/top_level.txt +3 -0
  112. zrok_api/__init__.py +231 -0
  113. zrok_api/api/__init__.py +10 -0
  114. zrok_api/api/account_api.py +2261 -0
  115. zrok_api/api/admin_api.py +7673 -0
  116. zrok_api/api/agent_api.py +2547 -0
  117. zrok_api/api/environment_api.py +589 -0
  118. zrok_api/api/metadata_api.py +5614 -0
  119. zrok_api/api/share_api.py +3321 -0
  120. zrok_api/api_client.py +801 -0
  121. zrok_api/api_response.py +21 -0
  122. zrok_api/configuration.py +602 -0
  123. zrok_api/exceptions.py +216 -0
  124. zrok_api/models/__init__.py +103 -0
  125. zrok_api/models/access201_response.py +89 -0
  126. zrok_api/models/access_request.py +93 -0
  127. zrok_api/models/access_summary.py +105 -0
  128. zrok_api/models/accesses_list.py +95 -0
  129. zrok_api/models/add_frontend_grant_request.py +89 -0
  130. zrok_api/models/add_namespace_frontend_mapping_request.py +91 -0
  131. zrok_api/models/add_namespace_grant_request.py +89 -0
  132. zrok_api/models/add_organization_member_request.py +91 -0
  133. zrok_api/models/auth_user.py +89 -0
  134. zrok_api/models/change_password_request.py +91 -0
  135. zrok_api/models/client_version_check_request.py +87 -0
  136. zrok_api/models/configuration.py +97 -0
  137. zrok_api/models/create_frontend201_response.py +87 -0
  138. zrok_api/models/create_frontend_request.py +105 -0
  139. zrok_api/models/create_identity201_response.py +89 -0
  140. zrok_api/models/create_identity_request.py +87 -0
  141. zrok_api/models/create_namespace201_response.py +87 -0
  142. zrok_api/models/create_namespace_request.py +93 -0
  143. zrok_api/models/create_organization201_response.py +87 -0
  144. zrok_api/models/create_organization_request.py +87 -0
  145. zrok_api/models/create_share_name_request.py +89 -0
  146. zrok_api/models/delete_identity_request.py +87 -0
  147. zrok_api/models/disable_request.py +87 -0
  148. zrok_api/models/enable_request.py +89 -0
  149. zrok_api/models/enroll200_response.py +87 -0
  150. zrok_api/models/enroll_request.py +87 -0
  151. zrok_api/models/environment.py +111 -0
  152. zrok_api/models/environment_and_resources.py +111 -0
  153. zrok_api/models/environment_summary.py +105 -0
  154. zrok_api/models/environments_list.py +95 -0
  155. zrok_api/models/frontend.py +103 -0
  156. zrok_api/models/get_sparklines200_response.py +95 -0
  157. zrok_api/models/get_sparklines_request.py +91 -0
  158. zrok_api/models/invite_request.py +89 -0
  159. zrok_api/models/invite_token_generate_request.py +87 -0
  160. zrok_api/models/list_frontend_namespace_mappings200_response_inner.py +93 -0
  161. zrok_api/models/list_frontends200_response_inner.py +101 -0
  162. zrok_api/models/list_memberships200_response.py +95 -0
  163. zrok_api/models/list_memberships200_response_memberships_inner.py +91 -0
  164. zrok_api/models/list_namespaces200_response_inner.py +97 -0
  165. zrok_api/models/list_organization_members200_response.py +95 -0
  166. zrok_api/models/list_organization_members200_response_members_inner.py +89 -0
  167. zrok_api/models/list_organizations200_response.py +95 -0
  168. zrok_api/models/list_organizations200_response_organizations_inner.py +89 -0
  169. zrok_api/models/list_share_namespaces200_response_inner.py +91 -0
  170. zrok_api/models/login_request.py +89 -0
  171. zrok_api/models/metrics.py +101 -0
  172. zrok_api/models/metrics_sample.py +91 -0
  173. zrok_api/models/name.py +97 -0
  174. zrok_api/models/name_selection.py +89 -0
  175. zrok_api/models/overview.py +117 -0
  176. zrok_api/models/overview_names_inner.py +97 -0
  177. zrok_api/models/ping200_response.py +87 -0
  178. zrok_api/models/principal.py +95 -0
  179. zrok_api/models/regenerate_account_token200_response.py +87 -0
  180. zrok_api/models/regenerate_account_token_request.py +87 -0
  181. zrok_api/models/register_request.py +89 -0
  182. zrok_api/models/remote_access_request.py +102 -0
  183. zrok_api/models/remote_share200_response.py +89 -0
  184. zrok_api/models/remote_share_request.py +141 -0
  185. zrok_api/models/remote_status200_response.py +105 -0
  186. zrok_api/models/remote_status200_response_accesses_inner.py +101 -0
  187. zrok_api/models/remote_status200_response_shares_inner.py +105 -0
  188. zrok_api/models/remote_status200_response_shares_inner_failure.py +93 -0
  189. zrok_api/models/remote_unaccess_request.py +89 -0
  190. zrok_api/models/remote_unshare_request.py +89 -0
  191. zrok_api/models/remove_namespace_frontend_mapping_request.py +89 -0
  192. zrok_api/models/remove_organization_member_request.py +89 -0
  193. zrok_api/models/reset_password_request.py +89 -0
  194. zrok_api/models/share.py +115 -0
  195. zrok_api/models/share_http_healthcheck200_response.py +89 -0
  196. zrok_api/models/share_http_healthcheck_request.py +97 -0
  197. zrok_api/models/share_request.py +157 -0
  198. zrok_api/models/share_response.py +89 -0
  199. zrok_api/models/share_summary.py +105 -0
  200. zrok_api/models/shares_list.py +95 -0
  201. zrok_api/models/spark_data_sample.py +89 -0
  202. zrok_api/models/unaccess_request.py +91 -0
  203. zrok_api/models/unshare_request.py +89 -0
  204. zrok_api/models/update_access_request.py +91 -0
  205. zrok_api/models/update_frontend_request.py +95 -0
  206. zrok_api/models/update_namespace_request.py +95 -0
  207. zrok_api/models/update_share_name_request.py +91 -0
  208. zrok_api/models/update_share_request.py +91 -0
  209. zrok_api/models/verify200_response.py +87 -0
  210. zrok_api/models/verify_request.py +87 -0
  211. zrok_api/models/version_inventory200_response.py +87 -0
  212. zrok_api/py.typed +0 -0
  213. zrok_api/rest.py +258 -0
@@ -0,0 +1,2261 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ zrok
5
+
6
+ zrok client access
7
+
8
+ The version of the OpenAPI document: 2.0.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 pydantic import StrictStr
20
+ from typing import Optional
21
+ from zrok_api.models.change_password_request import ChangePasswordRequest
22
+ from zrok_api.models.invite_request import InviteRequest
23
+ from zrok_api.models.login_request import LoginRequest
24
+ from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response
25
+ from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest
26
+ from zrok_api.models.register_request import RegisterRequest
27
+ from zrok_api.models.reset_password_request import ResetPasswordRequest
28
+ from zrok_api.models.verify200_response import Verify200Response
29
+ from zrok_api.models.verify_request import VerifyRequest
30
+
31
+ from zrok_api.api_client import ApiClient, RequestSerialized
32
+ from zrok_api.api_response import ApiResponse
33
+ from zrok_api.rest import RESTResponseType
34
+
35
+
36
+ class AccountApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def change_password(
51
+ self,
52
+ body: Optional[ChangePasswordRequest] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> None:
66
+ """change_password
67
+
68
+
69
+ :param body:
70
+ :type body: ChangePasswordRequest
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._change_password_serialize(
94
+ body=body,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': None,
103
+ '400': None,
104
+ '401': None,
105
+ '422': "str",
106
+ '500': None,
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def change_password_with_http_info(
121
+ self,
122
+ body: Optional[ChangePasswordRequest] = None,
123
+ _request_timeout: Union[
124
+ None,
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Tuple[
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Annotated[StrictFloat, Field(gt=0)]
129
+ ]
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[None]:
136
+ """change_password
137
+
138
+
139
+ :param body:
140
+ :type body: ChangePasswordRequest
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._change_password_serialize(
164
+ body=body,
165
+ _request_auth=_request_auth,
166
+ _content_type=_content_type,
167
+ _headers=_headers,
168
+ _host_index=_host_index
169
+ )
170
+
171
+ _response_types_map: Dict[str, Optional[str]] = {
172
+ '200': None,
173
+ '400': None,
174
+ '401': None,
175
+ '422': "str",
176
+ '500': None,
177
+ }
178
+ response_data = self.api_client.call_api(
179
+ *_param,
180
+ _request_timeout=_request_timeout
181
+ )
182
+ response_data.read()
183
+ return self.api_client.response_deserialize(
184
+ response_data=response_data,
185
+ response_types_map=_response_types_map,
186
+ )
187
+
188
+
189
+ @validate_call
190
+ def change_password_without_preload_content(
191
+ self,
192
+ body: Optional[ChangePasswordRequest] = None,
193
+ _request_timeout: Union[
194
+ None,
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Tuple[
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Annotated[StrictFloat, Field(gt=0)]
199
+ ]
200
+ ] = None,
201
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
+ _content_type: Optional[StrictStr] = None,
203
+ _headers: Optional[Dict[StrictStr, Any]] = None,
204
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
+ ) -> RESTResponseType:
206
+ """change_password
207
+
208
+
209
+ :param body:
210
+ :type body: ChangePasswordRequest
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._change_password_serialize(
234
+ body=body,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ '200': None,
243
+ '400': None,
244
+ '401': None,
245
+ '422': "str",
246
+ '500': None,
247
+ }
248
+ response_data = self.api_client.call_api(
249
+ *_param,
250
+ _request_timeout=_request_timeout
251
+ )
252
+ return response_data.response
253
+
254
+
255
+ def _change_password_serialize(
256
+ self,
257
+ body,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> RequestSerialized:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ # process the query parameters
280
+ # process the header parameters
281
+ # process the form parameters
282
+ # process the body parameter
283
+ if body is not None:
284
+ _body_params = body
285
+
286
+
287
+ # set the HTTP header `Accept`
288
+ if 'Accept' not in _header_params:
289
+ _header_params['Accept'] = self.api_client.select_header_accept(
290
+ [
291
+ 'application/zrok.v1+json'
292
+ ]
293
+ )
294
+
295
+ # set the HTTP header `Content-Type`
296
+ if _content_type:
297
+ _header_params['Content-Type'] = _content_type
298
+ else:
299
+ _default_content_type = (
300
+ self.api_client.select_header_content_type(
301
+ [
302
+ 'application/zrok.v1+json'
303
+ ]
304
+ )
305
+ )
306
+ if _default_content_type is not None:
307
+ _header_params['Content-Type'] = _default_content_type
308
+
309
+ # authentication setting
310
+ _auth_settings: List[str] = [
311
+ 'key'
312
+ ]
313
+
314
+ return self.api_client.param_serialize(
315
+ method='POST',
316
+ resource_path='/changePassword',
317
+ path_params=_path_params,
318
+ query_params=_query_params,
319
+ header_params=_header_params,
320
+ body=_body_params,
321
+ post_params=_form_params,
322
+ files=_files,
323
+ auth_settings=_auth_settings,
324
+ collection_formats=_collection_formats,
325
+ _host=_host,
326
+ _request_auth=_request_auth
327
+ )
328
+
329
+
330
+
331
+
332
+ @validate_call
333
+ def invite(
334
+ self,
335
+ body: Optional[InviteRequest] = None,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Annotated[StrictFloat, Field(gt=0)]
342
+ ]
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> None:
349
+ """invite
350
+
351
+
352
+ :param body:
353
+ :type body: InviteRequest
354
+ :param _request_timeout: timeout setting for this request. If one
355
+ number provided, it will be total request
356
+ timeout. It can also be a pair (tuple) of
357
+ (connection, read) timeouts.
358
+ :type _request_timeout: int, tuple(int, int), optional
359
+ :param _request_auth: set to override the auth_settings for an a single
360
+ request; this effectively ignores the
361
+ authentication in the spec for a single request.
362
+ :type _request_auth: dict, optional
363
+ :param _content_type: force content-type for the request.
364
+ :type _content_type: str, Optional
365
+ :param _headers: set to override the headers for a single
366
+ request; this effectively ignores the headers
367
+ in the spec for a single request.
368
+ :type _headers: dict, optional
369
+ :param _host_index: set to override the host_index for a single
370
+ request; this effectively ignores the host_index
371
+ in the spec for a single request.
372
+ :type _host_index: int, optional
373
+ :return: Returns the result object.
374
+ """ # noqa: E501
375
+
376
+ _param = self._invite_serialize(
377
+ body=body,
378
+ _request_auth=_request_auth,
379
+ _content_type=_content_type,
380
+ _headers=_headers,
381
+ _host_index=_host_index
382
+ )
383
+
384
+ _response_types_map: Dict[str, Optional[str]] = {
385
+ '201': None,
386
+ '400': "str",
387
+ '401': None,
388
+ '500': None,
389
+ }
390
+ response_data = self.api_client.call_api(
391
+ *_param,
392
+ _request_timeout=_request_timeout
393
+ )
394
+ response_data.read()
395
+ return self.api_client.response_deserialize(
396
+ response_data=response_data,
397
+ response_types_map=_response_types_map,
398
+ ).data
399
+
400
+
401
+ @validate_call
402
+ def invite_with_http_info(
403
+ self,
404
+ body: Optional[InviteRequest] = None,
405
+ _request_timeout: Union[
406
+ None,
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Tuple[
409
+ Annotated[StrictFloat, Field(gt=0)],
410
+ Annotated[StrictFloat, Field(gt=0)]
411
+ ]
412
+ ] = None,
413
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
414
+ _content_type: Optional[StrictStr] = None,
415
+ _headers: Optional[Dict[StrictStr, Any]] = None,
416
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
417
+ ) -> ApiResponse[None]:
418
+ """invite
419
+
420
+
421
+ :param body:
422
+ :type body: InviteRequest
423
+ :param _request_timeout: timeout setting for this request. If one
424
+ number provided, it will be total request
425
+ timeout. It can also be a pair (tuple) of
426
+ (connection, read) timeouts.
427
+ :type _request_timeout: int, tuple(int, int), optional
428
+ :param _request_auth: set to override the auth_settings for an a single
429
+ request; this effectively ignores the
430
+ authentication in the spec for a single request.
431
+ :type _request_auth: dict, optional
432
+ :param _content_type: force content-type for the request.
433
+ :type _content_type: str, Optional
434
+ :param _headers: set to override the headers for a single
435
+ request; this effectively ignores the headers
436
+ in the spec for a single request.
437
+ :type _headers: dict, optional
438
+ :param _host_index: set to override the host_index for a single
439
+ request; this effectively ignores the host_index
440
+ in the spec for a single request.
441
+ :type _host_index: int, optional
442
+ :return: Returns the result object.
443
+ """ # noqa: E501
444
+
445
+ _param = self._invite_serialize(
446
+ body=body,
447
+ _request_auth=_request_auth,
448
+ _content_type=_content_type,
449
+ _headers=_headers,
450
+ _host_index=_host_index
451
+ )
452
+
453
+ _response_types_map: Dict[str, Optional[str]] = {
454
+ '201': None,
455
+ '400': "str",
456
+ '401': None,
457
+ '500': None,
458
+ }
459
+ response_data = self.api_client.call_api(
460
+ *_param,
461
+ _request_timeout=_request_timeout
462
+ )
463
+ response_data.read()
464
+ return self.api_client.response_deserialize(
465
+ response_data=response_data,
466
+ response_types_map=_response_types_map,
467
+ )
468
+
469
+
470
+ @validate_call
471
+ def invite_without_preload_content(
472
+ self,
473
+ body: Optional[InviteRequest] = None,
474
+ _request_timeout: Union[
475
+ None,
476
+ Annotated[StrictFloat, Field(gt=0)],
477
+ Tuple[
478
+ Annotated[StrictFloat, Field(gt=0)],
479
+ Annotated[StrictFloat, Field(gt=0)]
480
+ ]
481
+ ] = None,
482
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
483
+ _content_type: Optional[StrictStr] = None,
484
+ _headers: Optional[Dict[StrictStr, Any]] = None,
485
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
486
+ ) -> RESTResponseType:
487
+ """invite
488
+
489
+
490
+ :param body:
491
+ :type body: InviteRequest
492
+ :param _request_timeout: timeout setting for this request. If one
493
+ number provided, it will be total request
494
+ timeout. It can also be a pair (tuple) of
495
+ (connection, read) timeouts.
496
+ :type _request_timeout: int, tuple(int, int), optional
497
+ :param _request_auth: set to override the auth_settings for an a single
498
+ request; this effectively ignores the
499
+ authentication in the spec for a single request.
500
+ :type _request_auth: dict, optional
501
+ :param _content_type: force content-type for the request.
502
+ :type _content_type: str, Optional
503
+ :param _headers: set to override the headers for a single
504
+ request; this effectively ignores the headers
505
+ in the spec for a single request.
506
+ :type _headers: dict, optional
507
+ :param _host_index: set to override the host_index for a single
508
+ request; this effectively ignores the host_index
509
+ in the spec for a single request.
510
+ :type _host_index: int, optional
511
+ :return: Returns the result object.
512
+ """ # noqa: E501
513
+
514
+ _param = self._invite_serialize(
515
+ body=body,
516
+ _request_auth=_request_auth,
517
+ _content_type=_content_type,
518
+ _headers=_headers,
519
+ _host_index=_host_index
520
+ )
521
+
522
+ _response_types_map: Dict[str, Optional[str]] = {
523
+ '201': None,
524
+ '400': "str",
525
+ '401': None,
526
+ '500': None,
527
+ }
528
+ response_data = self.api_client.call_api(
529
+ *_param,
530
+ _request_timeout=_request_timeout
531
+ )
532
+ return response_data.response
533
+
534
+
535
+ def _invite_serialize(
536
+ self,
537
+ body,
538
+ _request_auth,
539
+ _content_type,
540
+ _headers,
541
+ _host_index,
542
+ ) -> RequestSerialized:
543
+
544
+ _host = None
545
+
546
+ _collection_formats: Dict[str, str] = {
547
+ }
548
+
549
+ _path_params: Dict[str, str] = {}
550
+ _query_params: List[Tuple[str, str]] = []
551
+ _header_params: Dict[str, Optional[str]] = _headers or {}
552
+ _form_params: List[Tuple[str, str]] = []
553
+ _files: Dict[
554
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
555
+ ] = {}
556
+ _body_params: Optional[bytes] = None
557
+
558
+ # process the path parameters
559
+ # process the query parameters
560
+ # process the header parameters
561
+ # process the form parameters
562
+ # process the body parameter
563
+ if body is not None:
564
+ _body_params = body
565
+
566
+
567
+ # set the HTTP header `Accept`
568
+ if 'Accept' not in _header_params:
569
+ _header_params['Accept'] = self.api_client.select_header_accept(
570
+ [
571
+ 'application/zrok.v1+json'
572
+ ]
573
+ )
574
+
575
+ # set the HTTP header `Content-Type`
576
+ if _content_type:
577
+ _header_params['Content-Type'] = _content_type
578
+ else:
579
+ _default_content_type = (
580
+ self.api_client.select_header_content_type(
581
+ [
582
+ 'application/zrok.v1+json'
583
+ ]
584
+ )
585
+ )
586
+ if _default_content_type is not None:
587
+ _header_params['Content-Type'] = _default_content_type
588
+
589
+ # authentication setting
590
+ _auth_settings: List[str] = [
591
+ ]
592
+
593
+ return self.api_client.param_serialize(
594
+ method='POST',
595
+ resource_path='/invite',
596
+ path_params=_path_params,
597
+ query_params=_query_params,
598
+ header_params=_header_params,
599
+ body=_body_params,
600
+ post_params=_form_params,
601
+ files=_files,
602
+ auth_settings=_auth_settings,
603
+ collection_formats=_collection_formats,
604
+ _host=_host,
605
+ _request_auth=_request_auth
606
+ )
607
+
608
+
609
+
610
+
611
+ @validate_call
612
+ def login(
613
+ self,
614
+ body: Optional[LoginRequest] = None,
615
+ _request_timeout: Union[
616
+ None,
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Tuple[
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Annotated[StrictFloat, Field(gt=0)]
621
+ ]
622
+ ] = None,
623
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
624
+ _content_type: Optional[StrictStr] = None,
625
+ _headers: Optional[Dict[StrictStr, Any]] = None,
626
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
627
+ ) -> str:
628
+ """login
629
+
630
+
631
+ :param body:
632
+ :type body: LoginRequest
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._login_serialize(
656
+ body=body,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ '200': "str",
665
+ '401': None,
666
+ }
667
+ response_data = self.api_client.call_api(
668
+ *_param,
669
+ _request_timeout=_request_timeout
670
+ )
671
+ response_data.read()
672
+ return self.api_client.response_deserialize(
673
+ response_data=response_data,
674
+ response_types_map=_response_types_map,
675
+ ).data
676
+
677
+
678
+ @validate_call
679
+ def login_with_http_info(
680
+ self,
681
+ body: Optional[LoginRequest] = None,
682
+ _request_timeout: Union[
683
+ None,
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Tuple[
686
+ Annotated[StrictFloat, Field(gt=0)],
687
+ Annotated[StrictFloat, Field(gt=0)]
688
+ ]
689
+ ] = None,
690
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
691
+ _content_type: Optional[StrictStr] = None,
692
+ _headers: Optional[Dict[StrictStr, Any]] = None,
693
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
694
+ ) -> ApiResponse[str]:
695
+ """login
696
+
697
+
698
+ :param body:
699
+ :type body: LoginRequest
700
+ :param _request_timeout: timeout setting for this request. If one
701
+ number provided, it will be total request
702
+ timeout. It can also be a pair (tuple) of
703
+ (connection, read) timeouts.
704
+ :type _request_timeout: int, tuple(int, int), optional
705
+ :param _request_auth: set to override the auth_settings for an a single
706
+ request; this effectively ignores the
707
+ authentication in the spec for a single request.
708
+ :type _request_auth: dict, optional
709
+ :param _content_type: force content-type for the request.
710
+ :type _content_type: str, Optional
711
+ :param _headers: set to override the headers for a single
712
+ request; this effectively ignores the headers
713
+ in the spec for a single request.
714
+ :type _headers: dict, optional
715
+ :param _host_index: set to override the host_index for a single
716
+ request; this effectively ignores the host_index
717
+ in the spec for a single request.
718
+ :type _host_index: int, optional
719
+ :return: Returns the result object.
720
+ """ # noqa: E501
721
+
722
+ _param = self._login_serialize(
723
+ body=body,
724
+ _request_auth=_request_auth,
725
+ _content_type=_content_type,
726
+ _headers=_headers,
727
+ _host_index=_host_index
728
+ )
729
+
730
+ _response_types_map: Dict[str, Optional[str]] = {
731
+ '200': "str",
732
+ '401': None,
733
+ }
734
+ response_data = self.api_client.call_api(
735
+ *_param,
736
+ _request_timeout=_request_timeout
737
+ )
738
+ response_data.read()
739
+ return self.api_client.response_deserialize(
740
+ response_data=response_data,
741
+ response_types_map=_response_types_map,
742
+ )
743
+
744
+
745
+ @validate_call
746
+ def login_without_preload_content(
747
+ self,
748
+ body: Optional[LoginRequest] = None,
749
+ _request_timeout: Union[
750
+ None,
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Tuple[
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Annotated[StrictFloat, Field(gt=0)]
755
+ ]
756
+ ] = None,
757
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
758
+ _content_type: Optional[StrictStr] = None,
759
+ _headers: Optional[Dict[StrictStr, Any]] = None,
760
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
761
+ ) -> RESTResponseType:
762
+ """login
763
+
764
+
765
+ :param body:
766
+ :type body: LoginRequest
767
+ :param _request_timeout: timeout setting for this request. If one
768
+ number provided, it will be total request
769
+ timeout. It can also be a pair (tuple) of
770
+ (connection, read) timeouts.
771
+ :type _request_timeout: int, tuple(int, int), optional
772
+ :param _request_auth: set to override the auth_settings for an a single
773
+ request; this effectively ignores the
774
+ authentication in the spec for a single request.
775
+ :type _request_auth: dict, optional
776
+ :param _content_type: force content-type for the request.
777
+ :type _content_type: str, Optional
778
+ :param _headers: set to override the headers for a single
779
+ request; this effectively ignores the headers
780
+ in the spec for a single request.
781
+ :type _headers: dict, optional
782
+ :param _host_index: set to override the host_index for a single
783
+ request; this effectively ignores the host_index
784
+ in the spec for a single request.
785
+ :type _host_index: int, optional
786
+ :return: Returns the result object.
787
+ """ # noqa: E501
788
+
789
+ _param = self._login_serialize(
790
+ body=body,
791
+ _request_auth=_request_auth,
792
+ _content_type=_content_type,
793
+ _headers=_headers,
794
+ _host_index=_host_index
795
+ )
796
+
797
+ _response_types_map: Dict[str, Optional[str]] = {
798
+ '200': "str",
799
+ '401': None,
800
+ }
801
+ response_data = self.api_client.call_api(
802
+ *_param,
803
+ _request_timeout=_request_timeout
804
+ )
805
+ return response_data.response
806
+
807
+
808
+ def _login_serialize(
809
+ self,
810
+ body,
811
+ _request_auth,
812
+ _content_type,
813
+ _headers,
814
+ _host_index,
815
+ ) -> RequestSerialized:
816
+
817
+ _host = None
818
+
819
+ _collection_formats: Dict[str, str] = {
820
+ }
821
+
822
+ _path_params: Dict[str, str] = {}
823
+ _query_params: List[Tuple[str, str]] = []
824
+ _header_params: Dict[str, Optional[str]] = _headers or {}
825
+ _form_params: List[Tuple[str, str]] = []
826
+ _files: Dict[
827
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
828
+ ] = {}
829
+ _body_params: Optional[bytes] = None
830
+
831
+ # process the path parameters
832
+ # process the query parameters
833
+ # process the header parameters
834
+ # process the form parameters
835
+ # process the body parameter
836
+ if body is not None:
837
+ _body_params = body
838
+
839
+
840
+ # set the HTTP header `Accept`
841
+ if 'Accept' not in _header_params:
842
+ _header_params['Accept'] = self.api_client.select_header_accept(
843
+ [
844
+ 'application/zrok.v1+json'
845
+ ]
846
+ )
847
+
848
+ # set the HTTP header `Content-Type`
849
+ if _content_type:
850
+ _header_params['Content-Type'] = _content_type
851
+ else:
852
+ _default_content_type = (
853
+ self.api_client.select_header_content_type(
854
+ [
855
+ 'application/zrok.v1+json'
856
+ ]
857
+ )
858
+ )
859
+ if _default_content_type is not None:
860
+ _header_params['Content-Type'] = _default_content_type
861
+
862
+ # authentication setting
863
+ _auth_settings: List[str] = [
864
+ ]
865
+
866
+ return self.api_client.param_serialize(
867
+ method='POST',
868
+ resource_path='/login',
869
+ path_params=_path_params,
870
+ query_params=_query_params,
871
+ header_params=_header_params,
872
+ body=_body_params,
873
+ post_params=_form_params,
874
+ files=_files,
875
+ auth_settings=_auth_settings,
876
+ collection_formats=_collection_formats,
877
+ _host=_host,
878
+ _request_auth=_request_auth
879
+ )
880
+
881
+
882
+
883
+
884
+ @validate_call
885
+ def regenerate_account_token(
886
+ self,
887
+ body: Optional[RegenerateAccountTokenRequest] = None,
888
+ _request_timeout: Union[
889
+ None,
890
+ Annotated[StrictFloat, Field(gt=0)],
891
+ Tuple[
892
+ Annotated[StrictFloat, Field(gt=0)],
893
+ Annotated[StrictFloat, Field(gt=0)]
894
+ ]
895
+ ] = None,
896
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
897
+ _content_type: Optional[StrictStr] = None,
898
+ _headers: Optional[Dict[StrictStr, Any]] = None,
899
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
900
+ ) -> RegenerateAccountToken200Response:
901
+ """regenerate_account_token
902
+
903
+
904
+ :param body:
905
+ :type body: RegenerateAccountTokenRequest
906
+ :param _request_timeout: timeout setting for this request. If one
907
+ number provided, it will be total request
908
+ timeout. It can also be a pair (tuple) of
909
+ (connection, read) timeouts.
910
+ :type _request_timeout: int, tuple(int, int), optional
911
+ :param _request_auth: set to override the auth_settings for an a single
912
+ request; this effectively ignores the
913
+ authentication in the spec for a single request.
914
+ :type _request_auth: dict, optional
915
+ :param _content_type: force content-type for the request.
916
+ :type _content_type: str, Optional
917
+ :param _headers: set to override the headers for a single
918
+ request; this effectively ignores the headers
919
+ in the spec for a single request.
920
+ :type _headers: dict, optional
921
+ :param _host_index: set to override the host_index for a single
922
+ request; this effectively ignores the host_index
923
+ in the spec for a single request.
924
+ :type _host_index: int, optional
925
+ :return: Returns the result object.
926
+ """ # noqa: E501
927
+
928
+ _param = self._regenerate_account_token_serialize(
929
+ body=body,
930
+ _request_auth=_request_auth,
931
+ _content_type=_content_type,
932
+ _headers=_headers,
933
+ _host_index=_host_index
934
+ )
935
+
936
+ _response_types_map: Dict[str, Optional[str]] = {
937
+ '200': "RegenerateAccountToken200Response",
938
+ '404': None,
939
+ '500': None,
940
+ }
941
+ response_data = self.api_client.call_api(
942
+ *_param,
943
+ _request_timeout=_request_timeout
944
+ )
945
+ response_data.read()
946
+ return self.api_client.response_deserialize(
947
+ response_data=response_data,
948
+ response_types_map=_response_types_map,
949
+ ).data
950
+
951
+
952
+ @validate_call
953
+ def regenerate_account_token_with_http_info(
954
+ self,
955
+ body: Optional[RegenerateAccountTokenRequest] = None,
956
+ _request_timeout: Union[
957
+ None,
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Tuple[
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Annotated[StrictFloat, Field(gt=0)]
962
+ ]
963
+ ] = None,
964
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
965
+ _content_type: Optional[StrictStr] = None,
966
+ _headers: Optional[Dict[StrictStr, Any]] = None,
967
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
968
+ ) -> ApiResponse[RegenerateAccountToken200Response]:
969
+ """regenerate_account_token
970
+
971
+
972
+ :param body:
973
+ :type body: RegenerateAccountTokenRequest
974
+ :param _request_timeout: timeout setting for this request. If one
975
+ number provided, it will be total request
976
+ timeout. It can also be a pair (tuple) of
977
+ (connection, read) timeouts.
978
+ :type _request_timeout: int, tuple(int, int), optional
979
+ :param _request_auth: set to override the auth_settings for an a single
980
+ request; this effectively ignores the
981
+ authentication in the spec for a single request.
982
+ :type _request_auth: dict, optional
983
+ :param _content_type: force content-type for the request.
984
+ :type _content_type: str, Optional
985
+ :param _headers: set to override the headers for a single
986
+ request; this effectively ignores the headers
987
+ in the spec for a single request.
988
+ :type _headers: dict, optional
989
+ :param _host_index: set to override the host_index for a single
990
+ request; this effectively ignores the host_index
991
+ in the spec for a single request.
992
+ :type _host_index: int, optional
993
+ :return: Returns the result object.
994
+ """ # noqa: E501
995
+
996
+ _param = self._regenerate_account_token_serialize(
997
+ body=body,
998
+ _request_auth=_request_auth,
999
+ _content_type=_content_type,
1000
+ _headers=_headers,
1001
+ _host_index=_host_index
1002
+ )
1003
+
1004
+ _response_types_map: Dict[str, Optional[str]] = {
1005
+ '200': "RegenerateAccountToken200Response",
1006
+ '404': None,
1007
+ '500': None,
1008
+ }
1009
+ response_data = self.api_client.call_api(
1010
+ *_param,
1011
+ _request_timeout=_request_timeout
1012
+ )
1013
+ response_data.read()
1014
+ return self.api_client.response_deserialize(
1015
+ response_data=response_data,
1016
+ response_types_map=_response_types_map,
1017
+ )
1018
+
1019
+
1020
+ @validate_call
1021
+ def regenerate_account_token_without_preload_content(
1022
+ self,
1023
+ body: Optional[RegenerateAccountTokenRequest] = None,
1024
+ _request_timeout: Union[
1025
+ None,
1026
+ Annotated[StrictFloat, Field(gt=0)],
1027
+ Tuple[
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Annotated[StrictFloat, Field(gt=0)]
1030
+ ]
1031
+ ] = None,
1032
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1033
+ _content_type: Optional[StrictStr] = None,
1034
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1035
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1036
+ ) -> RESTResponseType:
1037
+ """regenerate_account_token
1038
+
1039
+
1040
+ :param body:
1041
+ :type body: RegenerateAccountTokenRequest
1042
+ :param _request_timeout: timeout setting for this request. If one
1043
+ number provided, it will be total request
1044
+ timeout. It can also be a pair (tuple) of
1045
+ (connection, read) timeouts.
1046
+ :type _request_timeout: int, tuple(int, int), optional
1047
+ :param _request_auth: set to override the auth_settings for an a single
1048
+ request; this effectively ignores the
1049
+ authentication in the spec for a single request.
1050
+ :type _request_auth: dict, optional
1051
+ :param _content_type: force content-type for the request.
1052
+ :type _content_type: str, Optional
1053
+ :param _headers: set to override the headers for a single
1054
+ request; this effectively ignores the headers
1055
+ in the spec for a single request.
1056
+ :type _headers: dict, optional
1057
+ :param _host_index: set to override the host_index for a single
1058
+ request; this effectively ignores the host_index
1059
+ in the spec for a single request.
1060
+ :type _host_index: int, optional
1061
+ :return: Returns the result object.
1062
+ """ # noqa: E501
1063
+
1064
+ _param = self._regenerate_account_token_serialize(
1065
+ body=body,
1066
+ _request_auth=_request_auth,
1067
+ _content_type=_content_type,
1068
+ _headers=_headers,
1069
+ _host_index=_host_index
1070
+ )
1071
+
1072
+ _response_types_map: Dict[str, Optional[str]] = {
1073
+ '200': "RegenerateAccountToken200Response",
1074
+ '404': None,
1075
+ '500': None,
1076
+ }
1077
+ response_data = self.api_client.call_api(
1078
+ *_param,
1079
+ _request_timeout=_request_timeout
1080
+ )
1081
+ return response_data.response
1082
+
1083
+
1084
+ def _regenerate_account_token_serialize(
1085
+ self,
1086
+ body,
1087
+ _request_auth,
1088
+ _content_type,
1089
+ _headers,
1090
+ _host_index,
1091
+ ) -> RequestSerialized:
1092
+
1093
+ _host = None
1094
+
1095
+ _collection_formats: Dict[str, str] = {
1096
+ }
1097
+
1098
+ _path_params: Dict[str, str] = {}
1099
+ _query_params: List[Tuple[str, str]] = []
1100
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1101
+ _form_params: List[Tuple[str, str]] = []
1102
+ _files: Dict[
1103
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1104
+ ] = {}
1105
+ _body_params: Optional[bytes] = None
1106
+
1107
+ # process the path parameters
1108
+ # process the query parameters
1109
+ # process the header parameters
1110
+ # process the form parameters
1111
+ # process the body parameter
1112
+ if body is not None:
1113
+ _body_params = body
1114
+
1115
+
1116
+ # set the HTTP header `Accept`
1117
+ if 'Accept' not in _header_params:
1118
+ _header_params['Accept'] = self.api_client.select_header_accept(
1119
+ [
1120
+ 'application/zrok.v1+json'
1121
+ ]
1122
+ )
1123
+
1124
+ # set the HTTP header `Content-Type`
1125
+ if _content_type:
1126
+ _header_params['Content-Type'] = _content_type
1127
+ else:
1128
+ _default_content_type = (
1129
+ self.api_client.select_header_content_type(
1130
+ [
1131
+ 'application/zrok.v1+json'
1132
+ ]
1133
+ )
1134
+ )
1135
+ if _default_content_type is not None:
1136
+ _header_params['Content-Type'] = _default_content_type
1137
+
1138
+ # authentication setting
1139
+ _auth_settings: List[str] = [
1140
+ 'key'
1141
+ ]
1142
+
1143
+ return self.api_client.param_serialize(
1144
+ method='POST',
1145
+ resource_path='/regenerateAccountToken',
1146
+ path_params=_path_params,
1147
+ query_params=_query_params,
1148
+ header_params=_header_params,
1149
+ body=_body_params,
1150
+ post_params=_form_params,
1151
+ files=_files,
1152
+ auth_settings=_auth_settings,
1153
+ collection_formats=_collection_formats,
1154
+ _host=_host,
1155
+ _request_auth=_request_auth
1156
+ )
1157
+
1158
+
1159
+
1160
+
1161
+ @validate_call
1162
+ def register(
1163
+ self,
1164
+ body: Optional[RegisterRequest] = None,
1165
+ _request_timeout: Union[
1166
+ None,
1167
+ Annotated[StrictFloat, Field(gt=0)],
1168
+ Tuple[
1169
+ Annotated[StrictFloat, Field(gt=0)],
1170
+ Annotated[StrictFloat, Field(gt=0)]
1171
+ ]
1172
+ ] = None,
1173
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1174
+ _content_type: Optional[StrictStr] = None,
1175
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1176
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1177
+ ) -> RegenerateAccountToken200Response:
1178
+ """register
1179
+
1180
+
1181
+ :param body:
1182
+ :type body: RegisterRequest
1183
+ :param _request_timeout: timeout setting for this request. If one
1184
+ number provided, it will be total request
1185
+ timeout. It can also be a pair (tuple) of
1186
+ (connection, read) timeouts.
1187
+ :type _request_timeout: int, tuple(int, int), optional
1188
+ :param _request_auth: set to override the auth_settings for an a single
1189
+ request; this effectively ignores the
1190
+ authentication in the spec for a single request.
1191
+ :type _request_auth: dict, optional
1192
+ :param _content_type: force content-type for the request.
1193
+ :type _content_type: str, Optional
1194
+ :param _headers: set to override the headers for a single
1195
+ request; this effectively ignores the headers
1196
+ in the spec for a single request.
1197
+ :type _headers: dict, optional
1198
+ :param _host_index: set to override the host_index for a single
1199
+ request; this effectively ignores the host_index
1200
+ in the spec for a single request.
1201
+ :type _host_index: int, optional
1202
+ :return: Returns the result object.
1203
+ """ # noqa: E501
1204
+
1205
+ _param = self._register_serialize(
1206
+ body=body,
1207
+ _request_auth=_request_auth,
1208
+ _content_type=_content_type,
1209
+ _headers=_headers,
1210
+ _host_index=_host_index
1211
+ )
1212
+
1213
+ _response_types_map: Dict[str, Optional[str]] = {
1214
+ '200': "RegenerateAccountToken200Response",
1215
+ '404': None,
1216
+ '422': "str",
1217
+ '500': None,
1218
+ }
1219
+ response_data = self.api_client.call_api(
1220
+ *_param,
1221
+ _request_timeout=_request_timeout
1222
+ )
1223
+ response_data.read()
1224
+ return self.api_client.response_deserialize(
1225
+ response_data=response_data,
1226
+ response_types_map=_response_types_map,
1227
+ ).data
1228
+
1229
+
1230
+ @validate_call
1231
+ def register_with_http_info(
1232
+ self,
1233
+ body: Optional[RegisterRequest] = None,
1234
+ _request_timeout: Union[
1235
+ None,
1236
+ Annotated[StrictFloat, Field(gt=0)],
1237
+ Tuple[
1238
+ Annotated[StrictFloat, Field(gt=0)],
1239
+ Annotated[StrictFloat, Field(gt=0)]
1240
+ ]
1241
+ ] = None,
1242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1243
+ _content_type: Optional[StrictStr] = None,
1244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1246
+ ) -> ApiResponse[RegenerateAccountToken200Response]:
1247
+ """register
1248
+
1249
+
1250
+ :param body:
1251
+ :type body: RegisterRequest
1252
+ :param _request_timeout: timeout setting for this request. If one
1253
+ number provided, it will be total request
1254
+ timeout. It can also be a pair (tuple) of
1255
+ (connection, read) timeouts.
1256
+ :type _request_timeout: int, tuple(int, int), optional
1257
+ :param _request_auth: set to override the auth_settings for an a single
1258
+ request; this effectively ignores the
1259
+ authentication in the spec for a single request.
1260
+ :type _request_auth: dict, optional
1261
+ :param _content_type: force content-type for the request.
1262
+ :type _content_type: str, Optional
1263
+ :param _headers: set to override the headers for a single
1264
+ request; this effectively ignores the headers
1265
+ in the spec for a single request.
1266
+ :type _headers: dict, optional
1267
+ :param _host_index: set to override the host_index for a single
1268
+ request; this effectively ignores the host_index
1269
+ in the spec for a single request.
1270
+ :type _host_index: int, optional
1271
+ :return: Returns the result object.
1272
+ """ # noqa: E501
1273
+
1274
+ _param = self._register_serialize(
1275
+ body=body,
1276
+ _request_auth=_request_auth,
1277
+ _content_type=_content_type,
1278
+ _headers=_headers,
1279
+ _host_index=_host_index
1280
+ )
1281
+
1282
+ _response_types_map: Dict[str, Optional[str]] = {
1283
+ '200': "RegenerateAccountToken200Response",
1284
+ '404': None,
1285
+ '422': "str",
1286
+ '500': None,
1287
+ }
1288
+ response_data = self.api_client.call_api(
1289
+ *_param,
1290
+ _request_timeout=_request_timeout
1291
+ )
1292
+ response_data.read()
1293
+ return self.api_client.response_deserialize(
1294
+ response_data=response_data,
1295
+ response_types_map=_response_types_map,
1296
+ )
1297
+
1298
+
1299
+ @validate_call
1300
+ def register_without_preload_content(
1301
+ self,
1302
+ body: Optional[RegisterRequest] = None,
1303
+ _request_timeout: Union[
1304
+ None,
1305
+ Annotated[StrictFloat, Field(gt=0)],
1306
+ Tuple[
1307
+ Annotated[StrictFloat, Field(gt=0)],
1308
+ Annotated[StrictFloat, Field(gt=0)]
1309
+ ]
1310
+ ] = None,
1311
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1312
+ _content_type: Optional[StrictStr] = None,
1313
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1314
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1315
+ ) -> RESTResponseType:
1316
+ """register
1317
+
1318
+
1319
+ :param body:
1320
+ :type body: RegisterRequest
1321
+ :param _request_timeout: timeout setting for this request. If one
1322
+ number provided, it will be total request
1323
+ timeout. It can also be a pair (tuple) of
1324
+ (connection, read) timeouts.
1325
+ :type _request_timeout: int, tuple(int, int), optional
1326
+ :param _request_auth: set to override the auth_settings for an a single
1327
+ request; this effectively ignores the
1328
+ authentication in the spec for a single request.
1329
+ :type _request_auth: dict, optional
1330
+ :param _content_type: force content-type for the request.
1331
+ :type _content_type: str, Optional
1332
+ :param _headers: set to override the headers for a single
1333
+ request; this effectively ignores the headers
1334
+ in the spec for a single request.
1335
+ :type _headers: dict, optional
1336
+ :param _host_index: set to override the host_index for a single
1337
+ request; this effectively ignores the host_index
1338
+ in the spec for a single request.
1339
+ :type _host_index: int, optional
1340
+ :return: Returns the result object.
1341
+ """ # noqa: E501
1342
+
1343
+ _param = self._register_serialize(
1344
+ body=body,
1345
+ _request_auth=_request_auth,
1346
+ _content_type=_content_type,
1347
+ _headers=_headers,
1348
+ _host_index=_host_index
1349
+ )
1350
+
1351
+ _response_types_map: Dict[str, Optional[str]] = {
1352
+ '200': "RegenerateAccountToken200Response",
1353
+ '404': None,
1354
+ '422': "str",
1355
+ '500': None,
1356
+ }
1357
+ response_data = self.api_client.call_api(
1358
+ *_param,
1359
+ _request_timeout=_request_timeout
1360
+ )
1361
+ return response_data.response
1362
+
1363
+
1364
+ def _register_serialize(
1365
+ self,
1366
+ body,
1367
+ _request_auth,
1368
+ _content_type,
1369
+ _headers,
1370
+ _host_index,
1371
+ ) -> RequestSerialized:
1372
+
1373
+ _host = None
1374
+
1375
+ _collection_formats: Dict[str, str] = {
1376
+ }
1377
+
1378
+ _path_params: Dict[str, str] = {}
1379
+ _query_params: List[Tuple[str, str]] = []
1380
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1381
+ _form_params: List[Tuple[str, str]] = []
1382
+ _files: Dict[
1383
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1384
+ ] = {}
1385
+ _body_params: Optional[bytes] = None
1386
+
1387
+ # process the path parameters
1388
+ # process the query parameters
1389
+ # process the header parameters
1390
+ # process the form parameters
1391
+ # process the body parameter
1392
+ if body is not None:
1393
+ _body_params = body
1394
+
1395
+
1396
+ # set the HTTP header `Accept`
1397
+ if 'Accept' not in _header_params:
1398
+ _header_params['Accept'] = self.api_client.select_header_accept(
1399
+ [
1400
+ 'application/zrok.v1+json'
1401
+ ]
1402
+ )
1403
+
1404
+ # set the HTTP header `Content-Type`
1405
+ if _content_type:
1406
+ _header_params['Content-Type'] = _content_type
1407
+ else:
1408
+ _default_content_type = (
1409
+ self.api_client.select_header_content_type(
1410
+ [
1411
+ 'application/zrok.v1+json'
1412
+ ]
1413
+ )
1414
+ )
1415
+ if _default_content_type is not None:
1416
+ _header_params['Content-Type'] = _default_content_type
1417
+
1418
+ # authentication setting
1419
+ _auth_settings: List[str] = [
1420
+ ]
1421
+
1422
+ return self.api_client.param_serialize(
1423
+ method='POST',
1424
+ resource_path='/register',
1425
+ path_params=_path_params,
1426
+ query_params=_query_params,
1427
+ header_params=_header_params,
1428
+ body=_body_params,
1429
+ post_params=_form_params,
1430
+ files=_files,
1431
+ auth_settings=_auth_settings,
1432
+ collection_formats=_collection_formats,
1433
+ _host=_host,
1434
+ _request_auth=_request_auth
1435
+ )
1436
+
1437
+
1438
+
1439
+
1440
+ @validate_call
1441
+ def reset_password(
1442
+ self,
1443
+ body: Optional[ResetPasswordRequest] = None,
1444
+ _request_timeout: Union[
1445
+ None,
1446
+ Annotated[StrictFloat, Field(gt=0)],
1447
+ Tuple[
1448
+ Annotated[StrictFloat, Field(gt=0)],
1449
+ Annotated[StrictFloat, Field(gt=0)]
1450
+ ]
1451
+ ] = None,
1452
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1453
+ _content_type: Optional[StrictStr] = None,
1454
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1455
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1456
+ ) -> None:
1457
+ """reset_password
1458
+
1459
+
1460
+ :param body:
1461
+ :type body: ResetPasswordRequest
1462
+ :param _request_timeout: timeout setting for this request. If one
1463
+ number provided, it will be total request
1464
+ timeout. It can also be a pair (tuple) of
1465
+ (connection, read) timeouts.
1466
+ :type _request_timeout: int, tuple(int, int), optional
1467
+ :param _request_auth: set to override the auth_settings for an a single
1468
+ request; this effectively ignores the
1469
+ authentication in the spec for a single request.
1470
+ :type _request_auth: dict, optional
1471
+ :param _content_type: force content-type for the request.
1472
+ :type _content_type: str, Optional
1473
+ :param _headers: set to override the headers for a single
1474
+ request; this effectively ignores the headers
1475
+ in the spec for a single request.
1476
+ :type _headers: dict, optional
1477
+ :param _host_index: set to override the host_index for a single
1478
+ request; this effectively ignores the host_index
1479
+ in the spec for a single request.
1480
+ :type _host_index: int, optional
1481
+ :return: Returns the result object.
1482
+ """ # noqa: E501
1483
+
1484
+ _param = self._reset_password_serialize(
1485
+ body=body,
1486
+ _request_auth=_request_auth,
1487
+ _content_type=_content_type,
1488
+ _headers=_headers,
1489
+ _host_index=_host_index
1490
+ )
1491
+
1492
+ _response_types_map: Dict[str, Optional[str]] = {
1493
+ '200': None,
1494
+ '404': None,
1495
+ '422': "str",
1496
+ '500': None,
1497
+ }
1498
+ response_data = self.api_client.call_api(
1499
+ *_param,
1500
+ _request_timeout=_request_timeout
1501
+ )
1502
+ response_data.read()
1503
+ return self.api_client.response_deserialize(
1504
+ response_data=response_data,
1505
+ response_types_map=_response_types_map,
1506
+ ).data
1507
+
1508
+
1509
+ @validate_call
1510
+ def reset_password_with_http_info(
1511
+ self,
1512
+ body: Optional[ResetPasswordRequest] = None,
1513
+ _request_timeout: Union[
1514
+ None,
1515
+ Annotated[StrictFloat, Field(gt=0)],
1516
+ Tuple[
1517
+ Annotated[StrictFloat, Field(gt=0)],
1518
+ Annotated[StrictFloat, Field(gt=0)]
1519
+ ]
1520
+ ] = None,
1521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1522
+ _content_type: Optional[StrictStr] = None,
1523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1525
+ ) -> ApiResponse[None]:
1526
+ """reset_password
1527
+
1528
+
1529
+ :param body:
1530
+ :type body: ResetPasswordRequest
1531
+ :param _request_timeout: timeout setting for this request. If one
1532
+ number provided, it will be total request
1533
+ timeout. It can also be a pair (tuple) of
1534
+ (connection, read) timeouts.
1535
+ :type _request_timeout: int, tuple(int, int), optional
1536
+ :param _request_auth: set to override the auth_settings for an a single
1537
+ request; this effectively ignores the
1538
+ authentication in the spec for a single request.
1539
+ :type _request_auth: dict, optional
1540
+ :param _content_type: force content-type for the request.
1541
+ :type _content_type: str, Optional
1542
+ :param _headers: set to override the headers for a single
1543
+ request; this effectively ignores the headers
1544
+ in the spec for a single request.
1545
+ :type _headers: dict, optional
1546
+ :param _host_index: set to override the host_index for a single
1547
+ request; this effectively ignores the host_index
1548
+ in the spec for a single request.
1549
+ :type _host_index: int, optional
1550
+ :return: Returns the result object.
1551
+ """ # noqa: E501
1552
+
1553
+ _param = self._reset_password_serialize(
1554
+ body=body,
1555
+ _request_auth=_request_auth,
1556
+ _content_type=_content_type,
1557
+ _headers=_headers,
1558
+ _host_index=_host_index
1559
+ )
1560
+
1561
+ _response_types_map: Dict[str, Optional[str]] = {
1562
+ '200': None,
1563
+ '404': None,
1564
+ '422': "str",
1565
+ '500': None,
1566
+ }
1567
+ response_data = self.api_client.call_api(
1568
+ *_param,
1569
+ _request_timeout=_request_timeout
1570
+ )
1571
+ response_data.read()
1572
+ return self.api_client.response_deserialize(
1573
+ response_data=response_data,
1574
+ response_types_map=_response_types_map,
1575
+ )
1576
+
1577
+
1578
+ @validate_call
1579
+ def reset_password_without_preload_content(
1580
+ self,
1581
+ body: Optional[ResetPasswordRequest] = None,
1582
+ _request_timeout: Union[
1583
+ None,
1584
+ Annotated[StrictFloat, Field(gt=0)],
1585
+ Tuple[
1586
+ Annotated[StrictFloat, Field(gt=0)],
1587
+ Annotated[StrictFloat, Field(gt=0)]
1588
+ ]
1589
+ ] = None,
1590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1591
+ _content_type: Optional[StrictStr] = None,
1592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1594
+ ) -> RESTResponseType:
1595
+ """reset_password
1596
+
1597
+
1598
+ :param body:
1599
+ :type body: ResetPasswordRequest
1600
+ :param _request_timeout: timeout setting for this request. If one
1601
+ number provided, it will be total request
1602
+ timeout. It can also be a pair (tuple) of
1603
+ (connection, read) timeouts.
1604
+ :type _request_timeout: int, tuple(int, int), optional
1605
+ :param _request_auth: set to override the auth_settings for an a single
1606
+ request; this effectively ignores the
1607
+ authentication in the spec for a single request.
1608
+ :type _request_auth: dict, optional
1609
+ :param _content_type: force content-type for the request.
1610
+ :type _content_type: str, Optional
1611
+ :param _headers: set to override the headers for a single
1612
+ request; this effectively ignores the headers
1613
+ in the spec for a single request.
1614
+ :type _headers: dict, optional
1615
+ :param _host_index: set to override the host_index for a single
1616
+ request; this effectively ignores the host_index
1617
+ in the spec for a single request.
1618
+ :type _host_index: int, optional
1619
+ :return: Returns the result object.
1620
+ """ # noqa: E501
1621
+
1622
+ _param = self._reset_password_serialize(
1623
+ body=body,
1624
+ _request_auth=_request_auth,
1625
+ _content_type=_content_type,
1626
+ _headers=_headers,
1627
+ _host_index=_host_index
1628
+ )
1629
+
1630
+ _response_types_map: Dict[str, Optional[str]] = {
1631
+ '200': None,
1632
+ '404': None,
1633
+ '422': "str",
1634
+ '500': None,
1635
+ }
1636
+ response_data = self.api_client.call_api(
1637
+ *_param,
1638
+ _request_timeout=_request_timeout
1639
+ )
1640
+ return response_data.response
1641
+
1642
+
1643
+ def _reset_password_serialize(
1644
+ self,
1645
+ body,
1646
+ _request_auth,
1647
+ _content_type,
1648
+ _headers,
1649
+ _host_index,
1650
+ ) -> RequestSerialized:
1651
+
1652
+ _host = None
1653
+
1654
+ _collection_formats: Dict[str, str] = {
1655
+ }
1656
+
1657
+ _path_params: Dict[str, str] = {}
1658
+ _query_params: List[Tuple[str, str]] = []
1659
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1660
+ _form_params: List[Tuple[str, str]] = []
1661
+ _files: Dict[
1662
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1663
+ ] = {}
1664
+ _body_params: Optional[bytes] = None
1665
+
1666
+ # process the path parameters
1667
+ # process the query parameters
1668
+ # process the header parameters
1669
+ # process the form parameters
1670
+ # process the body parameter
1671
+ if body is not None:
1672
+ _body_params = body
1673
+
1674
+
1675
+ # set the HTTP header `Accept`
1676
+ if 'Accept' not in _header_params:
1677
+ _header_params['Accept'] = self.api_client.select_header_accept(
1678
+ [
1679
+ 'application/zrok.v1+json'
1680
+ ]
1681
+ )
1682
+
1683
+ # set the HTTP header `Content-Type`
1684
+ if _content_type:
1685
+ _header_params['Content-Type'] = _content_type
1686
+ else:
1687
+ _default_content_type = (
1688
+ self.api_client.select_header_content_type(
1689
+ [
1690
+ 'application/zrok.v1+json'
1691
+ ]
1692
+ )
1693
+ )
1694
+ if _default_content_type is not None:
1695
+ _header_params['Content-Type'] = _default_content_type
1696
+
1697
+ # authentication setting
1698
+ _auth_settings: List[str] = [
1699
+ ]
1700
+
1701
+ return self.api_client.param_serialize(
1702
+ method='POST',
1703
+ resource_path='/resetPassword',
1704
+ path_params=_path_params,
1705
+ query_params=_query_params,
1706
+ header_params=_header_params,
1707
+ body=_body_params,
1708
+ post_params=_form_params,
1709
+ files=_files,
1710
+ auth_settings=_auth_settings,
1711
+ collection_formats=_collection_formats,
1712
+ _host=_host,
1713
+ _request_auth=_request_auth
1714
+ )
1715
+
1716
+
1717
+
1718
+
1719
+ @validate_call
1720
+ def reset_password_request(
1721
+ self,
1722
+ body: Optional[RegenerateAccountTokenRequest] = None,
1723
+ _request_timeout: Union[
1724
+ None,
1725
+ Annotated[StrictFloat, Field(gt=0)],
1726
+ Tuple[
1727
+ Annotated[StrictFloat, Field(gt=0)],
1728
+ Annotated[StrictFloat, Field(gt=0)]
1729
+ ]
1730
+ ] = None,
1731
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1732
+ _content_type: Optional[StrictStr] = None,
1733
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1734
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1735
+ ) -> None:
1736
+ """reset_password_request
1737
+
1738
+
1739
+ :param body:
1740
+ :type body: RegenerateAccountTokenRequest
1741
+ :param _request_timeout: timeout setting for this request. If one
1742
+ number provided, it will be total request
1743
+ timeout. It can also be a pair (tuple) of
1744
+ (connection, read) timeouts.
1745
+ :type _request_timeout: int, tuple(int, int), optional
1746
+ :param _request_auth: set to override the auth_settings for an a single
1747
+ request; this effectively ignores the
1748
+ authentication in the spec for a single request.
1749
+ :type _request_auth: dict, optional
1750
+ :param _content_type: force content-type for the request.
1751
+ :type _content_type: str, Optional
1752
+ :param _headers: set to override the headers for a single
1753
+ request; this effectively ignores the headers
1754
+ in the spec for a single request.
1755
+ :type _headers: dict, optional
1756
+ :param _host_index: set to override the host_index for a single
1757
+ request; this effectively ignores the host_index
1758
+ in the spec for a single request.
1759
+ :type _host_index: int, optional
1760
+ :return: Returns the result object.
1761
+ """ # noqa: E501
1762
+
1763
+ _param = self._reset_password_request_serialize(
1764
+ body=body,
1765
+ _request_auth=_request_auth,
1766
+ _content_type=_content_type,
1767
+ _headers=_headers,
1768
+ _host_index=_host_index
1769
+ )
1770
+
1771
+ _response_types_map: Dict[str, Optional[str]] = {
1772
+ '201': None,
1773
+ '400': None,
1774
+ '500': None,
1775
+ }
1776
+ response_data = self.api_client.call_api(
1777
+ *_param,
1778
+ _request_timeout=_request_timeout
1779
+ )
1780
+ response_data.read()
1781
+ return self.api_client.response_deserialize(
1782
+ response_data=response_data,
1783
+ response_types_map=_response_types_map,
1784
+ ).data
1785
+
1786
+
1787
+ @validate_call
1788
+ def reset_password_request_with_http_info(
1789
+ self,
1790
+ body: Optional[RegenerateAccountTokenRequest] = None,
1791
+ _request_timeout: Union[
1792
+ None,
1793
+ Annotated[StrictFloat, Field(gt=0)],
1794
+ Tuple[
1795
+ Annotated[StrictFloat, Field(gt=0)],
1796
+ Annotated[StrictFloat, Field(gt=0)]
1797
+ ]
1798
+ ] = None,
1799
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1800
+ _content_type: Optional[StrictStr] = None,
1801
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1802
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1803
+ ) -> ApiResponse[None]:
1804
+ """reset_password_request
1805
+
1806
+
1807
+ :param body:
1808
+ :type body: RegenerateAccountTokenRequest
1809
+ :param _request_timeout: timeout setting for this request. If one
1810
+ number provided, it will be total request
1811
+ timeout. It can also be a pair (tuple) of
1812
+ (connection, read) timeouts.
1813
+ :type _request_timeout: int, tuple(int, int), optional
1814
+ :param _request_auth: set to override the auth_settings for an a single
1815
+ request; this effectively ignores the
1816
+ authentication in the spec for a single request.
1817
+ :type _request_auth: dict, optional
1818
+ :param _content_type: force content-type for the request.
1819
+ :type _content_type: str, Optional
1820
+ :param _headers: set to override the headers for a single
1821
+ request; this effectively ignores the headers
1822
+ in the spec for a single request.
1823
+ :type _headers: dict, optional
1824
+ :param _host_index: set to override the host_index for a single
1825
+ request; this effectively ignores the host_index
1826
+ in the spec for a single request.
1827
+ :type _host_index: int, optional
1828
+ :return: Returns the result object.
1829
+ """ # noqa: E501
1830
+
1831
+ _param = self._reset_password_request_serialize(
1832
+ body=body,
1833
+ _request_auth=_request_auth,
1834
+ _content_type=_content_type,
1835
+ _headers=_headers,
1836
+ _host_index=_host_index
1837
+ )
1838
+
1839
+ _response_types_map: Dict[str, Optional[str]] = {
1840
+ '201': None,
1841
+ '400': None,
1842
+ '500': None,
1843
+ }
1844
+ response_data = self.api_client.call_api(
1845
+ *_param,
1846
+ _request_timeout=_request_timeout
1847
+ )
1848
+ response_data.read()
1849
+ return self.api_client.response_deserialize(
1850
+ response_data=response_data,
1851
+ response_types_map=_response_types_map,
1852
+ )
1853
+
1854
+
1855
+ @validate_call
1856
+ def reset_password_request_without_preload_content(
1857
+ self,
1858
+ body: Optional[RegenerateAccountTokenRequest] = None,
1859
+ _request_timeout: Union[
1860
+ None,
1861
+ Annotated[StrictFloat, Field(gt=0)],
1862
+ Tuple[
1863
+ Annotated[StrictFloat, Field(gt=0)],
1864
+ Annotated[StrictFloat, Field(gt=0)]
1865
+ ]
1866
+ ] = None,
1867
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1868
+ _content_type: Optional[StrictStr] = None,
1869
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1870
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1871
+ ) -> RESTResponseType:
1872
+ """reset_password_request
1873
+
1874
+
1875
+ :param body:
1876
+ :type body: RegenerateAccountTokenRequest
1877
+ :param _request_timeout: timeout setting for this request. If one
1878
+ number provided, it will be total request
1879
+ timeout. It can also be a pair (tuple) of
1880
+ (connection, read) timeouts.
1881
+ :type _request_timeout: int, tuple(int, int), optional
1882
+ :param _request_auth: set to override the auth_settings for an a single
1883
+ request; this effectively ignores the
1884
+ authentication in the spec for a single request.
1885
+ :type _request_auth: dict, optional
1886
+ :param _content_type: force content-type for the request.
1887
+ :type _content_type: str, Optional
1888
+ :param _headers: set to override the headers for a single
1889
+ request; this effectively ignores the headers
1890
+ in the spec for a single request.
1891
+ :type _headers: dict, optional
1892
+ :param _host_index: set to override the host_index for a single
1893
+ request; this effectively ignores the host_index
1894
+ in the spec for a single request.
1895
+ :type _host_index: int, optional
1896
+ :return: Returns the result object.
1897
+ """ # noqa: E501
1898
+
1899
+ _param = self._reset_password_request_serialize(
1900
+ body=body,
1901
+ _request_auth=_request_auth,
1902
+ _content_type=_content_type,
1903
+ _headers=_headers,
1904
+ _host_index=_host_index
1905
+ )
1906
+
1907
+ _response_types_map: Dict[str, Optional[str]] = {
1908
+ '201': None,
1909
+ '400': None,
1910
+ '500': None,
1911
+ }
1912
+ response_data = self.api_client.call_api(
1913
+ *_param,
1914
+ _request_timeout=_request_timeout
1915
+ )
1916
+ return response_data.response
1917
+
1918
+
1919
+ def _reset_password_request_serialize(
1920
+ self,
1921
+ body,
1922
+ _request_auth,
1923
+ _content_type,
1924
+ _headers,
1925
+ _host_index,
1926
+ ) -> RequestSerialized:
1927
+
1928
+ _host = None
1929
+
1930
+ _collection_formats: Dict[str, str] = {
1931
+ }
1932
+
1933
+ _path_params: Dict[str, str] = {}
1934
+ _query_params: List[Tuple[str, str]] = []
1935
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1936
+ _form_params: List[Tuple[str, str]] = []
1937
+ _files: Dict[
1938
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1939
+ ] = {}
1940
+ _body_params: Optional[bytes] = None
1941
+
1942
+ # process the path parameters
1943
+ # process the query parameters
1944
+ # process the header parameters
1945
+ # process the form parameters
1946
+ # process the body parameter
1947
+ if body is not None:
1948
+ _body_params = body
1949
+
1950
+
1951
+
1952
+ # set the HTTP header `Content-Type`
1953
+ if _content_type:
1954
+ _header_params['Content-Type'] = _content_type
1955
+ else:
1956
+ _default_content_type = (
1957
+ self.api_client.select_header_content_type(
1958
+ [
1959
+ 'application/zrok.v1+json'
1960
+ ]
1961
+ )
1962
+ )
1963
+ if _default_content_type is not None:
1964
+ _header_params['Content-Type'] = _default_content_type
1965
+
1966
+ # authentication setting
1967
+ _auth_settings: List[str] = [
1968
+ ]
1969
+
1970
+ return self.api_client.param_serialize(
1971
+ method='POST',
1972
+ resource_path='/resetPasswordRequest',
1973
+ path_params=_path_params,
1974
+ query_params=_query_params,
1975
+ header_params=_header_params,
1976
+ body=_body_params,
1977
+ post_params=_form_params,
1978
+ files=_files,
1979
+ auth_settings=_auth_settings,
1980
+ collection_formats=_collection_formats,
1981
+ _host=_host,
1982
+ _request_auth=_request_auth
1983
+ )
1984
+
1985
+
1986
+
1987
+
1988
+ @validate_call
1989
+ def verify(
1990
+ self,
1991
+ body: Optional[VerifyRequest] = None,
1992
+ _request_timeout: Union[
1993
+ None,
1994
+ Annotated[StrictFloat, Field(gt=0)],
1995
+ Tuple[
1996
+ Annotated[StrictFloat, Field(gt=0)],
1997
+ Annotated[StrictFloat, Field(gt=0)]
1998
+ ]
1999
+ ] = None,
2000
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2001
+ _content_type: Optional[StrictStr] = None,
2002
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2003
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2004
+ ) -> Verify200Response:
2005
+ """verify
2006
+
2007
+
2008
+ :param body:
2009
+ :type body: VerifyRequest
2010
+ :param _request_timeout: timeout setting for this request. If one
2011
+ number provided, it will be total request
2012
+ timeout. It can also be a pair (tuple) of
2013
+ (connection, read) timeouts.
2014
+ :type _request_timeout: int, tuple(int, int), optional
2015
+ :param _request_auth: set to override the auth_settings for an a single
2016
+ request; this effectively ignores the
2017
+ authentication in the spec for a single request.
2018
+ :type _request_auth: dict, optional
2019
+ :param _content_type: force content-type for the request.
2020
+ :type _content_type: str, Optional
2021
+ :param _headers: set to override the headers for a single
2022
+ request; this effectively ignores the headers
2023
+ in the spec for a single request.
2024
+ :type _headers: dict, optional
2025
+ :param _host_index: set to override the host_index for a single
2026
+ request; this effectively ignores the host_index
2027
+ in the spec for a single request.
2028
+ :type _host_index: int, optional
2029
+ :return: Returns the result object.
2030
+ """ # noqa: E501
2031
+
2032
+ _param = self._verify_serialize(
2033
+ body=body,
2034
+ _request_auth=_request_auth,
2035
+ _content_type=_content_type,
2036
+ _headers=_headers,
2037
+ _host_index=_host_index
2038
+ )
2039
+
2040
+ _response_types_map: Dict[str, Optional[str]] = {
2041
+ '200': "Verify200Response",
2042
+ '404': None,
2043
+ '500': None,
2044
+ }
2045
+ response_data = self.api_client.call_api(
2046
+ *_param,
2047
+ _request_timeout=_request_timeout
2048
+ )
2049
+ response_data.read()
2050
+ return self.api_client.response_deserialize(
2051
+ response_data=response_data,
2052
+ response_types_map=_response_types_map,
2053
+ ).data
2054
+
2055
+
2056
+ @validate_call
2057
+ def verify_with_http_info(
2058
+ self,
2059
+ body: Optional[VerifyRequest] = None,
2060
+ _request_timeout: Union[
2061
+ None,
2062
+ Annotated[StrictFloat, Field(gt=0)],
2063
+ Tuple[
2064
+ Annotated[StrictFloat, Field(gt=0)],
2065
+ Annotated[StrictFloat, Field(gt=0)]
2066
+ ]
2067
+ ] = None,
2068
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2069
+ _content_type: Optional[StrictStr] = None,
2070
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2071
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2072
+ ) -> ApiResponse[Verify200Response]:
2073
+ """verify
2074
+
2075
+
2076
+ :param body:
2077
+ :type body: VerifyRequest
2078
+ :param _request_timeout: timeout setting for this request. If one
2079
+ number provided, it will be total request
2080
+ timeout. It can also be a pair (tuple) of
2081
+ (connection, read) timeouts.
2082
+ :type _request_timeout: int, tuple(int, int), optional
2083
+ :param _request_auth: set to override the auth_settings for an a single
2084
+ request; this effectively ignores the
2085
+ authentication in the spec for a single request.
2086
+ :type _request_auth: dict, optional
2087
+ :param _content_type: force content-type for the request.
2088
+ :type _content_type: str, Optional
2089
+ :param _headers: set to override the headers for a single
2090
+ request; this effectively ignores the headers
2091
+ in the spec for a single request.
2092
+ :type _headers: dict, optional
2093
+ :param _host_index: set to override the host_index for a single
2094
+ request; this effectively ignores the host_index
2095
+ in the spec for a single request.
2096
+ :type _host_index: int, optional
2097
+ :return: Returns the result object.
2098
+ """ # noqa: E501
2099
+
2100
+ _param = self._verify_serialize(
2101
+ body=body,
2102
+ _request_auth=_request_auth,
2103
+ _content_type=_content_type,
2104
+ _headers=_headers,
2105
+ _host_index=_host_index
2106
+ )
2107
+
2108
+ _response_types_map: Dict[str, Optional[str]] = {
2109
+ '200': "Verify200Response",
2110
+ '404': None,
2111
+ '500': None,
2112
+ }
2113
+ response_data = self.api_client.call_api(
2114
+ *_param,
2115
+ _request_timeout=_request_timeout
2116
+ )
2117
+ response_data.read()
2118
+ return self.api_client.response_deserialize(
2119
+ response_data=response_data,
2120
+ response_types_map=_response_types_map,
2121
+ )
2122
+
2123
+
2124
+ @validate_call
2125
+ def verify_without_preload_content(
2126
+ self,
2127
+ body: Optional[VerifyRequest] = None,
2128
+ _request_timeout: Union[
2129
+ None,
2130
+ Annotated[StrictFloat, Field(gt=0)],
2131
+ Tuple[
2132
+ Annotated[StrictFloat, Field(gt=0)],
2133
+ Annotated[StrictFloat, Field(gt=0)]
2134
+ ]
2135
+ ] = None,
2136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2137
+ _content_type: Optional[StrictStr] = None,
2138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2140
+ ) -> RESTResponseType:
2141
+ """verify
2142
+
2143
+
2144
+ :param body:
2145
+ :type body: VerifyRequest
2146
+ :param _request_timeout: timeout setting for this request. If one
2147
+ number provided, it will be total request
2148
+ timeout. It can also be a pair (tuple) of
2149
+ (connection, read) timeouts.
2150
+ :type _request_timeout: int, tuple(int, int), optional
2151
+ :param _request_auth: set to override the auth_settings for an a single
2152
+ request; this effectively ignores the
2153
+ authentication in the spec for a single request.
2154
+ :type _request_auth: dict, optional
2155
+ :param _content_type: force content-type for the request.
2156
+ :type _content_type: str, Optional
2157
+ :param _headers: set to override the headers for a single
2158
+ request; this effectively ignores the headers
2159
+ in the spec for a single request.
2160
+ :type _headers: dict, optional
2161
+ :param _host_index: set to override the host_index for a single
2162
+ request; this effectively ignores the host_index
2163
+ in the spec for a single request.
2164
+ :type _host_index: int, optional
2165
+ :return: Returns the result object.
2166
+ """ # noqa: E501
2167
+
2168
+ _param = self._verify_serialize(
2169
+ body=body,
2170
+ _request_auth=_request_auth,
2171
+ _content_type=_content_type,
2172
+ _headers=_headers,
2173
+ _host_index=_host_index
2174
+ )
2175
+
2176
+ _response_types_map: Dict[str, Optional[str]] = {
2177
+ '200': "Verify200Response",
2178
+ '404': None,
2179
+ '500': None,
2180
+ }
2181
+ response_data = self.api_client.call_api(
2182
+ *_param,
2183
+ _request_timeout=_request_timeout
2184
+ )
2185
+ return response_data.response
2186
+
2187
+
2188
+ def _verify_serialize(
2189
+ self,
2190
+ body,
2191
+ _request_auth,
2192
+ _content_type,
2193
+ _headers,
2194
+ _host_index,
2195
+ ) -> RequestSerialized:
2196
+
2197
+ _host = None
2198
+
2199
+ _collection_formats: Dict[str, str] = {
2200
+ }
2201
+
2202
+ _path_params: Dict[str, str] = {}
2203
+ _query_params: List[Tuple[str, str]] = []
2204
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2205
+ _form_params: List[Tuple[str, str]] = []
2206
+ _files: Dict[
2207
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2208
+ ] = {}
2209
+ _body_params: Optional[bytes] = None
2210
+
2211
+ # process the path parameters
2212
+ # process the query parameters
2213
+ # process the header parameters
2214
+ # process the form parameters
2215
+ # process the body parameter
2216
+ if body is not None:
2217
+ _body_params = body
2218
+
2219
+
2220
+ # set the HTTP header `Accept`
2221
+ if 'Accept' not in _header_params:
2222
+ _header_params['Accept'] = self.api_client.select_header_accept(
2223
+ [
2224
+ 'application/zrok.v1+json'
2225
+ ]
2226
+ )
2227
+
2228
+ # set the HTTP header `Content-Type`
2229
+ if _content_type:
2230
+ _header_params['Content-Type'] = _content_type
2231
+ else:
2232
+ _default_content_type = (
2233
+ self.api_client.select_header_content_type(
2234
+ [
2235
+ 'application/zrok.v1+json'
2236
+ ]
2237
+ )
2238
+ )
2239
+ if _default_content_type is not None:
2240
+ _header_params['Content-Type'] = _default_content_type
2241
+
2242
+ # authentication setting
2243
+ _auth_settings: List[str] = [
2244
+ ]
2245
+
2246
+ return self.api_client.param_serialize(
2247
+ method='POST',
2248
+ resource_path='/verify',
2249
+ path_params=_path_params,
2250
+ query_params=_query_params,
2251
+ header_params=_header_params,
2252
+ body=_body_params,
2253
+ post_params=_form_params,
2254
+ files=_files,
2255
+ auth_settings=_auth_settings,
2256
+ collection_formats=_collection_formats,
2257
+ _host=_host,
2258
+ _request_auth=_request_auth
2259
+ )
2260
+
2261
+